/* =========================================================
   VidNook Auth Pages
   Login • Invite • Choose Family
   ========================================================= */

body {
    margin: 0;
    background: linear-gradient(135deg, #0b0f17 0%, #111827 100%);
    min-height: 100vh;
    color: #e5e7eb;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.auth-page-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: rgba(17, 24, 39, 0.92);
    border-radius: 16px;
    padding: 36px;
    box-shadow:
        0 20px 50px rgba(0,0,0,0.6),
        inset 0 0 0 1px rgba(255,255,255,0.04);
    backdrop-filter: blur(6px);
}

.login-card h1,
.login-card h2,
.login-card h3 {
    color: #f9fafb;
    letter-spacing: .2px;
}

.text-muted {
    color: #9ca3af !important;
}

.form-control {
    background: #0f172a;
    border: 1px solid #1f2937;
    color: #e5e7eb;
    height: 46px;
    border-radius: 10px;
}

.form-control:focus {
    background: #0f172a;
    border-color: #ef4444;
    box-shadow: 0 0 0 .2rem rgba(239, 68, 68, .25);
    color: #fff;
}

.form-label {
    color: #d1d5db;
    font-weight: 500;
}

.btn {
    min-height: 48px;
    font-size: 16px;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
    border-radius: 999px;
    height: 44px;
    font-weight: 600;
    letter-spacing: .3px;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f87171, #ef4444);
}

.btn-outline-secondary {
    border-radius: 999px;
    height: 44px;
}

.alert-danger {
    background: rgba(220, 38, 38, .15);
    border: 1px solid rgba(220, 38, 38, .4);
    color: #fecaca;
}

.alert-success {
    background: rgba(16, 185, 129, .15);
    border: 1px solid rgba(16, 185, 129, .4);
    color: #a7f3d0;
}

.list-group-item {
    background: #0f172a;
    border: 1px solid #1f2937;
    color: #e5e7eb;
    border-radius: 10px !important;
    margin-bottom: 8px;
    transition: .15s ease;
}

.list-group-item:hover {
    border-color: #ef4444;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,.4);
}

.list-group-item input[type="radio"] {
    transform: scale(1.2);
    accent-color: #ef4444;
}

.small {
    font-size: .85rem;
}

.auth-logo {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: .4px;
    margin-bottom: 18px;
}

.password-toggle {
    cursor: pointer;
    user-select: none;
}

.form-note-link {
    font-size: .95rem;
}

@media (max-width: 576px) {
    .auth-page-wrap {
        padding: 0;
        align-items: stretch;
    }

    .login-card {
        max-width: none;
        min-height: 100vh;
        border-radius: 0;
        padding: 24px 18px 32px;
    }

    .form-control,
    .btn {
        min-height: 54px;
        font-size: 16px;
    }

    h3 {
        font-size: 1.6rem;
    }
}

body.view-b-shell.auth-shell {
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.18), transparent 30rem),
        linear-gradient(180deg, #0b1220 0%, #111827 100%);
    color: #e5e7eb;
}

.auth-page-wrap {
    width: 100%;
    padding: 1rem;
}

.auth-page-wrap-tight {
    min-height: 100vh;
    align-items: flex-start;
}

.auth-card,
.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(17, 24, 39, 0.92);
    border-radius: 22px;
    padding: 1.25rem;
    box-shadow:
        0 20px 50px rgba(0,0,0,0.45),
        inset 0 0 0 1px rgba(255,255,255,0.04);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.auth-card-wide {
    max-width: 760px;
}

.auth-card-narrow {
    max-width: 520px;
}

.auth-card-body,
.auth-card-spacious {
    width: 100%;
}

.auth-card-spacious {
    padding: 0.5rem 0;
}

.auth-card-head {
    margin-bottom: 1rem;
}

.auth-brand-mark,
.auth-icon-badge {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--vn-accent), var(--vn-accent-dark));
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.28);
}

.auth-icon-badge-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.24);
}

.auth-subcard {
    border-color: rgba(255,255,255,0.08) !important;
}

.auth-subcard-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
}

.auth-actions-row {
    flex-wrap: wrap;
}

.auth-actions-row > * {
    flex: 1 1 auto;
}

.auth-actions-stack .btn,
.auth-actions-row .btn {
    min-height: 50px;
}

.auth-choice-list {
    gap: 0.75rem;
    display: grid;
}

.auth-choice-item {
    margin-bottom: 0 !important;
    padding: 1rem;
}

.auth-choice-item .form-check-input {
    flex: 0 0 auto;
}

.auth-shell .text-muted,
.auth-shell .form-text {
    color: #9ca3af !important;
}

.auth-shell .form-control,
.auth-shell .form-select {
    background: #0f172a;
    border: 1px solid #243042;
    color: #e5e7eb;
}

.auth-shell .form-control:focus,
.auth-shell .form-select:focus {
    background: #0f172a;
    color: #fff;
}

.auth-shell .form-label {
    color: #d1d5db;
}

.auth-shell .btn-outline-secondary,
.auth-shell .btn-outline-primary {
    color: #dbe4f0;
    border-color: rgba(255,255,255,0.18);
}

.auth-shell .btn-outline-secondary:hover,
.auth-shell .btn-outline-primary:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.25);
}

.auth-shell .btn-link {
    color: #c7d2fe;
}

.auth-card-light {
    background: rgba(255, 255, 255, 0.98);
    color: var(--vn-dark);
    box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}

.auth-card-light h1,
.auth-card-light h2,
.auth-card-light h3 {
    color: var(--vn-dark);
}

.auth-card-light .text-muted,
.auth-card-light .form-text {
    color: var(--vn-muted) !important;
}

.auth-card-light .form-control,
.auth-card-light .form-select {
    background: #ffffff;
    border: 1px solid #d7dde6;
    color: var(--vn-dark);
}

.auth-card-light .form-control:focus,
.auth-card-light .form-select:focus {
    background: #ffffff;
    color: var(--vn-dark);
}

.auth-card-light .form-label {
    color: var(--vn-dark);
}

.auth-brand-mark-warm {
    background: linear-gradient(135deg, #ef4444, #fb7185);
}

.signup-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

@media (max-width: 576px) {
    .auth-card,
    .login-card {
        padding: 1rem;
        border-radius: 18px;
    }

    .auth-page-wrap-tight {
        padding: 0.75rem;
    }

    .auth-actions-row {
        flex-direction: column;
    }

    .auth-actions-row > * {
        width: 100%;
    }

    .auth-choice-item {
        padding: 0.9rem;
    }
}
