/* Login / register / forgotten / reset pages */

/* This file only loads on the auth pages, which have no footer menu: the
   page fills exactly the viewport below the header, so it does not scroll
   unless the form itself is taller than the screen. */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.main-content {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
}

.auth-page {
    position: relative;
    display: flex;
    flex: 1 0 auto;
    align-items: center;
    overflow: hidden;
    background:
        radial-gradient(600px 300px at 50% -80px, rgba(245, 131, 49, 0.18), transparent 70%),
        #0f172a;
}

.auth-card {
    position: relative;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.85));
    border: 1px solid rgba(71, 85, 105, 0.45);
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, transparent, #f58331, transparent);
}

.auth-label {
    display: block;
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #cbd5e1;
}

/* Field with a leading icon */
.auth-field {
    position: relative;
}

.auth-field__icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.875rem;
    pointer-events: none;
    transition: color 0.2s ease;
}

.auth-field:focus-within .auth-field__icon {
    color: #f58331;
}

.auth-input {
    display: block;
    width: 100%;
    height: 3rem;
    padding: 0 1rem 0 2.75rem;
    font-size: 0.9375rem;
    line-height: 1.25;
    color: #f1f5f9;
    caret-color: #f58331;
    background-color: rgba(15, 23, 42, 0.8);
    border: 1px solid #334155;
    border-radius: 0.75rem;
    color-scheme: dark;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.auth-input--toggle {
    padding-right: 3rem;
}

.auth-input::placeholder {
    color: #64748b;
}

.auth-input:hover {
    border-color: #475569;
}

/* Stays dark while typing: no light background on focus */
.auth-input:focus,
.auth-input:focus-visible {
    outline: none;
    color: #f8fafc;
    background-color: rgba(15, 23, 42, 0.95);
    border-color: #f58331;
    box-shadow: 0 0 0 3px rgba(245, 131, 49, 0.2);
}

.auth-input.is-invalid {
    border-color: rgba(248, 113, 113, 0.7);
}

.auth-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.2);
}

/* Browser autofill paints the field white/yellow; keep it dark */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus,
.auth-input:-webkit-autofill:active {
    -webkit-text-fill-color: #f1f5f9;
    caret-color: #f58331;
    -webkit-box-shadow: 0 0 0 1000px #131c2e inset !important;
    box-shadow: 0 0 0 1000px #131c2e inset !important;
    transition: background-color 9999s ease-in-out 0s;
}

.auth-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #131c2e inset, 0 0 0 3px rgba(245, 131, 49, 0.2) !important;
    box-shadow: 0 0 0 1000px #131c2e inset, 0 0 0 3px rgba(245, 131, 49, 0.2) !important;
}

.auth-input:autofill {
    background-color: #131c2e !important;
}

/* Hide the browsers' own reveal buttons; we ship our own */
.auth-input::-ms-reveal,
.auth-input::-ms-clear {
    display: none;
}

/* The header forces position:relative !important on every <button>,
   so the wrapper does the positioning instead of the button itself. */
.auth-toggle-wrap {
    position: absolute;
    top: 0;
    right: 0.5rem;
    bottom: 0;
    display: flex;
    align-items: center;
}

.auth-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    color: #64748b;
    background: transparent;
    border: 0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.auth-toggle:hover,
.auth-toggle:focus-visible {
    color: #f1f5f9;
    background-color: rgba(51, 65, 85, 0.6);
    outline: none;
}

.auth-toggle[aria-pressed="true"] {
    color: #f58331;
}

.auth-error {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0.375rem 0 0;
    font-size: 0.75rem;
    color: #f87171;
}

/* Checkboxes */
.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: #cbd5e1;
    cursor: pointer;
}

.auth-check input[type="checkbox"] {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    margin: 0.125rem 0 0;
    accent-color: #f58331;
    cursor: pointer;
}

.auth-check a {
    color: #f58331;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-check a:hover {
    color: #ff9147;
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 3rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg, #f58331, #ea580c);
    border: 0;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -10px rgba(245, 131, 49, 0.7);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-submit:hover {
    filter: brightness(1.08);
    box-shadow: 0 14px 28px -10px rgba(245, 131, 49, 0.85);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-footer {
    padding-top: 1.25rem;
    margin: 0;
    font-size: 0.875rem;
    text-align: center;
    color: #94a3b8;
    border-top: 1px solid rgba(71, 85, 105, 0.4);
}

.auth-footer a,
.auth-link {
    color: #f58331;
    font-weight: 500;
}

.auth-footer a:hover,
.auth-link:hover {
    color: #ff9147;
    text-decoration: none;
}

.auth-page > .container {
    width: 100%;
}
