/* ============================================================
   auth.css
   Sign in / register / password reset — the auth family.
   Design system tokens; replaces the legacy AdminLTE login skin.
   ============================================================ */

.auth-page {
    --auth-dark: #1A3A4D;
    --auth-green: #4A9B6E;
    --auth-green-hover: #3A8A5E;
    --auth-blue: #2C5F7C;
    --auth-ink: #1A1A1A;
    --auth-muted: #5A5A5A;
    --auth-faint: #8A8A8A;
    --auth-line: #E5E7EB;
    --auth-error: #EF4444;

    min-height: 100vh;
    margin: 0;
    background: var(--auth-dark);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--auth-ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    box-sizing: border-box;
}

.auth-page *,
.auth-page *::before,
.auth-page *::after { box-sizing: border-box; }

/* ── Card ── */
.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
    padding: 32px 28px;
}

/* ── Brand ── */
.auth-brand {
    text-align: center;
    margin-bottom: 24px;
}

.auth-brand__link {
    text-decoration: none;
    display: inline-block;
}

.auth-brand__mark {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--auth-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.auth-brand__name {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--auth-dark);
    margin: 0;
    line-height: 1.2;
}

.auth-brand__strap {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--auth-green);
    margin: 3px 0 0;
    text-transform: uppercase;
}

/* ── Headings ── */
.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--auth-dark);
    text-align: center;
    margin: 0 0 6px;
}

.auth-sub {
    font-size: 15px;
    color: var(--auth-muted);
    text-align: center;
    margin: 0 0 24px;
}

.auth-body {
    font-size: 15px;
    color: var(--auth-muted);
    line-height: 1.6;
    margin: 0 0 14px;
}

.auth-body:last-of-type { margin-bottom: 0; }

/* ── Fields ── */
.auth-field { margin-bottom: 18px; }

.auth-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.auth-input {
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid var(--auth-line);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: var(--auth-ink);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

.auth-input::placeholder { color: #9CA3AF; }

.auth-input:focus {
    outline: none;
    border-color: var(--auth-green);
    box-shadow: 0 0 0 3px rgba(74, 155, 110, .15);
}

.auth-input.input-validation-error {
    border-color: var(--auth-error);
}

/* Password field with its "Show" toggle */
.auth-password { position: relative; }

.auth-password .auth-input { padding-right: 72px; }

.auth-password__toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-blue);
    cursor: pointer;
    padding: 4px 6px;
}

.auth-password__toggle:hover { text-decoration: underline; }

/* ── Validation ── */
.auth-error {
    display: block;
    font-size: 13px;
    color: var(--auth-error);
    margin-top: 6px;
}

.auth-summary {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 18px;
    font-size: 14px;
    color: #991B1B;
}

.auth-summary ul { margin: 0; padding-left: 18px; }
.auth-summary ul:empty { display: none; }

/* ── Buttons ── */
.auth-btn {
    display: block;
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 10px;
    background: var(--auth-green);
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, opacity .15s;
}

.auth-btn:hover,
.auth-btn:focus { background: var(--auth-green-hover); color: #fff; text-decoration: none; }

.auth-btn:disabled { opacity: .5; cursor: not-allowed; }

.auth-btn--secondary {
    background: #fff;
    color: var(--auth-dark);
    border: 1.5px solid var(--auth-line);
}

.auth-btn--secondary:hover { background: #F7F8FA; color: var(--auth-dark); }

/* ── Row under the button ── */
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--auth-muted);
    cursor: pointer;
}

.auth-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-green);
    margin: 0;
    cursor: pointer;
}

.auth-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-blue);
    text-decoration: none;
}

.auth-link:hover { text-decoration: underline; color: var(--auth-blue); }

/* ── Footer inside the card ── */
.auth-alt {
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--auth-line);
    text-align: center;
    font-size: 14px;
    color: var(--auth-muted);
}

/* Terms row on register */
.auth-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--auth-muted);
    margin-bottom: 14px;
    line-height: 1.5;
}

.auth-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--auth-green);
    margin: 2px 0 0;
    flex-shrink: 0;
    cursor: pointer;
}

/* ── Page footer on the navy ── */
.auth-footer {
    margin-top: 22px;
    font-size: 13px;
    color: rgba(255, 255, 255, .65);
    text-align: center;
}

.auth-footer a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

@media (max-width: 420px) {
    .auth-card { padding: 26px 20px; }
    .auth-title { font-size: 21px; }
}
