/**
 * auth.css — Login, register, set-password, confirmation
 * Source : auth/login.blade.php, auth/register.blade.php, auth/register-mn.blade.php,
 *          auth/register-confirmation.blade.php
 */

/* ===== Login page (auth/login) ===== */
.login-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}

/* ===== Clarity Login (clarity/login) ===== */
.login-container {
    min-height: calc(100vh - 80px - 300px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 4rem 0;
}
.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
}
.login-header {
    background: var(--primary-color);
    color: white;
    padding: 2rem;
    text-align: center;
}
.login-body {
    padding: 2.5rem;
}
.login-body .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.login-body .form-control {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color, #e2e8f0);
}
.login-body .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.btn-login {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    width: 100%;
    transition: all 0.3s;
}
.btn-login:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* ===== Register wrapper (shared family + MN) ===== */
.register-wrapper {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}
.register-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 2.5rem;
    max-width: 520px;
    width: 100%;
}
.register-header {
    text-align: center;
    margin-bottom: 2rem;
}
.register-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}
.register-header p {
    color: #6c757d;
    font-size: 0.95rem;
}
.register-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.75rem;
    color: white;
}
.info-box {
    background: #eff6ff;
    border-left: 4px solid #4f46e5;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #1e40af;
}
.info-box i { margin-right: 6px; }

/* ===== Register MN specific ===== */
.register-wrapper--mn {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}
.register-card--mn {
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    max-width: 640px;
}
.register-icon--mn {
    background: linear-gradient(135deg, #0f172a, #06b6d4);
}
.info-box--mn {
    background: #f0fdfa;
    border-left-color: #06b6d4;
    color: #0e7490;
}
.section-title--auth {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #06b6d4;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0fdfa;
}
.advantages-list {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.advantage-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #6c757d;
}
.advantage-item i { color: #06b6d4; }

/* ===== Register confirmation ===== */
.confirm-wrapper {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}
.confirm-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 3rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
}
.confirm-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981, #06b6d4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: white;
}
.email-highlight {
    background: #f1f3f5;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    display: inline-block;
    margin: 0.5rem 0;
}

/* ===== Set password page (auth/set-password) ===== */
body:has(.card > .logo) {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}
.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 2.5rem;
    max-width: 460px;
    width: 100%;
    margin: 1rem;
}
.card .logo {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 0.5rem;
}
.card .icon {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}
.card h1 {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
}
.card .subtitle {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}
.card .form-group {
    margin-bottom: 1rem;
}
.card .form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #374151;
    margin-bottom: 0.4rem;
}
.card .form-group input[type="password"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.card .form-group input[type="password"]:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
.card .error-text {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 0.3rem;
    min-height: 1rem;
}
.card .server-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    color: #dc2626;
    font-size: 0.85rem;
}
.card .password-rules {
    background: #f8fafc;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}
.card .password-rules p {
    font-weight: 600;
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}
.card .rule {
    font-size: 0.85rem;
    padding: 0.25rem 0;
    color: #94a3b8;
    transition: color 0.2s;
}
.card .rule.valid {
    color: #10b981;
}
.card .rule.valid::before {
    content: "✓ ";
}
.card .rule:not(.valid)::before {
    content: "○ ";
}
.card .btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card .btn:hover:not(:disabled) {
    background: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.card .btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

/* Toast */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}
.toast.success {
    background: #10b981;
    color: white;
}
.toast.error {
    background: #dc2626;
    color: white;
}

/* ===== Set password — Mobile responsive ===== */
@media (max-width: 480px) {
    .card {
        margin: 0.75rem;
        padding: 1.5rem;
        border-radius: 12px;
    }
    .card .logo {
        font-size: 1.25rem;
    }
    .card .icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    .card h1 {
        font-size: 1.1rem;
    }
    .card .subtitle {
        font-size: 0.85rem;
    }
    .card .form-group input[type="password"] {
        padding: 0.65rem 0.85rem;
        font-size: 1rem; /* prevent zoom on iOS */
    }
    .card .password-rules {
        padding: 0.75rem;
    }
}
