@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --auth-primary: #4361ee;
    --auth-primary-hover: #3a0ca3;
    --auth-primary-glow: rgba(67, 97, 238, 0.28);
    --auth-secondary: #4cc9f0;
    --auth-accent: #7209b7;
    --auth-bg-gradient: linear-gradient(135deg, #0b0f19 0%, #111827 50%, #1e1b4b 100%);
    --auth-surface: #ffffff;
    --auth-surface-alt: #f8fafc;
    --auth-text-main: #0f172a;
    --auth-text-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-border-focus: #4361ee;
    --auth-error: #ef4444;
    --auth-error-bg: #fef2f2;
    --auth-success: #10b981;
    --auth-success-bg: #ecfdf5;
    --auth-radius-lg: 24px;
    --auth-radius-md: 14px;
    --auth-radius-sm: 10px;
    --auth-shadow-card: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
    --auth-shadow-input: 0 2px 6px rgba(15, 23, 42, 0.04);
    --auth-shadow-btn: 0 10px 25px -5px rgba(67, 97, 238, 0.4);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #0b0f19;
    color: var(--auth-text-main);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background animated glow orbs */
body::before,
body::after {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.25;
    animation: orbFloat 18s ease-in-out infinite alternate;
}

body::before {
    background: radial-gradient(circle, #4361ee 0%, #3a0ca3 100%);
    top: -150px;
    left: -150px;
}

body::after {
    background: radial-gradient(circle, #4cc9f0 0%, #7209b7 100%);
    bottom: -150px;
    right: -150px;
    animation-delay: -9s;
}

@keyframes orbFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(60px, 40px) scale(1.08);
    }
    100% {
        transform: translate(-40px, 70px) scale(0.95);
    }
}

/* Auth Main Layout */
.auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
    position: relative;
    z-index: 2;
}

.auth-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Card Container */
.auth-card {
    background: var(--auth-surface);
    border-radius: var(--auth-radius-lg);
    box-shadow: var(--auth-shadow-card);
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    animation: authCardIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes authCardIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================================================
   Left Brand / Hero Panel
========================================================= */
.auth-brand-side {
    flex: 1 1 45%;
    min-width: 320px;
    background: linear-gradient(145deg, #111827 0%, #1e1b4b 60%, #0f172a 100%);
    color: #ffffff;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 40px;
    overflow: hidden;
}

.auth-brand-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(67, 97, 238, 0.25) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(76, 201, 240, 0.2) 0%, transparent 40%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px;
    pointer-events: none;
}

.auth-brand-top {
    position: relative;
    z-index: 2;
}

.auth-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #93c5fd;
    text-transform: uppercase;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.auth-brand-badge i {
    color: #60a5fa;
}

.auth-logo-wrapper {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 16px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 24px;
    max-width: 100%;
}

.auth-logo-wrapper img {
    max-height: 54px;
    max-width: 220px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.auth-brand-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 10px 0;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.auth-brand-subtitle {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 30px;
}

/* Features list in hero panel */
.auth-features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 35px 0;
    position: relative;
    z-index: 2;
}

.auth-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.auth-feature-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 10px;
    background: rgba(67, 97, 238, 0.18);
    border: 1px solid rgba(67, 97, 238, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    font-size: 13px;
}

.auth-feature-text {
    flex: 1;
}

.auth-feature-title {
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0 0 2px 0;
}

.auth-feature-desc {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
}

/* Hero Footer: Address & Social */
.auth-brand-bottom {
    position: relative;
    z-index: 2;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-brand-address {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.auth-brand-address i {
    color: #38bdf8;
    margin-top: 3px;
}

.auth-social-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-social-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-social-btn:hover {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.35);
    text-decoration: none;
}

/* =========================================================
   Right Form Panel
========================================================= */
.auth-form-side {
    flex: 1 1 55%;
    min-width: 320px;
    padding: 50px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
    position: relative;
}

.auth-form-header {
    margin-bottom: 32px;
}

.auth-form-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--auth-primary);
    margin-bottom: 8px;
}

.auth-form-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--auth-text-main);
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.auth-form-subtitle {
    font-size: 14px;
    color: var(--auth-text-muted);
    margin: 0;
}

/* =========================================================
   Inputs & Form Controls
========================================================= */
.auth-field-group {
    margin-bottom: 22px;
    position: relative;
}

.auth-field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

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

.auth-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 3;
}

.auth-input-control {
    width: 100% !important;
    height: 48px !important;
    background: #f8fafc !important;
    border: 1.5px solid var(--auth-border) !important;
    border-radius: var(--auth-radius-md) !important;
    padding: 0 44px 0 46px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--auth-text-main) !important;
    font-family: inherit !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: var(--auth-shadow-input);
}

.auth-input-control::placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}

.auth-input-control:hover {
    border-color: #cbd5e1 !important;
    background: #ffffff !important;
}

.auth-input-control:focus {
    background: #ffffff !important;
    border-color: var(--auth-primary) !important;
    box-shadow: 0 0 0 4px var(--auth-primary-glow) !important;
    outline: none !important;
}

.auth-field-group:focus-within .auth-input-icon {
    color: var(--auth-primary);
}

/* Password Toggle Icon */
.auth-password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 15px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    transition: all 0.2s ease;
}

.auth-password-toggle:hover {
    color: var(--auth-primary);
    background: #f1f5f9;
}

/* Error States */
.auth-field-group.has-error .auth-input-control {
    border-color: var(--auth-error) !important;
    background: #fffafa !important;
}

.auth-field-group.has-error .auth-input-icon {
    color: var(--auth-error) !important;
}

.auth-error-text {
    display: block;
    color: var(--auth-error);
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    padding-left: 4px;
}

span.error {
    display: block;
    color: var(--auth-error);
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    padding-left: 4px;
}

/* =========================================================
   Remember & Forgot Links
========================================================= */
.auth-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
    font-size: 13px;
}

/* Custom Checkbox */
.auth-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
}

.auth-checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    background: #f8fafc;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    margin: 0;
}

.auth-checkbox-label input[type="checkbox"]:checked {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
}

.auth-checkbox-label input[type="checkbox"]:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 10px;
}

.auth-checkbox-label input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px var(--auth-primary-glow);
    outline: none;
}

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

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

/* =========================================================
   Buttons & Actions
========================================================= */
.auth-btn-primary {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    border: none;
    border-radius: var(--auth-radius-md);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: var(--auth-shadow-btn);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.auth-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.auth-btn-primary:hover {
    background: linear-gradient(135deg, #3b5bdb 0%, #2f0789 100%);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -6px rgba(67, 97, 238, 0.5);
    color: #ffffff;
    text-decoration: none;
}

.auth-btn-primary:hover::before {
    left: 100%;
}

.auth-btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 6px 15px -4px rgba(67, 97, 238, 0.4);
}

.auth-btn-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #64748b;
    font-weight: 600;
    font-size: 13px;
    margin-top: 18px;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 100%;
    padding: 8px 0;
}

.auth-btn-back:hover {
    color: var(--auth-primary);
    text-decoration: none;
    transform: translateX(-3px);
}

/* =========================================================
   Alert Banners & Notifications
========================================================= */
.auth-alert-banner {
    border-radius: var(--auth-radius-md);
    padding: 14px 18px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    line-height: 1.5;
}

.auth-alert-banner.success {
    background: var(--auth-success-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #065f46;
}

.auth-alert-banner.danger,
.auth-alert-banner.error {
    background: var(--auth-error-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #991b1b;
}

.auth-alert-banner.info {
    background: #eff6ff;
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #1e40af;
}

.auth-alert-banner i {
    font-size: 16px;
    margin-top: 2px;
}

.alert-msg {
    border-radius: var(--auth-radius-md);
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 13px;
    font-weight: 500;
    background: var(--auth-success-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #065f46;
    text-align: center;
}

.alert-msg.danger {
    background: var(--auth-error-bg);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #991b1b;
}

/* Forgot Info Box */
.auth-info-card {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: var(--auth-radius-md);
    padding: 18px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-info-card-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--auth-primary);
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.auth-info-card-text {
    flex: 1;
}

.auth-info-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--auth-text-main);
    margin: 0 0 2px 0;
}

.auth-info-card-desc {
    font-size: 12px;
    color: var(--auth-text-muted);
    margin: 0;
}

/* =========================================================
   Footer / Trust Badges
========================================================= */
.auth-form-footer {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.auth-security-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.auth-security-badge i {
    color: #10b981;
}

.auth-footer-copy {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
}

/* =========================================================
   SweetAlert Overrides for sleek toast
========================================================= */
.swal2-popup.swal2-toast {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e2e8f0 !important;
}

/* =========================================================
   Responsive Breakpoints
========================================================= */
@media (max-width: 991px) {
    .auth-card {
        flex-direction: column;
        border-radius: 20px;
    }

    .auth-brand-side {
        padding: 36px 28px;
    }

    .auth-features-list {
        display: none;
    }

    .auth-form-side {
        padding: 40px 28px;
    }
}

@media (max-width: 576px) {
    .auth-main {
        padding: 15px 10px;
    }

    .auth-brand-side {
        padding: 30px 20px;
    }

    .auth-brand-title {
        font-size: 22px;
    }

    .auth-form-side {
        padding: 30px 20px;
    }

    .auth-form-title {
        font-size: 22px;
    }

    .auth-options-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}