/* ============================================================================
   Academy-style auth-sider (Login / Register / ForgotPassword / Reset).
   Bruker IDENTISK design som Lexico Academy: gradient-border-kort med
   violet/cyan glow-bakgrunner.
   ============================================================================ */

/* Overstyr _Layout's ytre wrappers slik at vi ikke får dobbel-kort */
.public-main:has(.lc-auth-section),
.auth-page:has(.lc-auth-section),
.auth-card:has(.lc-auth-section),
.auth-form:has(.lc-auth-section) {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    width: 100% !important;
}

.lc-auth-section {
    position: relative;
    display: grid;
    place-items: center;
    padding: 1rem;
    min-height: calc(100vh - var(--header-height, 80px) - 44px);
    box-sizing: border-box;
}

/* Glow-bobler i bakgrunnen — mindre + svakere så de ikke dominerer */
.lc-auth-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    opacity: 0.22;
    filter: blur(70px);
    pointer-events: none;
    z-index: 0;
}
.lc-auth-glow-violet { top: -5rem; left: -5rem; background: #8b5cf6; }
.lc-auth-glow-cyan   { bottom: -5rem; right: -5rem; background: #06b6d4; }

.lc-auth-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 26rem;
}

/* Gradient-border-card (Academy-stil 1px-gradient wrapper) */
.lc-auth-card-border {
    border-radius: 1.25rem;
    padding: 1px;
    background: linear-gradient(120deg, #8b5cf6 0%, #06b6d4 50%, #a3e635 100%);
}
.lc-auth-card {
    border-radius: 1.15rem;
    background: var(--bg-card);
    padding: 1.75rem 1.75rem 1.5rem;
}

.lc-auth-header {
    text-align: center;
    margin-bottom: 1.25rem;
}
.lc-auth-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #a78bfa;
    margin-bottom: 0.375rem;
    font-weight: 500;
}
.lc-auth-title {
    font-family: 'Space Grotesk', Inter, sans-serif;
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0;
}
.lc-auth-subtitle {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0.375rem 0 0;
}

/* Form */
.lc-auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}
.lc-auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.lc-auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.lc-auth-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin: 0;
}
.lc-auth-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--bg-input, var(--bg-base));
    border: 1px solid var(--border-subtle);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
.lc-auth-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139,92,246,0.12);
}
.lc-auth-input-wrap { position: relative; }
.lc-auth-input-pw { padding-right: 3rem; }
.lc-auth-pw-toggle {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    padding: 0 0.875rem;
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 150ms ease;
}
.lc-auth-pw-toggle:hover { color: var(--text-primary); }

.lc-auth-forgot {
    font-size: 0.75rem;
    font-weight: 600;
    color: #a78bfa;
    text-decoration: none;
}
.lc-auth-forgot:hover { text-decoration: underline; color: #c4b5fd; }

.lc-auth-error {
    display: block;
    font-size: 0.75rem;
    color: #fda4af;
    margin-top: 0.25rem;
}
.lc-auth-error:empty { display: none; }

.lc-auth-alert {
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    background: rgba(244,63,94,0.10);
    border: 1px solid rgba(244,63,94,0.30);
    color: #fda4af;
}
.lc-auth-alert:empty { display: none; }

.lc-auth-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.lc-auth-checkbox input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: #8b5cf6;
    cursor: pointer;
}

.lc-auth-submit {
    width: 100%;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    border: none;
    background-image: linear-gradient(90deg, #7c3aed 0%, #06b6d4 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    box-shadow: 0 10px 25px -8px rgba(124,58,237,0.35);
    transition: box-shadow 200ms ease, transform 200ms ease;
}
.lc-auth-submit:hover {
    box-shadow: 0 14px 32px -8px rgba(124,58,237,0.55);
    transform: translateY(-1px);
}
.lc-auth-submit:active { transform: translateY(0); }

.lc-auth-divider {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.lc-auth-divider-line {
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}
.lc-auth-divider-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: lowercase;
}

.lc-auth-sso {
    width: 100%;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-default);
    border-radius: 0.75rem;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: not-allowed;
    opacity: 0.6;
}

.lc-auth-footer-text {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}
.lc-auth-link {
    color: #a78bfa;
    font-weight: 600;
    text-decoration: none;
}
.lc-auth-link:hover { text-decoration: underline; color: #c4b5fd; }

.lc-auth-terms {
    margin: 1rem 0 0;
    text-align: center;
    font-size: 0.6875rem;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .lc-auth-card { padding: 1.25rem 1rem; }
    .lc-auth-title { font-size: 1.5rem; }
}
