/* ═══════════════════════════════════════════════
   MobiNET Portal — Auth pages (login / password reset)
   Petrol console + the app's waveform signature.
   Reads the --mn-* tokens defined in portal.css.
   ═══════════════════════════════════════════════ */

/* Auth pages don't load Bootstrap, so establish the reset it would provide. */
.auth-stage,
.auth-stage *,
.auth-stage *::before,
.auth-stage *::after {
    box-sizing: border-box;
}

.auth-stage {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 1.25rem 3rem;
}

/* ─── Card ─── */
.auth-card {
    width: 100%;
    max-width: 400px;
    background: linear-gradient(180deg, #123a3d 0%, var(--mn-bg-card) 34%);
    border: 1px solid var(--mn-border);
    border-radius: var(--mn-radius);
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(47, 232, 190, 0.10);
    padding: 2.25rem 2.25rem 2rem;
    animation: auth-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

/* ─── Signature: live audio waveform (the app-icon motif) ─── */
.auth-signal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.4rem;
}

.auth-wave {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 34px;
}

.auth-wave span {
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--mn-mint), var(--mn-teal));
    transform-origin: bottom;
    animation: auth-pulse 1.5s ease-in-out infinite;
}

.auth-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mn-text-muted);
}

.auth-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mn-mint);
    animation: auth-beacon 2.4s ease-out infinite;
}

/* ─── Wordmark ─── */
.auth-brand {
    text-align: center;
    margin-bottom: 0.35rem;
}

.auth-wordmark {
    font-weight: 800;
    font-size: 2.35rem;
    letter-spacing: -0.02em;
    line-height: 1;
    margin: 0;
}

.auth-wordmark .mobi {
    color: var(--mn-text);
    opacity: 0.62;
}

.auth-wordmark .net {
    color: var(--mn-teal);
}

.auth-eyebrow {
    margin: 0.7rem 0 0;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--mn-text-muted);
}

/* ─── Form ─── */
.auth-form {
    margin-top: 1.9rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.auth-field label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mn-text-muted);
}

.auth-input {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--mn-text);
    background: #123a3d;
    border: 1px solid var(--mn-border);
    border-radius: var(--mn-radius-sm);
    padding: 0.8rem 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.auth-input::placeholder {
    color: var(--mn-text-muted);
    opacity: 0.65;
    font-weight: 600;
}

.auth-input:focus {
    outline: none;
    border-color: var(--mn-mint);
    background: #16454a;
    box-shadow: 0 0 0 3px rgba(47, 232, 190, 0.28);
}

.auth-btn {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #06211e;
    background: linear-gradient(180deg, var(--mn-mint), var(--mn-teal));
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1rem;
    margin-top: 0.4rem;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.2s, filter 0.2s;
    box-shadow: 0 10px 24px -10px rgba(21, 204, 167, 0.7);
}

.auth-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 16px 32px -12px rgba(21, 204, 167, 0.8);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn:focus-visible {
    outline: 3px solid var(--mn-mint);
    outline-offset: 3px;
}

.auth-message {
    margin: 0;
    text-align: center;
    color: var(--mn-text-muted);
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.5;
}

.auth-forgot {
    text-align: center;
    margin: 1.2rem 0 0;
}

.auth-forgot a {
    color: var(--mn-teal);
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
    transition: border-color 0.15s, color 0.15s;
}

.auth-forgot a:hover {
    border-bottom-color: var(--mn-teal);
}

.auth-forgot a:focus-visible {
    outline: 3px solid var(--mn-mint);
    outline-offset: 3px;
    border-radius: 3px;
}

.auth-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    color: var(--mn-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.auth-footer .sep {
    opacity: 0.5;
}

.auth-footer strong {
    color: var(--mn-text);
    opacity: 0.85;
    font-weight: 700;
}

/* ─── Validation / status ─── */
.auth-alert {
    border-radius: var(--mn-radius-sm);
    padding: 0.7rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid transparent;
    margin: 0;
}

.auth-alert ul {
    margin: 0;
    padding-left: 1.1rem;
}

.auth-alert-error {
    color: var(--mn-danger);
    background: rgba(255, 107, 107, 0.12);
    border-color: rgba(255, 107, 107, 0.4);
}

.auth-alert-ok {
    color: var(--mn-teal);
    background: rgba(21, 204, 167, 0.12);
    border-color: rgba(21, 204, 167, 0.4);
}

/* asp-validation renders these classes; hide the summary when there are no errors */
.auth-alert.validation-summary-valid {
    display: none;
}

.auth-field .field-validation-error {
    color: var(--mn-danger);
    font-size: 0.78rem;
    font-weight: 600;
}

@keyframes auth-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes auth-pulse {
    0%, 100% { transform: scaleY(0.35); }
    50%      { transform: scaleY(1); }
}

@keyframes auth-beacon {
    0%   { box-shadow: 0 0 0 0 rgba(47, 232, 190, 0.6); }
    70%  { box-shadow: 0 0 0 8px rgba(47, 232, 190, 0); }
    100% { box-shadow: 0 0 0 0 rgba(47, 232, 190, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .auth-card,
    .auth-wave span,
    .auth-dot {
        animation: none !important;
    }
    .auth-wave span {
        transform: scaleY(0.7);
    }
}
