/* ==========================================================================
   Swift SMS Sender - Modern SaaS Authentication Design System
   Matches Landing Page Aesthetics (Plus Jakarta Sans, Slate / Navy / Primary Blue)
   ========================================================================== */

:root {
    --auth-primary: #2563EB;
    --auth-primary-hover: #1D4ED8;
    --auth-primary-light: #EFF6FF;
    --auth-accent-violet: #6366F1;
    --auth-navy: #0F172A;
    --auth-navy-dark: #090D16;
    --auth-text-body: #334155;
    --auth-text-muted: #64748B;
    --auth-border: #E2E8F0;
    --auth-bg-light: #F8FAFC;
    --auth-card-bg: #FFFFFF;
    --auth-success: #10B981;
    --auth-danger: #EF4444;
    --auth-radius-lg: 20px;
    --auth-radius-md: 12px;
    --auth-radius-sm: 8px;
    --auth-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body.swift-auth-body {
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--auth-bg-light);
    color: var(--auth-text-body);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Split Layout Architecture
   ========================================================================== */
.swift-auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* Left Hero Branding Sidebar */
.swift-auth-sidebar {
    flex: 0 0 44%;
    max-width: 580px;
    background: linear-gradient(150deg, #090D16 0%, #0F172A 55%, #1E1B4B 100%);
    color: #FFFFFF;
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.swift-auth-sidebar::before {
    content: '';
    position: absolute;
    top: -15%;
    right: -20%;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.22) 0%, rgba(99, 102, 241, 0.08) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
}

.swift-auth-sidebar::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: -20%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, rgba(37, 99, 235, 0.05) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
}

.swift-sidebar-header {
    position: relative;
    z-index: 2;
}

.swift-sidebar-logo {
    display: inline-block;
    background: #FFFFFF;
    padding: 7px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    margin-bottom: 24px;
}

.swift-sidebar-logo img {
    height: 40px;
    width: auto;
    display: block;
}

.swift-sidebar-content {
    position: relative;
    z-index: 2;
    margin: 40px 0;
}

.swift-sidebar-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 9999px;
    background: rgba(37, 99, 235, 0.2);
    border: 1px solid rgba(37, 99, 235, 0.35);
    color: #93C5FD;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.swift-sidebar-badge span.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38BDF8;
    box-shadow: 0 0 10px #38BDF8;
}

.swift-sidebar-title {
    font-size: 2.15rem;
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.025em;
    color: #FFFFFF;
    margin-bottom: 18px;
}

.swift-sidebar-title span.gradient-text {
    background: linear-gradient(135deg, #60A5FA 0%, #A78BFA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.swift-sidebar-desc {
    color: #94A3B8;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 32px;
}

.swift-sidebar-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.swift-sidebar-features li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 0.9375rem;
    color: #E2E8F0;
    line-height: 1.45;
}

.swift-sidebar-features .feature-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38BDF8;
    flex-shrink: 0;
}

.swift-sidebar-footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
}

.swift-sidebar-org {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8125rem;
    color: #94A3B8;
}

.swift-sidebar-org svg {
    color: #38BDF8;
    flex-shrink: 0;
}

/* ==========================================================================
   Right Main Form Area
   ========================================================================== */
.swift-auth-main {
    flex: 1 1 56%;
    background-color: var(--auth-bg-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 32px 28px;
    position: relative;
}

.swift-auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 520px;
    margin: 0 auto 16px;
}

.swift-auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--auth-text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--auth-radius-sm);
    transition: var(--auth-transition);
}

.swift-auth-back-link:hover {
    color: var(--auth-primary);
    background: rgba(37, 99, 235, 0.06);
}

.swift-auth-top-action {
    font-size: 0.875rem;
    color: var(--auth-text-muted);
}

.swift-auth-top-action a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
}

.swift-auth-top-action a:hover {
    text-decoration: underline;
}

/* Centered Form Card */
.swift-auth-card-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 0;
}

.swift-auth-card {
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-lg);
    box-shadow: 0 20px 45px -12px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
    padding: 40px;
    width: 100%;
    max-width: 480px;
    transition: var(--auth-transition);
}

.swift-auth-card.wide {
    max-width: 560px;
    padding: 38px 40px;
}

.swift-auth-mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 24px;
}

.swift-auth-mobile-logo img {
    height: 42px;
    width: auto;
    background: #FFFFFF;
    padding: 4px 12px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.swift-auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.swift-auth-header h1 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--auth-navy);
    letter-spacing: -0.025em;
    margin: 0 0 8px 0;
}

.swift-auth-header p {
    color: var(--auth-text-muted);
    font-size: 0.9375rem;
    margin: 0;
    line-height: 1.5;
}

/* Validation Alerts */
.swift-auth-alert {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    border-radius: var(--auth-radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.875rem;
    color: #B91C1C;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.swift-auth-alert ul {
    margin: 0;
    padding-left: 18px;
}

/* Form Controls & Groups */
.swift-form-group {
    margin-bottom: 20px;
    position: relative;
}

.swift-form-label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--auth-navy);
    margin-bottom: 6px;
}

.swift-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.swift-input-icon {
    position: absolute;
    left: 14px;
    color: #94A3B8;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: var(--auth-transition);
}

.swift-form-input {
    width: 100%;
    height: 46px;
    padding: 10px 14px 10px 42px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--auth-navy);
    background: #FFFFFF;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--auth-radius-md);
    transition: var(--auth-transition);
    outline: none;
}

.swift-form-input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.swift-form-input:focus + .swift-input-icon,
.swift-input-wrapper:focus-within .swift-input-icon {
    color: var(--auth-primary);
}

.swift-form-input::placeholder {
    color: #94A3B8;
    font-weight: 400;
}

.swift-form-input.is-invalid {
    border-color: var(--auth-danger);
    background: #FFFDFD;
}

.swift-form-input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.swift-password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: var(--auth-transition);
}

.swift-password-toggle:hover {
    color: var(--auth-navy);
    background: #F1F5F9;
}

.swift-field-error {
    display: block;
    font-size: 0.775rem;
    font-weight: 500;
    color: var(--auth-danger);
    margin-top: 5px;
    padding-left: 2px;
}

/* Two-column field grid for Register form */
.swift-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Checkbox & Forgot Password Row */
.swift-form-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.85rem;
}

.swift-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    color: var(--auth-text-body);
    font-weight: 500;
}

.swift-checkbox-input {
    width: 17px;
    height: 17px;
    border-radius: 4px;
    accent-color: var(--auth-primary);
    cursor: pointer;
}

.swift-forgot-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--auth-transition);
}

.swift-forgot-link:hover {
    color: var(--auth-primary-hover);
    text-decoration: underline;
}

/* Recaptcha Container */
.swift-recaptcha-wrap {
    display: flex;
    justify-content: center;
    margin: 18px 0;
    overflow-x: auto;
}

/* Submit Action Button */
.swift-submit-btn {
    width: 100%;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--auth-primary) 0%, #1D4ED8 100%);
    color: #FFFFFF;
    border: none;
    border-radius: var(--auth-radius-md);
    font-size: 0.975rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: var(--auth-transition);
    text-decoration: none;
}

.swift-submit-btn:hover {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.45);
}

.swift-submit-btn:active {
    transform: translateY(0);
}

.swift-submit-btn svg {
    transition: transform 0.2s ease;
}

.swift-submit-btn:hover svg {
    transform: translateX(3px);
}

/* Helper text / Terms */
.swift-auth-terms {
    font-size: 0.775rem;
    color: var(--auth-text-muted);
    text-align: center;
    line-height: 1.5;
    margin-top: 14px;
}

.swift-auth-terms a {
    color: var(--auth-primary);
    text-decoration: none;
}

.swift-auth-terms a:hover {
    text-decoration: underline;
}

/* Divider & Switch Form Link */
.swift-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 16px;
    color: #94A3B8;
    font-size: 0.8125rem;
}

.swift-auth-divider::before,
.swift-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.swift-auth-switch {
    text-align: center;
    font-size: 0.9rem;
    color: var(--auth-text-body);
}

.swift-auth-switch a {
    color: var(--auth-primary);
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
}

.swift-auth-switch a:hover {
    text-decoration: underline;
}

/* Bottom Bar */
.swift-auth-footer-bar {
    width: 100%;
    max-width: 520px;
    margin: 16px auto 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--auth-text-muted);
}

.swift-auth-footer-bar a {
    color: var(--auth-text-muted);
    text-decoration: none;
    margin: 0 6px;
}

.swift-auth-footer-bar a:hover {
    color: var(--auth-primary);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 992px) {
    .swift-auth-sidebar {
        display: none;
    }
    
    .swift-auth-main {
        flex: 1 1 100%;
        padding: 24px 16px;
    }
    
    .swift-auth-mobile-logo {
        display: block;
    }
    
    .swift-auth-card {
        padding: 32px 24px;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    }
}

@media (max-width: 580px) {
    .swift-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .swift-auth-card {
        padding: 24px 18px;
        border-radius: 16px;
    }
    
    .swift-auth-header h1 {
        font-size: 1.45rem;
    }
}
