/* login.css - Login Page Styles */
/* Note: This file depends on theme.css for shared utilities */

/* ========================================
   LOGIN BODY & BACKGROUND
   ======================================== */

.login-body {
    min-height: 100vh;
    background: linear-gradient(180deg, #0a0e27 0%, #1a1f3a 100%);
    position: relative;
    overflow-x: hidden;
}

[data-bs-theme="light"] .login-body {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Animated Background */
.login-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
}

.login-background::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float1 15s ease-in-out infinite;
    filter: blur(60px);
}

.login-background::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float2 18s ease-in-out infinite;
    filter: blur(60px);
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, 50px) scale(1.1); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-50px, -50px) scale(1.1); }
}

/* ========================================
   NAVBAR
   ======================================== */

.login-body .navbar {
    backdrop-filter: blur(20px);
    background: rgba(var(--bs-body-bg-rgb), 0.8) !important;
    border-bottom: 1px solid rgba(var(--bs-primary-rgb), 0.1);
    position: relative;
    z-index: 100;
    padding: 1.25rem 0;
}

.login-body .navbar-brand {
    display: flex;
    align-items: center;
}

.login-body .navbar-brand img {
    transition: all 0.3s ease;
    height: 40px;
    width: auto;
}

.login-body .navbar-brand:hover img {
    opacity: 0.8;
    transform: scale(1.05);
}

/* ========================================
   LOGIN CONTAINER
   ======================================== */

.login-container {
    min-height: calc(100vh - 100px);
    display: flex;
    align-items: center;
    padding: 3rem 0;
    position: relative;
    z-index: 1;
}

/* ========================================
   LOGIN CARD
   ======================================== */

.login-card {
    background: rgba(var(--bs-body-bg-rgb), 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.15);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

[data-bs-theme="dark"] .login-card {
    background: rgba(15, 42, 74, 0.5);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-card::before {
    display: none;
}

.login-card:hover {
    border-color: rgba(var(--bs-primary-rgb), 0.25);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.15);
}

/* ========================================
   LOGIN HEADER
   ======================================== */

.login-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.2);
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--bs-primary);
    margin: 0 auto;
}

.login-header h2 {
    font-size: 1.75rem;
}

/* ========================================
   SOCIAL LOGIN
   ======================================== */

.btn-social {
    background: rgba(var(--bs-primary-rgb), 0.05);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.15);
    color: var(--bs-body-color);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-social:hover {
    background: rgba(var(--bs-primary-rgb), 0.1);
    border-color: rgba(var(--bs-primary-rgb), 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-social i {
    font-size: 1.25rem;
}

/* ========================================
   DIVIDER
   ======================================== */

.divider {
    position: relative;
    text-align: center;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(var(--bs-primary-rgb), 0.1);
}

.divider span {
    position: relative;
    background: rgba(var(--bs-body-bg-rgb), 0.8);
    padding: 0 1rem;
    font-size: 0.875rem;
    color: var(--bs-secondary);
    font-weight: 500;
}

/* ========================================
   FORM STYLING
   ======================================== */

.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--bs-body-color);
}

.input-group {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.input-group.focused {
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.1);
}

.input-group-text {
    background: rgba(var(--bs-primary-rgb), 0.05);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.15);
    border-right: none;
    color: var(--bs-secondary);
}

.input-group .form-control {
    border: 1px solid rgba(var(--bs-primary-rgb), 0.15);
    border-left: none;
    padding: 0.75rem 1rem;
    background: transparent;
}

.input-group .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: none;
}

.toggle-password {
    background: rgba(var(--bs-primary-rgb), 0.05);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.15);
    border-left: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

/* Form Check */
.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(var(--bs-primary-rgb), 0.3);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.form-check-label {
    font-size: 0.875rem;
    margin-left: 0.5rem;
    cursor: pointer;
}

/* Links */
.link-primary {
    color: var(--bs-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.link-primary:hover {
    color: var(--affda-purple);
    text-decoration: underline;
}

/* Submit Button */
.login-card .btn-primary {
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
}

/* ========================================
   TRUST BADGES
   ======================================== */

.trust-badges {
    position: relative;
    z-index: 1;
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(var(--bs-body-bg-rgb), 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.1);
    border-radius: 8px;
}

[data-bs-theme="dark"] .trust-item {
    background: rgba(15, 42, 74, 0.5);
}

.trust-item i {
    font-size: 1.25rem;
}

.trust-item span {
    font-weight: 500;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 767px) {
    .login-card {
        padding: 2rem 1.5rem;
    }
    
    .login-container {
        padding: 2rem 0;
    }
    
    .login-icon {
        width: 64px;
        height: 64px;
        font-size: 1.75rem;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
    
    .btn-social {
        font-size: 0.875rem;
    }
    
    .trust-badges {
        margin-top: 2rem;
    }
    
    .trust-item {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
    
    .trust-item i {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .login-card {
        border-radius: 20px;
        padding: 1.75rem 1.25rem;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-check {
        margin-bottom: 0;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

.login-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading spinner in button */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}