/* ========================================================================
   AUTH.CSS - Modern Split-Screen Authentication Design
   Premium Login & Registration Styling
   ======================================================================== */

/* ==========================================================================
   SPLIT-SCREEN CONTAINER
   ========================================================================== */

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* ==========================================================================
   VISUAL SIDE (LEFT PANEL)
   ========================================================================== */

.auth-visual-side {
    position: relative;
    background: linear-gradient(135deg, #0F172A 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    overflow: hidden;
}

/* Animated gradient overlay */
.auth-visual-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(14, 165, 233, 0.3) 0%,
            rgba(56, 189, 248, 0.3) 50%,
            rgba(125, 211, 252, 0.3) 100%);
    animation: gradientShift 15s ease infinite;
    opacity: 0.7;
}

@keyframes gradientShift {

    0%,
    100% {
        transform: translateX(-10%) translateY(-10%) scale(1.1);
    }

    50% {
        transform: translateX(10%) translateY(10%) scale(1.2);
    }
}

/* Background pattern overlay */
.auth-visual-side::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(56, 189, 248, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(125, 211, 252, 0.2) 0%, transparent 50%);
    animation: patternMove 20s ease infinite;
}

@keyframes patternMove {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* Visual content wrapper */
.auth-visual-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 500px;
    animation: fadeInUp 1s ease-out;
}

.auth-visual-content .logo {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #7dd3fc, #38bdf8, #0ea5e9);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    animation: shimmerText 3s ease-in-out infinite;
}

@keyframes shimmerText {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.3);
    }
}

.auth-visual-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.auth-visual-content p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Floating particles */
.auth-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float linear infinite;
}

.particle:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 10%;
    animation-duration: 15s;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 80%;
    animation-duration: 20s;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 100px;
    height: 100px;
    top: 80%;
    left: 20%;
    animation-duration: 25s;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    width: 40px;
    height: 40px;
    top: 30%;
    left: 70%;
    animation-duration: 18s;
    animation-delay: 1s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0.3;
    }

    25% {
        transform: translateY(-30px) translateX(20px) rotate(90deg);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-60px) translateX(-20px) rotate(180deg);
        opacity: 0.3;
    }

    75% {
        transform: translateY(-30px) translateX(-40px) rotate(270deg);
        opacity: 0.6;
    }
}

/* ==========================================================================
   FORM SIDE (RIGHT PANEL)
   ========================================================================== */

/* ==========================================================================
   FORM SIDE (RIGHT PANEL)
   ========================================================================== */

.auth-form-side {
    position: relative;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

/* Container for form content - No longer a floating card */
.auth-form-container {
    width: 100%;
    /* max-width removed */
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
    animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form header */
.auth-form-header {
    text-align: center;
    margin-bottom: 0.85rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.auth-form-header .icon-wrapper {
    width: 25px;
    height: 25px;
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.25rem;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(8, 145, 178, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(8, 145, 178, 0.4);
    }
}

.auth-form-header .icon-wrapper i {
    font-size: 0.7rem;
    color: white;
}

.auth-form-header h2 {
    font-size: 0.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.15rem;
}

.auth-form-header p {
    color: #64748b;
    font-size: 0.65rem;
}

/* Form groups */
.auth-form-group {
    margin-bottom: 0.85rem;
    animation: fadeInUp 0.6s ease-out backwards;
}

.auth-form-group:nth-child(1) {
    animation-delay: 0.3s;
}

.auth-form-group:nth-child(2) {
    animation-delay: 0.4s;
}

.auth-form-group:nth-child(3) {
    animation-delay: 0.5s;
}

.auth-form-group:nth-child(4) {
    animation-delay: 0.6s;
}

.auth-form-group:nth-child(5) {
    animation-delay: 0.7s;
}

.auth-form-group:nth-child(6) {
    animation-delay: 0.8s;
}

.auth-form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #334155;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.auth-form-label i {
    color: #0ea5e9;
    font-size: 0.9rem;
}

/* Modern input styling */
.auth-form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 1rem;
    background: #f8fafc;
    color: #1e293b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.auth-form-control:focus {
    outline: none;
    border-color: #0ea5e9;
    background: white;
    box-shadow:
        0 0 0 4px rgba(14, 165, 233, 0.1),
        0 10px 20px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.auth-form-control::placeholder {
    color: #94a3b8;
}

/* Password wrapper */
.auth-password-wrapper {
    position: relative;
}

.auth-password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.auth-password-toggle:hover {
    color: #0ea5e9;
}

/* Submit button */
.auth-submit-btn {
    width: 100%;
    padding: 1.125rem 2rem;
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
    animation: fadeInUp 0.6s ease-out 0.9s backwards;
}

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

.auth-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(8, 145, 178, 0.35);
}

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

.auth-submit-btn:active {
    transform: translateY(-1px);
}

.auth-submit-btn i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.auth-submit-btn:hover i {
    transform: translateX(5px);
}

/* Form footer */
.auth-form-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    animation: fadeInUp 0.6s ease-out 1s backwards;
}

.auth-form-footer p {
    color: #64748b;
    font-size: 0.95rem;
    margin: 0;
}

.auth-form-footer a {
    color: #0ea5e9;
    font-weight: 600;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.auth-form-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0ea5e9;
    transition: width 0.3s ease;
}

.auth-form-footer a:hover::after {
    width: 100%;
}

/* Alert messages */
.auth-alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.auth-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.auth-alert i {
    font-size: 1.25rem;
}

/* Checkbox styling */
.auth-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out 0.8s backwards;
}

.auth-checkbox {
    width: 20px;
    height: 20px;
    accent-color: #0ea5e9;
    cursor: pointer;
}

.auth-checkbox-label {
    color: #475569;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

/* Password strength indicator */
.auth-password-strength {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-top: 0.75rem;
    overflow: hidden;
}

.auth-password-strength-bar {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-weak {
    width: 33%;
    background: linear-gradient(to right, #ef4444, #f97316);
}

.strength-medium {
    width: 66%;
    background: linear-gradient(to right, #f59e0b, #eab308);
}

.strength-strong {
    width: 100%;
    background: linear-gradient(to right, #10b981, #059669);
}

/* Scrollable form area for registration */
.auth-form-scrollable {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    padding-right: 0.5rem;
}

.auth-form-scrollable::-webkit-scrollbar {
    width: 6px;
}

.auth-form-scrollable::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.auth-form-scrollable::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
    border-radius: 3px;
}

.auth-form-scrollable::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0284c7, #06b6d4);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-visual-side {
        min-height: 35vh;
        padding: 2.5rem 2rem;
    }

    .auth-visual-content .logo {
        font-size: 2.5rem;
    }

    .auth-visual-content h1 {
        font-size: 2rem;
    }

    .auth-visual-content p {
        font-size: 1rem;
    }

    .auth-form-side {
        padding: 2.5rem 2rem;
    }

    .auth-form-container {
        max-width: 95%;
        padding: 2rem 1.75rem;
    }
}

@media (max-width: 768px) {
    .auth-visual-side {
        min-height: 30vh;
        padding: 2rem 1.5rem;
    }

    .auth-visual-content .logo {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .auth-visual-content h1 {
        font-size: 1.5rem;
        margin-bottom: 0.85rem;
    }

    .auth-visual-content p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .auth-form-side {
        padding: 2rem 1.5rem;
    }

    .auth-form-container {
        max-width: 100%;
        padding: 1.75rem 1.5rem;
        border-radius: 18px;
    }

    .auth-form-header h2 {
        font-size: 1.1rem;
    }

    .auth-form-header .icon-wrapper {
        width: 45px;
        height: 45px;
    }

    .auth-form-header .icon-wrapper i {
        font-size: 1.1rem;
    }

    .auth-form-header p {
        font-size: 0.8rem;
    }

    .particle {
        display: none;
    }
}

@media (max-width: 480px) {
    .auth-visual-side {
        min-height: 25vh;
        padding: 1.5rem 1.25rem;
    }

    .auth-visual-content .logo {
        font-size: 1.75rem;
    }

    .auth-visual-content h1 {
        font-size: 1.25rem;
    }

    .auth-visual-content p {
        font-size: 0.85rem;
    }

    .auth-form-side {
        padding: 1.5rem 1.25rem;
    }

    .auth-form-container {
        max-width: 100%;
        padding: 1.25rem 1rem;
        border-radius: 16px;
    }

    .auth-form-header {
        margin-bottom: 1rem;
    }

    .auth-form-header .icon-wrapper {
        width: 35px;
        height: 35px;
    }

    .auth-form-header .icon-wrapper i {
        font-size: 0.9rem;
    }

    .auth-form-header h2 {
        font-size: 0.95rem;
    }

    .auth-form-header p {
        font-size: 0.75rem;
    }

    .auth-form-group {
        margin-bottom: 1rem;
    }

    .auth-form-control {
        padding: 0.9rem 1rem;
        font-size: 0.95rem;
    }

    .auth-submit-btn {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }

    .auth-form-footer {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }

    .auth-form-footer p {
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   ACCESSIBILITY & REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}