/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

/* Navbar Styles */
.navbar-glass {
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: translateY(-1px);
    color: #a78bfa !important;
}

.brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Main Content */
.login-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    margin-top: 80px;
}

.login-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

/* Login Card */
.login-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 32px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.login-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 12px 40px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Login Header */
.login-header {
    padding: 2rem 2rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.05);
}

.login-title {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.02em;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
    line-height: 1.5;
}

/* Login Body */
.login-body {
    padding: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    letter-spacing: 0.01em;
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-control:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 
        0 0 0 4px rgba(99, 102, 241, 0.1),
        0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

/* Checkbox Styles */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.form-check-input {
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.form-check-input:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
}

.form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-check-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

/* Button Styles */
.btn {
    width: 100%;
    padding: 1rem 2rem;
    border: none;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-success:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

/* Link Styles */
.text-primary {
    color: #a78bfa !important;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.text-primary:hover {
    color: #c4b5fd !important;
    text-decoration: underline;
}

/* Form Toggle */
.form-toggle {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.form-toggle-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
}

/* SweetAlert2 Styling */
.swal2-popup {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.swal2-title {
    color: #1f2937 !important;
    font-weight: 700 !important;
}

.swal2-content {
    color: #6b7280 !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
}

.swal2-cancel {
    background: #ef4444 !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
}

/* SweetAlert2 Icon Styling */
.swal2-icon {
    border: none !important;
    background: none !important;
}

.swal2-success {
    border-color: transparent !important;
}

.swal2-success-ring {
    border: none !important;
}

.swal2-success-fix {
    background-color: transparent !important;
}

.swal2-success-circular-line-left,
.swal2-success-circular-line-right {
    background-color: transparent !important;
}

.swal2-success-line-tip,
.swal2-success-line-long {
    background-color: #10b981 !important;
}

.swal2-success-hide {
    display: none !important;
}

/* Mobile Responsive - Full Screen Layout */
@media (max-width: 768px) {
    .navbar-content {
        padding: 1rem;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    .back-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .back-text {
        display: none;
    }

    .login-main {
        padding: 1rem;
        margin-top: 70px;
        min-height: calc(100vh - 70px);
    }

    .login-container {
        max-width: 100%;
        width: 100%;
    }

    .login-card {
        border-radius: 20px;
    }

    .login-header {
        padding: 1.5rem 1.5rem 1rem;
    }

    .login-body {
        padding: 1.5rem;
    }

    .login-title {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .login-subtitle {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .logo-icon {
        width: 56px;
        height: 56px;
        margin-bottom: 0.75rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-label {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .form-control {
        padding: 0.875rem 1rem;
        font-size: 1rem;
        min-height: auto;
        border-radius: 12px;
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        min-height: auto;
        border-radius: 12px;
    }

    .form-check {
        margin: 1rem 0;
    }

    .form-check-input {
        width: 18px;
        height: 18px;
    }

    .form-check-label {
        font-size: 0.9rem;
    }

    .form-toggle {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }

    .form-toggle-text {
        font-size: 0.9rem;
    }

    .text-primary {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .navbar-content {
        padding: 0.75rem;
    }

    .navbar-brand {
        font-size: 0.95rem;
    }

    .brand-text {
        display: none;
    }

    .login-main {
        padding: 0.75rem;
    }

    .login-header {
        padding: 1.25rem 1.25rem 1rem;
    }

    .login-body {
        padding: 1.25rem;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .login-subtitle {
        font-size: 0.875rem;
    }

    .logo-icon {
        width: 48px;
        height: 48px;
    }
}

/* Desktop Enhancements */
@media (min-width: 1024px) {
    .login-container {
        max-width: 480px;
    }
    
    .login-card {
        border-radius: 28px;
    }
    
    .login-title {
        font-size: 2.25rem;
    }
    
    .form-control {
        padding: 1.125rem 1.5rem;
        font-size: 1.05rem;
    }
    
    .btn {
        padding: 1.125rem 2.5rem;
        font-size: 1.05rem;
    }
    
    .logo-icon {
        width: 72px;
        height: 72px;
    }
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Focus Management */
.form-control:focus,
.form-check-input:focus,
.btn:focus {
    outline: none;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 2px;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}