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

body {
    font-family: 'Work Sans', sans-serif;
    background-color: #f3f4f6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #374151;
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #111827;
}

/* Auth page wrapper */
.auth-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* Product logo above the card */
.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.auth-logo img {
    height: 140px;
    width: auto;
    object-fit: contain;
}

.product-subtitle {
    margin-top: 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: #6b7280;
}

/* White card container */
.auth-container {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 480px;
}

/* Inputs */
input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: 'Work Sans', sans-serif;
    font-size: 0.875rem;
    color: #374151;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    margin-bottom: 1rem;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    border-color: #E47A35;
    box-shadow: 0 0 0 3px rgba(228, 122, 53, 0.15);
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: #374151;
}

label .asteriskField {
    color: #E47A35;
    margin-left: 2px;
}

/* Primary button */
button[type="submit"],
.btn-primary {
    width: 100%;
    padding: 0.625rem 1rem;
    background-color: #E47A35;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-family: 'Work Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
    margin-top: 1rem;
}

button[type="submit"]:hover,
.btn-primary:hover {
    background-color: #C86429;
}

/* Links */
a {
    color: #E47A35;
    text-decoration: none;
    transition: color 0.15s;
}

a:hover {
    color: #C86429;
    text-decoration: underline;
}

/* Auth links row (Forgot Password / Sign Up) */
.auth-links {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Hide allauth's auto-injected help_text "Forgot your password?" on the password field */
.auth-container .helptext {
    display: none;
}

/* reCAPTCHA - centre the widget iframe (width/align-self so it also centres
   if the surrounding form ever becomes a flex or grid container) */
.auth-container .g-recaptcha {
    display: flex;
    justify-content: center;
    align-self: center;
    width: 100%;
    margin: 1rem auto 0.5rem;
}

/* ── Forgot-password page ── */

/* Back arrow above the logo */
.auth-back-row {
    width: 100%;
    max-width: 480px;
    margin-bottom: 0.75rem;
}

.back-arrow-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #e5e7eb;
    color: #6b7280;
    font-size: 1.1rem;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}

.back-arrow-link:hover {
    background-color: #d1d5db;
    color: #374151;
    text-decoration: none;
}

/* Horizontal e-mail row: [* Email] [input] */
.reset-email-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.reset-email-label {
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    margin-bottom: 0;
}

.reset-email-label .asteriskField {
    color: #E47A35;
    margin-right: 2px;
}

.reset-email-row input[type="email"] {
    flex: 1;
    width: auto;
    margin-bottom: 0;
}

/* Info text block */
.reset-info-text {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.55;
    margin-bottom: 1rem;
}

.reset-info-text p + p {
    margin-top: 0.5rem;
}

.reset-note {
    color: #374151;
}

/* Action row: [Send button]  [Back to login] */
.reset-action-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.25rem;
}

/* Specificity matches button[type="submit"] (0-1-1) so later position wins */
button.btn-reset {
    padding: 0.625rem 1.25rem;
    background-color: #9ca3af;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-family: 'Work Sans', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
    width: auto;
    margin-top: 0;
}

button.btn-reset:disabled {
    cursor: not-allowed;
    opacity: 0.85;
}

button.btn-reset:not(:disabled):hover {
    background-color: #6b7280;
}

button.btn-reset.btn-reset--active {
    background-color: #E47A35;
}

button.btn-reset.btn-reset--active:hover {
    background-color: #C86429;
}

/* Footer weblink below the card */
.weblink-div {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: center;
}

/* Error messages */
.alert,
.errorlist {
    background-color: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    color: #b91c1c;
    font-size: 0.875rem;
}

.errorlist {
    list-style: none;
}

/* Success messages */
.alert-success {
    background-color: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
}

/* Footer */
footer {
    padding: 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* ── Sign-up page ── */

/* Wider card for sign-up (more fields + DPN section) */
.auth-container--signup {
    max-width: 560px;
}

/* "Welcome" label */
.signup-welcome {
    font-size: 0.9375rem;
    color: #374151;
    margin-bottom: 1.25rem;
}

/* Horizontal field rows: [* Label :] [input] */
.signup-field-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
}

.signup-label {
    flex-shrink: 0;
    width: 130px;
    text-align: right;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0;
}

.signup-label .asteriskField {
    color: #E47A35;
    margin-right: 2px;
}

.signup-field-row input[type="email"],
.signup-field-row input[type="password"],
.signup-field-row input[type="text"] {
    flex: 1;
    width: auto;
    margin-bottom: 0;
}

/* Password guidelines block - indented to align under input */
.password-guidelines {
    margin: 0.125rem 0 1rem 145px;
    font-size: 0.8rem;
}

.pw-rule {
    margin-bottom: 0.3rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.15s;
}

.pw-rule.pass {
    color: #374151;
}

/* Heroicon SVG sizing */
.pw-icon-wrap {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pw-svg {
    width: 1rem;
    height: 1rem;
    position: absolute;
    transition: opacity 0.15s;
}

/* x-circle: red, visible by default */
.pw-svg--fail { color: #dc2626; opacity: 1; }
/* check-circle: green, hidden by default */
.pw-svg--pass { color: #16a34a; opacity: 0; }

/* When rule passes, swap which icon is visible */
.pw-rule.pass .pw-svg--fail { opacity: 0; }
.pw-rule.pass .pw-svg--pass { opacity: 1; }

/* Horizontal rule before DPN */
.signup-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 1.25rem 0;
}

/* Data Protection Notice */
.dpn-section {
    margin-bottom: 1rem;
}

.dpn-title {
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.75rem;
}

.dpn-content {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.dpn-checkbox-col {
    flex-shrink: 0;
    padding-top: 0.125rem;
}

.dpn-checkbox {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
    accent-color: #E47A35;
    margin: 0;
}

.dpn-text-col {
    flex: 1;
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.55;
}

.dpn-text-col p {
    margin-bottom: 0.4rem;
}

.dpn-text-col ul {
    margin: 0.25rem 0 0.5rem 1.125rem;
}

.dpn-text-col ul li {
    margin-bottom: 0.3rem;
}
