/**
 * ItemDash — shared styles for login / register
 */
:root {
    --auth-bg: #0b0f14;
    --auth-surface: #111318;
    --auth-border: rgba(57, 255, 20, 0.22);
    --auth-text: #f0f6fc;
    --auth-muted: #8b949e;
    --auth-accent: #39ff14;
    --auth-accent-hover: #4ade80;
    --auth-input-bg: #161b22;
    --auth-danger: #f87171;
}

* {
    box-sizing: border-box;
}

body.auth-page {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--auth-bg);
    color: var(--auth-text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    position: relative;
    overflow-x: hidden;
}

body.auth-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(145deg, rgba(57, 255, 20, 0.06) 0%, var(--auth-bg) 55%);
    pointer-events: none;
    z-index: 0;
}

.auth-shell {
    width: 100%;
    max-width: 28rem;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--auth-surface);
    border-radius: 16px;
    border: 1px solid var(--auth-border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    padding: 2.25rem 1.75rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-logo {
    display: block;
    margin: 0 auto 1rem;
    height: 52px;
    width: auto;
}

.auth-title {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    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 #30363d;
    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(57, 255, 20, 0.12);
    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 {
    background: var(--auth-accent);
    border: none;
    color: #0b0f14;
    font-weight: 600;
    padding: 0.75rem 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 {
    background: var(--auth-accent-hover);
    color: #0b0f14;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(57, 255, 20, 0.2);
}

.btn-auth-outline {
    border: 2px solid var(--auth-accent);
    color: var(--auth-accent);
    background: transparent;
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    width: 100%;
    font-size: 1rem;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn-auth-outline:hover {
    background: rgba(57, 255, 20, 0.12);
    color: var(--auth-accent-hover);
    border-color: var(--auth-accent-hover);
    transform: translateY(-1px);
}

.btn-google {
    background: #fff;
    color: #1f2328;
    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;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn-google:hover {
    border-color: #afb8c1;
    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: #30363d;
}

.auth-divider span {
    background: var(--auth-surface);
    padding: 0 0.75rem;
    position: relative;
}

.auth-legal-box {
    background: var(--auth-input-bg);
    border: 1px solid #30363d;
    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 #30363d;
}

.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.2rem;
    }
}
