/* NexPort — Auth shell (login, register, forgot password) */

.auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    background: #f1f5f9;
    color: #0f172a;
}

.auth-layout {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
}

@media (min-width: 992px) {
    .auth-layout {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Visual panel ── */
.auth-visual {
    position: relative;
    background: #0c1222;
    color: #e2e8f0;
    padding: 2rem 1.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.auth-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
    pointer-events: none;
}

.auth-visual-inner {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 480px;
}

@media (min-width: 992px) {
    .auth-visual {
        padding: 2.5rem 3rem 3rem;
    }
    .auth-visual-inner {
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }
}

.auth-visual-logo {
    height: 40px;
    width: auto;
    margin-bottom: 2.5rem;
}

.auth-visual h1 {
    font-size: clamp(1.65rem, 3vw, 2.15rem);
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #fff;
    margin-bottom: 0.85rem;
}

.auth-visual-lead {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 2rem;
    max-width: 36ch;
}

.auth-trust-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}

.auth-trust-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.88rem;
    color: #cbd5e1;
    margin-bottom: 0.85rem;
    line-height: 1.45;
}

.auth-trust-list .trust-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
}

.auth-hero-art {
    margin-top: auto;
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
    display: block;
}

.auth-visual-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-visual-stats .stat-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    display: block;
}

.auth-visual-stats .stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

/* ── Form panel ── */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem 2.5rem;
    background: #f8fafc;
}

.auth-form-wrap {
    width: 100%;
    max-width: 420px;
}

.auth-mobile-logo {
    display: block;
    height: 36px;
    width: auto;
    margin-bottom: 1.75rem;
}

@media (min-width: 992px) {
    .auth-mobile-logo {
        display: none;
    }
}

.auth-form-header {
    margin-bottom: 1.75rem;
}

.auth-form-header h2 {
    font-size: 1.65rem;
    letter-spacing: -0.03em;
    margin-bottom: 0.35rem;
    color: #0f172a;
}

.auth-form-header p {
    font-size: 0.92rem;
    color: #64748b;
    margin: 0;
}

.auth-field {
    margin-bottom: 1.15rem;
}

.auth-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
}

.auth-input-wrap .form-control {
    padding-left: 2.65rem;
    padding-right: 2.65rem;
    height: 48px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 0.92rem;
    color: #0f172a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input-wrap .form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
    background: #fff;
}

.auth-input-wrap .form-control::placeholder {
    color: #94a3b8;
}

.auth-toggle-pw {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #94a3b8;
    padding: 4px 8px;
    font-size: 1rem;
    cursor: pointer;
    line-height: 1;
}

.auth-toggle-pw:hover {
    color: #6366f1;
}

.auth-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.35rem;
    flex-wrap: wrap;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.auth-check input {
    width: 16px;
    height: 16px;
    accent-color: #4f46e5;
}

.auth-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4f46e5;
    text-decoration: none;
}

.auth-link:hover {
    color: #4338ca;
    text-decoration: underline;
}

.auth-btn-primary {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    color: #fff;
}

/* Primary submit button (used across all auth forms) */
.auth-submit-btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    color: #fff;
}

.auth-submit-btn:active {
    transform: translateY(0);
}

/* Password strength + match helpers */
.auth-pw-meter {
    height: 5px;
    border-radius: 100px;
    background: #e2e8f0;
    overflow: hidden;
    margin: 0.5rem 0 0.35rem;
}

.auth-pw-meter span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 100px;
    transition: width 0.25s ease, background 0.25s ease;
}

.auth-pw-meter.weak span { width: 33%; background: #ef4444; }
.auth-pw-meter.medium span { width: 66%; background: #f59e0b; }
.auth-pw-meter.strong span { width: 100%; background: #10b981; }

.auth-hint {
    font-size: 0.76rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.auth-hint.ok { color: #059669; }
.auth-hint.bad { color: #dc2626; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: #94a3b8;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-footer-text {
    text-align: center;
    font-size: 0.88rem;
    color: #64748b;
    margin: 0;
}

.auth-demo-box {
    margin-top: 1.5rem;
    padding: 1rem 1.1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #475569;
}

.auth-demo-box strong {
    color: #0f172a;
}

.auth-demo-box .demo-title {
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6366f1;
    margin-bottom: 0.5rem;
}

.auth-page-foot {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    font-size: 0.78rem;
}

.auth-page-foot a {
    color: #94a3b8;
    text-decoration: none;
}

.auth-page-foot a:hover {
    color: #4f46e5;
}

/* Register sections */
.auth-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.auth-section-title:first-of-type {
    margin-top: 0;
}

.auth-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 1rem;
}

@media (min-width: 480px) {
    .auth-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.auth-terms {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.auth-terms a {
    color: #4f46e5;
    font-weight: 600;
    text-decoration: none;
}

.auth-terms-check {
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0.5rem 0 1.4rem;
    line-height: 1.45;
}

.auth-terms-check input {
    margin-top: 2px;
    flex-shrink: 0;
}

/* Forgot password success */
.auth-success-panel {
    text-align: center;
    padding: 1.5rem 0;
}

.auth-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.25rem;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    margin-bottom: 1.5rem;
}

.auth-back-link:hover {
    color: #4f46e5;
}

@media (min-width: 992px) {
    .auth-back-link {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .auth-visual {
        min-height: auto;
        padding-bottom: 1.75rem;
    }
    .auth-hero-art {
        display: none;
    }
    .auth-visual-stats {
        display: none;
    }
    .auth-visual h1 {
        font-size: 1.45rem;
        margin-bottom: 0.5rem;
    }
    .auth-visual-lead {
        margin-bottom: 1rem;
        font-size: 0.88rem;
    }
    .auth-trust-list {
        display: none;
    }
    .auth-visual-logo {
        margin-bottom: 1.25rem;
    }
}
