/* Hallmark · pre-emit critique: P4 H4 E4 S4 R4 V4 */
/* ItemDash auth: logo colours (design.md). Ground #090a0a, ink #fbf9f8, lime #61f33b. */

:root {
    --auth-bg: #090a0a;
    --auth-surface: #111312;
    --auth-border: rgba(97, 243, 59, 0.3);
    --auth-text: #fbf9f8;
    --auth-muted: #a9b0a6;
    --auth-accent: #61f33b;
    --auth-accent-hover: #80f862;
    --auth-on-accent: #090a0a;
    --auth-input-bg: #181b19;
    --auth-danger: #f87171;
    --auth-font: "IBM Plex Sans", "Segoe UI", sans-serif;
    --auth-display: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
    overflow-x: clip;
}

body.auth-page {
    margin: 0;
    min-height: 100vh;
    font-family: var(--auth-font);
    background: var(--auth-bg);
    color: var(--auth-text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    position: relative;
}

body.auth-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 45% at 12% 0%, rgba(97, 243, 59, 0.12), transparent 55%),
        radial-gradient(ellipse 50% 40% at 100% 100%, rgba(97, 243, 59, 0.06), transparent 50%),
        linear-gradient(160deg, #070907 0%, var(--auth-bg) 50%, #0a0c0a 100%);
    pointer-events: none;
    z-index: 0;
}

body.auth-page::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(97, 243, 59, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(97, 243, 59, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
}

.auth-shell {
    width: 100%;
    max-width: 28rem;
    position: relative;
    z-index: 1;
    animation: auth-rise 0.5s ease both;
}

@keyframes auth-rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-card {
    background: linear-gradient(165deg, rgba(13, 16, 14, 0.98) 0%, rgba(8, 10, 8, 0.99) 100%);
    border-radius: 18px;
    border: 1px solid var(--auth-border);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(97, 243, 59, 0.06);
    padding: 2.25rem 1.75rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-logo-frame {
    width: 4.75rem;
    height: 4.75rem;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(97, 243, 59, 0.35);
    background: rgba(5, 6, 5, 0.85);
    padding: 0.65rem;
}

.auth-logo {
    display: block;
    height: auto;
    width: 70%;
    max-height: 70%;
    object-fit: contain;
    margin: 0;
}

.auth-title {
    font-family: var(--auth-display);
    font-style: normal;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 0.35rem;
    color: var(--auth-text);
}

.auth-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: var(--auth-muted);
    font-weight: 400;
}

.dash-green {
    color: var(--auth-accent);
}

.form-floating {
    margin-bottom: 1rem;
}

.auth-page .form-control {
    border: 1px solid #2a322a;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: var(--auth-input-bg);
    color: var(--auth-text);
    min-height: 3.25rem;
}

.auth-page .form-control:focus {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px rgba(97, 243, 59, 0.14);
    background: var(--auth-input-bg);
    color: var(--auth-text);
}

.auth-page .form-floating > label {
    color: var(--auth-muted);
}

.auth-page .form-floating > .form-control:focus ~ label,
.auth-page .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--auth-muted);
}

.btn-auth-primary,
a.btn-auth-primary {
    background: var(--auth-accent);
    border: none;
    color: var(--auth-on-accent) !important;
    font-weight: 700;
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    width: 100%;
    font-size: 1rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-auth-primary:hover,
a.btn-auth-primary:hover {
    background: var(--auth-accent-hover);
    color: var(--auth-on-accent) !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(97, 243, 59, 0.22);
}

.btn-auth-outline,
a.btn-auth-outline {
    border: 2px solid var(--auth-accent);
    color: var(--auth-accent) !important;
    background: transparent;
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    font-weight: 650;
    width: 100%;
    font-size: 1rem;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn-auth-outline:hover,
a.btn-auth-outline:hover {
    background: rgba(97, 243, 59, 0.12);
    color: var(--auth-accent-hover) !important;
    border-color: var(--auth-accent-hover);
    transform: translateY(-1px);
}

.btn-google,
a.btn-google,
button.btn-google {
    background: #fff;
    color: #1f2328 !important;
    border: 1px solid #d0d7de;
    border-radius: 999px;
    font-weight: 600;
    width: 100%;
    padding: 0.7rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    line-height: 1.2;
    min-height: 3rem;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn-google:hover,
a.btn-google:hover,
button.btn-google:hover {
    border-color: #afb8c1;
    color: #1f2328 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auth-alert {
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.auth-alert-danger {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fecaca;
}

.auth-alert-success {
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.35);
    color: #bbf7d0;
}

.auth-alert ul {
    margin: 0;
    padding-left: 1.1rem;
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    color: var(--auth-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #2a322a;
}

.auth-divider span {
    background: #0d100e;
    padding: 0 0.75rem;
    position: relative;
}

.auth-legal-box {
    background: var(--auth-input-bg);
    border: 1px solid #2a322a;
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.65rem;
}

.auth-legal-box .form-check-label,
.auth-legal-box label {
    color: var(--auth-muted);
    font-size: 0.8125rem;
}

.auth-legal-box a {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 600;
}

.auth-legal-box a:hover {
    text-decoration: underline;
}

.auth-form-check {
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    background: var(--auth-input-bg);
    border-radius: 12px;
    border: 1px solid #2a322a;
}

.auth-form-check .form-check-label {
    color: var(--auth-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.auth-form-check .form-check-label a {
    color: var(--auth-accent);
    font-weight: 600;
    text-decoration: none;
}

.auth-form-check .form-check-label a:hover {
    text-decoration: underline;
}

.auth-form-check .form-check-input {
    background-color: var(--auth-input-bg);
    border-color: #484f58;
}

.auth-form-check .form-check-input:checked {
    background-color: var(--auth-accent);
    border-color: var(--auth-accent);
}

.auth-footer-link {
    text-align: center;
    margin-top: 1.25rem;
}

.auth-footer-link a {
    color: var(--auth-muted);
    text-decoration: none;
    font-size: 0.875rem;
}

.auth-footer-link a:hover {
    color: var(--auth-accent);
}

.auth-live-region {
    min-height: 0;
}

.auth-live-region[aria-live] {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--auth-danger);
}

@media (max-width: 576px) {
    .auth-card {
        padding: 1.75rem 1.25rem;
    }

    .auth-title {
        font-size: 1.3rem;
    }
}
