/* Modern Professional Authentication Styles 2025 */

/* Global Styles for Auth Pages */
.sign-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 35%, #24243e 100%);
    padding: 20px;
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    position: relative;
    overflow: hidden;
}

/* Animated background elements */
.sign-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(120, 119, 198, 0.2) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

.sign-box {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 10;
    animation: slideInUp 0.8s ease-out;
}

.box.cp-1 {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px) saturate(200%);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 
        0 32px 64px rgba(31, 38, 135, 0.2),
        0 8px 32px rgba(31, 38, 135, 0.15),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.18);
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.box.cp-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 24px 24px 0 0;
}

.box.cp-1:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 40px 80px rgba(31, 38, 135, 0.25),
        0 16px 48px rgba(31, 38, 135, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

/* Logo Styles */
.logo.logo-sm {
    display: block;
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo.logo-sm img {
    max-height: 64px;
    width: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.logo.logo-sm img:hover {
    transform: scale(1.05) translateY(-2px);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
}

/* Header Text Styles */
.sign-box .mb-4 h3 {
    color: #1a202c;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.025em;
}

.sign-box .mb-4 p {
    color: #64748b;
    font-size: 1rem;
    text-align: center;
    line-height: 1.6;
    font-weight: 400;
}

/* Form Styles */
.sign-box form {
    margin-top: 2rem;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    display: block;
    font-size: 0.9rem;
    letter-spacing: 0.025em;
}

.input-group.input-button {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group.input-button .form-control {
    padding: 16px 20px;
    padding-right: 60px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    background: #f8fafc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 56px;
    font-size: 1rem;
    font-weight: 400;
    color: #374151;
}

.input-group.input-button .form-control::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.input-group.input-button .form-control:focus {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 
        0 0 0 4px rgba(99, 102, 241, 0.12),
        0 1px 3px rgba(0, 0, 0, 0.1);
    outline: none;
    transform: translateY(-1px);
}

.input-group.input-button button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    padding: 12px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-group.input-button button:hover {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 12px;
    padding: 16px 32px;
    font-weight: 600;
    font-size: 1rem;
    height: 56px;
    width: 100%;
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 16px rgba(99, 102, 241, 0.3),
        0 2px 8px rgba(99, 102, 241, 0.2);
    letter-spacing: 0.025em;
}

.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.5s;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 32px rgba(99, 102, 241, 0.4),
        0 4px 16px rgba(99, 102, 241, 0.3);
    background: linear-gradient(135deg, #5b5bd6 0%, #7c3aed 100%);
}

.btn-primary:active {
    transform: translateY(0);
    transition: transform 0.1s;
}

/* Social Login Buttons */
.sign-with {
    margin-top: 2rem;
}

.sign-with-divider {
    text-align: center;
    position: relative;
    margin-bottom: 2rem;
}

.sign-with-divider span {
    background: white;
    padding: 0 1.5rem;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

.sign-with-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    z-index: 1;
}

.btn-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
    height: 48px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.btn-facebook:hover {
    background: linear-gradient(135deg, #166fe5 0%, #0a58ca 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(24, 119, 242, 0.4);
    color: white;
}

.btn-google {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    color: #374151;
    font-weight: 600;
    height: 48px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-google:hover {
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.1),
        0 0 0 3px rgba(99, 102, 241, 0.1);
    background: #f8fafc;
    color: #374151;
}

/* Link Styles */
.sign-box a {
    color: #6366f1;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.sign-box a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.3s ease;
}

.sign-box a:hover::after {
    width: 100%;
}

.sign-box a:hover {
    color: #5b5bd6;
    text-decoration: none;
}

/* Footer Text Styles */
.sign-box .text-muted {
    color: #6b7280 !important;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Demo Account Table Styles */
.box.cp-1 .table {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.box.cp-1 .table th {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: #6366f1;
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.box.cp-1 .table td {
    border: none;
    color: #4b5563;
    padding: 1rem;
}

/* Alert Styles */
.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
    border-radius: 12px;
    padding: 16px 20px;
    backdrop-filter: blur(10px);
}

/* Form Check Styles */
.form-check-input {
    border: 2px solid #d1d5db;
    border-radius: 6px;
    transition: all 0.3s ease;
    width: 18px;
    height: 18px;
}

.form-check-input:checked {
    background-color: #6366f1;
    border-color: #6366f1;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m13.854 3.646-7.5 7.5a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6 10.293l7.146-7.147a.5.5 0 0 1 .708.708z'/%3e%3c/svg%3e");
}

.form-check-label {
    color: #4b5563;
    font-size: 0.9rem;
    font-weight: 400;
    margin-left: 0.5rem;
}

/* Terms Section */
.terms {
    margin-top: 2rem;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    text-align: center;
}

.terms p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #6b7280 !important;
    margin-bottom: 1rem !important;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Loading Animation for Buttons */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 480px) {
    .sign-page {
        padding: 15px;
    }
    
    .box.cp-1 {
        padding: 2.5rem 2rem;
        border-radius: 20px;
    }
    
    .sign-box .mb-4 h3 {
        font-size: 1.75rem;
    }
    
    .input-group.input-button .form-control {
        height: 52px;
        padding: 14px 18px;
        padding-right: 55px;
    }
    
    .btn-primary {
        height: 52px;
        padding: 14px 28px;
    }
}

/* Dark mode support - Enhanced */
@media (prefers-color-scheme: dark) {
    .sign-page {
        background: linear-gradient(135deg, #0c0a1e 0%, #1a1625 35%, #0f0f23 100%) !important;
    }
    
    .sign-page::before {
        background: radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
                    radial-gradient(circle at 40% 40%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
    }
    
    .box.cp-1 {
        background: rgb(39 46 63 / 95%) !important;
        border-color: rgba(99, 102, 241, 0.2) !important;
        box-shadow: 
            0 32px 64px rgba(0, 0, 0, 0.3),
            0 8px 32px rgba(99, 102, 241, 0.1),
            inset 0 1px 1px rgba(99, 102, 241, 0.1);
    }
    
    .box.cp-1::before {
        background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
    }
    
    .sign-box .mb-4 h3 {
        color: #f1f5f9 !important;
        background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .sign-box .mb-4 p {
        color: #94a3b8 !important;
    }
    
    .form-label {
        color: #e2e8f0 !important;
    }
    
    .input-group.input-button .form-control {
        background: #1e293b !important;
        border-color: #334155 !important;
        color: #f1f5f9 !important;
    }
    
    .input-group.input-button .form-control::placeholder {
        color: #64748b !important;
    }
    
    .input-group.input-button .form-control:focus {
        background: #0f172a !important;
        border-color: #6366f1 !important;
        color: #f1f5f9 !important;
        box-shadow: 
            0 0 0 4px rgba(99, 102, 241, 0.2),
            0 1px 3px rgba(0, 0, 0, 0.3);
    }
    
    .input-group.input-button button {
        color: #64748b !important;
    }
    
    .input-group.input-button button:hover {
        color: #6366f1 !important;
        background: rgba(99, 102, 241, 0.2) !important;
    }
    
    .btn-google {
        background: #1e293b !important;
        border-color: #334155 !important;
        color: #e2e8f0 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .btn-google:hover {
        border-color: #6366f1 !important;
        background: #0f172a !important;
        color: #f1f5f9 !important;
        box-shadow: 
            0 8px 24px rgba(0, 0, 0, 0.3),
            0 0 0 3px rgba(99, 102, 241, 0.2);
    }
    
    .sign-box a {
        color: #a78bfa !important;
    }
    
    .sign-box a:hover {
        color: #8b5cf6 !important;
    }
    
    .sign-box a::after {
        background: linear-gradient(90deg, #a78bfa, #8b5cf6);
    }
    
    .sign-box .text-muted {
        color: #64748b !important;
    }
    
    .form-check-label {
        color: #cbd5e1 !important;
    }
    
    .form-check-input {
        border-color: #475569 !important;
        background-color: #1e293b !important;
    }
    
    .form-check-input:checked {
        background-color: #6366f1 !important;
        border-color: #6366f1 !important;
    }
    
    .alert-danger {
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%) !important;
        border-color: rgba(239, 68, 68, 0.3) !important;
        color: #fca5a5 !important;
    }
    
    .box.cp-1 .table {
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%) !important;
        border-color: rgba(99, 102, 241, 0.2) !important;
    }
    
    .box.cp-1 .table th {
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%) !important;
        color: #a78bfa !important;
    }
    
    .box.cp-1 .table td {
        color: #cbd5e1 !important;
    }
    
    .sign-with-divider span {
        background: #1e2330 !important;
        color: #64748b !important;
    }
    
    .sign-with-divider::before {
        background: linear-gradient(90deg, transparent, #334155, transparent) !important;
    }
    
    .terms p {
        color: #64748b !important;
    }
    
    .terms a {
        color: #a78bfa !important;
    }
}

/* Focus visible for accessibility */
.btn-primary:focus-visible,
.btn-facebook:focus-visible,
.btn-google:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5b5bd6, #7c3aed);
}

@media (prefers-color-scheme: dark) {
    ::-webkit-scrollbar-track {
        background: #1e293b;
    }
}