/* NetDef Auth Pages — Enterprise Style */

body.auth-page {
    min-height: 100vh;
    background: var(--ent-bg);
    overflow-x: hidden;
}

body.auth-page .nav {
    position: absolute;
    background: transparent;
    border-bottom: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.auth-page .nav-logo svg {
    color: var(--ent-accent);
}

body.auth-page .nav-inner {
    max-width: none;
    padding: 0 32px;
}

/* Split layout */
.auth-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* Brand panel */
.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 64px 64px;
    background: var(--ent-brand);
    border-right: 1px solid var(--ent-accent-border);
    overflow: hidden;
}

.auth-brand-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.auth-brand-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--ent-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--ent-grid) 1px, transparent 1px);
    background-size: 48px 48px;
}

.auth-brand-glow {
    display: none;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 440px;
}

.auth-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 6px;
    background: var(--ent-accent-muted);
    border: 1px solid var(--ent-accent-border);
    color: var(--ent-accent-light);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.auth-brand-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ent-accent);
    animation: authPulse 2s ease infinite;
}

@keyframes authPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(18, 166, 113, 0.4); }
    50% { opacity: 0.6; box-shadow: 0 0 0 4px rgba(18, 166, 113, 0); }
}

.auth-brand h2 {
    font-size: clamp(28px, 3.5vw, 38px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 16px;
    color: #f5f5f7;
}

.auth-brand-desc {
    font-size: 16px;
    color: rgba(245, 245, 247, 0.55);
    line-height: 1.7;
    margin-bottom: 48px;
}

.auth-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 48px;
}

.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.auth-feature-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--ent-accent-muted);
    border: 1px solid var(--ent-accent-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ent-accent-light);
}

.auth-feature-icon svg {
    width: 18px;
    height: 18px;
}

.auth-feature-text h4 {
    font-size: 14px;
    font-weight: 600;
    color: #f5f5f7;
    margin-bottom: 4px;
}

.auth-feature-text p {
    font-size: 13px;
    color: rgba(245, 245, 247, 0.45);
    line-height: 1.5;
}

.auth-trust-bar {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(245, 245, 247, 0.4);
    font-weight: 500;
}

.auth-trust-item svg {
    width: 14px;
    height: 14px;
    color: var(--ent-accent);
}

/* Form panel */
.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 48px 48px;
    background: var(--ent-bg);
    position: relative;
}

.auth-form-panel::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.06), transparent);
}

.auth-form-wrap {
    width: 100%;
    max-width: 400px;
    animation: authFadeIn 0.5s ease forwards;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-form-header {
    margin-bottom: 36px;
}

.auth-form-header h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: #f5f5f7;
}

.auth-form-header p {
    font-size: 15px;
    color: rgba(245, 245, 247, 0.5);
}

.auth-form-panel .form-group {
    margin-bottom: 22px;
}

.auth-form-panel .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgba(245, 245, 247, 0.65);
    margin-bottom: 8px;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(245, 245, 247, 0.3);
    pointer-events: none;
    display: flex;
}

.auth-input-icon svg {
    width: 18px;
    height: 18px;
}

.auth-form-panel .form-group input {
    width: 100%;
    padding: 13px 16px 13px 44px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #f5f5f7;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.auth-form-panel .form-group input::placeholder {
    color: rgba(245, 245, 247, 0.25);
}

.auth-form-panel .form-group input:focus {
    outline: none;
    border-color: var(--ent-accent-border);
    background: var(--ent-accent-subtle);
    box-shadow: 0 0 0 3px var(--ent-accent-muted);
}

.auth-input-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(245, 245, 247, 0.35);
    cursor: pointer;
    padding: 4px;
    display: flex;
    transition: color 0.2s ease;
}

.auth-input-toggle:hover {
    color: rgba(245, 245, 247, 0.6);
}

.auth-input-toggle svg {
    width: 18px;
    height: 18px;
}

.auth-form-panel .form-group input[type="password"],
.auth-form-panel .form-group input.has-toggle {
    padding-right: 44px;
}

.auth-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: rgba(245, 245, 247, 0.55);
    user-select: none;
}

.auth-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--ent-accent);
    cursor: pointer;
}

.auth-form-panel .btn-primary {
    width: 100%;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    background: var(--ent-accent);
    color: #fff;
    box-shadow: 0 4px 16px rgba(18, 166, 113, 0.25);
    transition: background 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.auth-form-panel .btn-primary:hover {
    background: var(--ent-accent-hover);
    color: #fff;
    box-shadow: 0 6px 20px rgba(18, 166, 113, 0.3);
}

.auth-form-panel .btn-primary:active {
    transform: translateY(0);
}

.auth-form-panel .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-form-panel .alert {
    border-radius: 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-form-panel .alert-error {
    background: rgba(255, 59, 48, 0.08);
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 28px 0;
    color: rgba(245, 245, 247, 0.25);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}

.auth-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 14px;
    color: rgba(245, 245, 247, 0.45);
}

.auth-footer a {
    color: var(--ent-accent-light);
    font-weight: 500;
    text-decoration: none;
}

.auth-footer a:hover {
    color: var(--ent-accent);
}

.auth-copyright {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    color: rgba(245, 245, 247, 0.2);
}

/* Responsive */
@media (max-width: 960px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        display: none;
    }

    .auth-form-panel {
        padding: 100px 24px 64px;
        min-height: 100vh;
    }

    .auth-form-panel::before {
        display: none;
    }

    body.auth-page .nav {
        background: rgba(11, 16, 14, 0.92);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--ent-accent-border);
    }
}

@media (max-width: 480px) {
    .auth-form-panel {
        padding: 88px 20px 48px;
    }

    .auth-form-header h1 {
        font-size: 22px;
    }
}

/* Legal pages */
body.legal-page .nav {
    position: fixed;
    background: rgba(11, 16, 14, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ent-accent-border);
}

.legal-main {
    min-height: 100vh;
    padding: 88px 24px 48px;
    max-width: 800px;
    margin: 0 auto;
}

.legal-card {
    background: var(--ent-surface);
    border: 1px solid var(--ent-accent-border);
    border-radius: 16px;
    padding: 40px 48px;
}

.legal-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #f5f5f7;
}

.legal-updated {
    font-size: 13px;
    color: rgba(245, 245, 247, 0.45);
    margin-bottom: 32px;
}

.legal-body {
    font-size: 15px;
    line-height: 1.75;
    color: rgba(245, 245, 247, 0.75);
}

.legal-body h2 {
    font-size: 17px;
    font-weight: 600;
    color: #f5f5f7;
    margin: 28px 0 12px;
}

.legal-body h2:first-child {
    margin-top: 0;
}

.legal-body p {
    margin-bottom: 12px;
}

.legal-body ul {
    margin: 0 0 16px;
    padding-left: 20px;
}

.legal-body li {
    margin-bottom: 8px;
}

.legal-body code {
    font-size: 13px;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
}

.legal-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--ent-accent-border);
    font-size: 14px;
    color: rgba(245, 245, 247, 0.45);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.legal-footer a {
    color: var(--ent-accent-light);
    text-decoration: none;
}

.legal-footer a:hover {
    color: var(--ent-accent);
}

.auth-legal-agree {
    margin-bottom: 20px;
    justify-content: flex-start;
}

.auth-legal-agree .auth-checkbox {
    align-items: flex-start;
    line-height: 1.5;
}

.auth-legal-agree .auth-checkbox input {
    margin-top: 3px;
    flex-shrink: 0;
}

.auth-checkbox a {
    color: var(--ent-accent-light);
    text-decoration: none;
}

.auth-checkbox a:hover {
    color: var(--ent-accent);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .legal-main {
        padding: 80px 16px 32px;
    }

    .legal-card {
        padding: 28px 20px;
    }

    .legal-header h1 {
        font-size: 22px;
    }
}
