@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --auth-bg: #f0f7ff;
    --card-bg: rgba(255, 255, 255, 0.7);
    --input-bg: rgba(255, 255, 255, 0.8);
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --accent: #000000;
    --border-radius: 24px;
    --card-radius: 40px;
}

body.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Plus Jakarta Sans', 'Rubik', sans-serif;
    color: var(--text-main);
    margin: 0;
    padding: 20px;
    overflow: hidden;
    position: relative;
    background: #0a1328; /* Fallback */
}

/* Floating Shapes Background */
.auth-bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    filter: blur(80px);
    opacity: 0.4;
    border-radius: 50%;
    animation: floatShape 20s infinite alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: #5aa9ff;
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #061a3a;
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: #1a2a44;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 25s;
}

@keyframes floatShape {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    100% { transform: translate(100px, 50px) rotate(90deg) scale(1.1); }
}

/* Background image with blur and dimming */
body.auth-page::after {
    content: "";
    position: fixed;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: url('../assets/img/Black and Blue Modern Technology Presentation (1).png') no-repeat center center;
    background-size: cover;
    filter: blur(10px) brightness(0.6);
    z-index: -2;
    pointer-events: none;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    perspective: 1000px;
    transition: all 0.3s ease;
    z-index: 10;
}

.auth-container.wide {
    max-width: 850px;
}

.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--card-radius);
    padding: 32px 28px;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.08),
        0 20px 40px -15px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    animation: cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-card-horizontal {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    padding: 0;
    overflow: hidden;
    align-items: stretch;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-icon-wrap {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.auth-icon-wrap i {
    font-size: 24px;
    color: var(--text-main);
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto;
}

/* Form Styling */
.auth-form-group {
    margin-bottom: 24px;
    position: relative;
}

.auth-input-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #999;
    z-index: 2;
    pointer-events: none;
    transition: all 0.3s ease;
}

html[dir="rtl"] .auth-input-icon {
    right: 20px;
}

html[dir="ltr"] .auth-input-icon {
    left: 20px;
}

.auth-input {
    width: 100%;
    height: 50px;
    background: var(--input-bg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 18px;
    padding: 0 44px;
    color: var(--text-main);
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

html[dir="rtl"] .auth-input {
    padding: 0 44px 0 16px;
}

html[dir="ltr"] .auth-input {
    padding: 0 16px 0 44px;
}

.auth-input:focus {
    background: white;
    border-color: var(--text-main);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

/* Select dropdown matches auth-input */
.auth-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 12px;
    color: var(--text-main);
}

html[dir="rtl"] .auth-select {
    background-position: left 16px center;
    padding-left: 36px;
}

html[dir="ltr"] .auth-select {
    background-position: right 16px center;
    padding-right: 36px;
}

.auth-select option {
    color: var(--text-main);
    background: white;
}

.auth-select option[value=""] {
    color: #999;
}

.auth-input:focus+.auth-password-toggle,
.auth-input:focus~.auth-password-toggle,
.auth-form-group:focus-within .auth-input-icon {
    color: var(--text-main);
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 10px;
    transition: all 0.3s ease;
    z-index: 2;
}

html[dir="rtl"] .auth-password-toggle {
    left: 10px;
}

html[dir="ltr"] .auth-password-toggle {
    right: 10px;
}

.auth-password-toggle:hover {
    color: var(--text-main);
}

.auth-link-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -12px;
    margin-bottom: 24px;
}

.auth-text-link {
    font-size: 14px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
}

.auth-text-link:hover {
    text-decoration: underline;
}

/* Primary Button */
.auth-btn-primary {
    width: 100%;
    height: 50px;
    background: linear-gradient(180deg, #333 0%, #000 100%);
    color: white;
    border: none;
    border-radius: 18px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.25);
    filter: brightness(1.1);
}

.auth-btn-primary:active {
    transform: translateY(0);
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 32px 0;
    color: #bbb;
    font-size: 14px;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
}

/* Social Buttons */
.auth-social-row {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.auth-social-btn {
    flex: 1;
    height: 50px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.auth-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    background: #fafafa;
}

.auth-social-btn img {
    width: 24px;
    height: 24px;
}

.auth-footer {
    text-align: center;
    margin-top: 32px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--text-main);
    font-weight: 600;
    text-decoration: none;
    margin-right: 4px;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-policy-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.auth-policy-btn {
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.auth-policy-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-main);
    transform: translateY(-1px);
}

.auth-sidebar {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: start;
    border-inline-end: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.auth-sidebar .auth-icon-wrap {
    margin: 0 0 24px 0;
}

.auth-sidebar .auth-title {
    font-size: 32px;
    line-height: 1.2;
}

.auth-sidebar .auth-subtitle {
    margin: 0;
    max-width: 100%;
}

.auth-testimonial {
    margin-top: auto;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    width: 100%;
}

.testimonial-text {
    font-style: italic;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eee;
    object-fit: cover;
}

.author-info h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.author-info p {
    margin: 0;
    font-size: 12px;
    color: #888;
}

.auth-back-home {
    position: absolute;
    top: 40px;
    left: 40px;
    z-index: 100;
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

html[dir="rtl"] .auth-back-home {
    left: auto;
    right: 40px;
}

.auth-back-home:hover {
    transform: translateX(-5px);
}

html[dir="rtl"] .auth-back-home:hover {
    transform: translateX(5px);
}

.auth-form-side {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Responsive Styles */
@media (max-width: 850px) {
    .auth-container.wide {
        max-width: 440px;
        padding: 0 15px;
    }

    .auth-card-horizontal {
        grid-template-columns: 1fr;
    }

    .auth-sidebar {
        display: none;
    }

    .auth-form-side {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 28px 20px;
        border-radius: 32px;
    }

    .auth-title {
        font-size: 22px;
    }

    .auth-container {
        padding: 0 10px;
    }
}