/* ==========================================================================
   DelltonPlus Auth - Modern Auth Pages Design System
   Ported from OnePlateform.UI.Auth
   ========================================================================== */

:root {
    --auth-primary: #6366f1;
    --auth-primary-dark: #4f46e5;
    --auth-primary-light: #818cf8;
    --auth-secondary: #0ea5e9;
    --auth-accent: #f43f5e;

    --auth-bg: #0f172a;
    --auth-bg-card: #1e293b;
    --auth-bg-input: #334155;
    --auth-border: #475569;
    --auth-text: #f8fafc;
    --auth-text-muted: #94a3b8;
    --auth-text-secondary: #cbd5e1;

    --auth-gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --auth-gradient-bg: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    --auth-gradient-glow: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    background: var(--auth-bg);
    background-image: var(--auth-gradient-bg);
    position: relative;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50vh;
    background: var(--auth-gradient-glow);
    pointer-events: none;
}

.auth-bg-shapes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.auth-bg-shapes .shape { position: absolute; border-radius: 50%; opacity: 0.05; animation: float 20s infinite ease-in-out; }
.auth-bg-shapes .shape-1 { width: 600px; height: 600px; background: var(--auth-primary); top: -200px; right: -200px; animation-delay: 0s; }
.auth-bg-shapes .shape-2 { width: 400px; height: 400px; background: var(--auth-secondary); bottom: -100px; left: -100px; animation-delay: -5s; }
.auth-bg-shapes .shape-3 { width: 300px; height: 300px; background: var(--auth-accent); top: 50%; left: 30%; animation-delay: -10s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25%      { transform: translate(30px, -30px) rotate(5deg); }
    50%      { transform: translate(-20px, 20px) rotate(-5deg); }
    75%      { transform: translate(20px, 10px) rotate(3deg); }
}

.auth-container { display: flex; width: 100%; min-height: 100vh; position: relative; z-index: 1; }

.auth-branding {
    flex: 1;
    display: none;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    position: relative;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-right: 1px solid rgba(99, 102, 241, 0.1);
}

@media (min-width: 1024px) { .auth-branding { display: flex; } }

.auth-branding-content { max-width: 500px; }

.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 48px; }

.auth-logo-icon {
    width: 48px; height: 48px;
    background: var(--auth-gradient-primary);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: white;
}

.auth-logo-text { font-size: 24px; font-weight: 700; color: var(--auth-text); letter-spacing: -0.5px; }

.auth-branding h1 {
    font-size: 3rem; font-weight: 800; line-height: 1.1;
    color: var(--auth-text); margin-bottom: 24px;
    background: var(--auth-gradient-primary);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.auth-branding p { font-size: 1.125rem; color: var(--auth-text-muted); line-height: 1.7; margin-bottom: 40px; }

.auth-features { display: flex; flex-direction: column; gap: 20px; }

.auth-feature { display: flex; align-items: flex-start; gap: 16px; }

.auth-feature-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.15);
    display: flex; align-items: center; justify-content: center;
    color: var(--auth-primary-light); font-size: 20px; flex-shrink: 0;
}

.auth-feature-text h4 { font-size: 1rem; font-weight: 600; color: var(--auth-text); margin: 0 0 4px 0; }
.auth-feature-text p  { font-size: 0.875rem; color: var(--auth-text-muted); margin: 0; }

.auth-form-section { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-form-container { width: 100%; max-width: 420px; }
.auth-form-header { text-align: center; margin-bottom: 32px; }

.auth-form-header .mobile-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 32px; }

@media (min-width: 1024px) { .auth-form-header .mobile-logo { display: none; } }

.auth-form-header h2 { font-size: 1.75rem; font-weight: 700; color: var(--auth-text); margin: 0 0 8px 0; }
.auth-form-header p  { font-size: 1rem; color: var(--auth-text-muted); margin: 0; }

.auth-card {
    background: var(--auth-bg-card);
    border: 1px solid var(--auth-border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-form-group { margin-bottom: 20px; }
.auth-form-group label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--auth-text-secondary); margin-bottom: 8px; }

.auth-input-wrapper { position: relative; }

.auth-input-wrapper .input-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--auth-text-muted); font-size: 18px; pointer-events: none;
}

.auth-input {
    width: 100%; height: 48px;
    background: var(--auth-bg-input);
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    padding: 0 16px 0 46px;
    font-size: 0.95rem;
    color: var(--auth-text);
    transition: all 0.2s;
}

.auth-input::placeholder { color: var(--auth-text-muted); }
.auth-input:focus { outline: none; border-color: var(--auth-primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); }
.auth-input.error { border-color: var(--auth-accent); }

.password-toggle {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--auth-text-muted);
    cursor: pointer; padding: 4px;
    display: flex; align-items: center; justify-content: center;
}

.password-toggle:hover { color: var(--auth-text); }

.auth-checkbox-group { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.auth-checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.auth-checkbox input { width: 18px; height: 18px; accent-color: var(--auth-primary); }
.auth-checkbox span { font-size: 0.875rem; color: var(--auth-text-secondary); }

.auth-link { font-size: 0.875rem; color: var(--auth-primary-light); text-decoration: none; transition: color 0.2s; }
.auth-link:hover { color: var(--auth-primary); text-decoration: underline; }

.auth-btn {
    width: 100%; height: 50px;
    background: var(--auth-gradient-primary);
    border: none; border-radius: 10px;
    font-size: 1rem; font-weight: 600; color: white;
    cursor: pointer; transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}

.auth-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4); }
.auth-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.auth-btn .spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white; border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.auth-divider { display: flex; align-items: center; gap: 16px; margin: 24px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--auth-border); }
.auth-divider span { font-size: 0.8rem; color: var(--auth-text-muted); text-transform: uppercase; letter-spacing: 1px; }

.auth-social-btns { display: flex; gap: 12px; }

.auth-social-btn {
    flex: 1; height: 46px;
    background: var(--auth-bg-input);
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 0.9rem; font-weight: 500; color: var(--auth-text-secondary);
    cursor: pointer; transition: all 0.2s;
}

.auth-social-btn:hover { background: var(--auth-border); border-color: var(--auth-text-muted); }

.auth-footer { text-align: center; margin-top: 24px; }
.auth-footer p { font-size: 0.9rem; color: var(--auth-text-muted); margin: 0; }
.auth-footer a { color: var(--auth-primary-light); text-decoration: none; font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }

.auth-error {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.3);
    border-radius: 8px; padding: 12px 16px; margin-bottom: 20px;
    display: flex; align-items: center; gap: 10px;
    font-size: 0.875rem; color: #fca5a5;
}

.auth-error i { color: var(--auth-accent); }

.auth-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px; padding: 12px 16px; margin-bottom: 20px;
    display: flex; align-items: center; gap: 10px;
    font-size: 0.875rem; color: #6ee7b7;
}

.validation-message {
    font-size: 0.8rem; color: #fca5a5;
    margin-top: 6px; display: flex; align-items: center; gap: 4px;
}

@media (max-width: 480px) {
    .auth-card { padding: 24px 20px; }
    .auth-form-header h2 { font-size: 1.5rem; }
    .auth-social-btns { flex-direction: column; }
}

/* Source-app banner shown when user is redirected from a client app for SSO sign-in. */
.auth-source-app { display:flex; align-items:center; gap:10px; padding:12px 16px; margin:0 0 18px; border-radius:10px; background:rgba(99,102,241,0.08); border:1px solid rgba(99,102,241,0.18); color:#4f46e5; font-size:0.9rem; }
.auth-source-app i { font-size:1.15rem; }
.auth-source-app strong { color:#3730a3; font-weight:600; }
