/* ============================================
   MODERN LOGIN PAGE STYLING - SAQR SYSTEM
   ============================================ */

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #1e40af 100%);
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Background with animated gradient */
.login-page {
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    direction: rtl;
    position: relative;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Animated background pattern */
.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.1) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Professional Logo Positioning */
.logo-top-left {
    position: fixed;
    top: 15px;
    left: 30px;
    width: 140px;
    height: 140px;
    object-fit: contain;
    z-index: 1000;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.logo-top-left:hover {
    transform: translateY(-3px) scale(1.05);
}

.logo-top-right {
    position: fixed;
    top: 15px;
    right: 30px;
    width: 140px;
    height: 140px;
    object-fit: contain;
    z-index: 1000;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.logo-top-right:hover {
    transform: translateY(-3px) scale(1.05);
}

/* Center logo - top middle */
.logo-center {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 140px;
    object-fit: contain;
    z-index: 1001;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.logo-center:hover {
    transform: translateX(-50%) translateY(-3px) scale(1.05);
}

/* Modern Login Card */
.login-card {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
    border-radius: 24px;
    padding: 40px 35px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
    animation: slideUp 0.6s ease-out;
    margin: 160px auto auto auto;
    backdrop-filter: blur(20px);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-title {
    margin: 0 0 8px 0;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    color: #f8fafc;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.login-subtitle {
    margin: 0 0 30px 0;
    text-align: center;
    color: #94a3b8;
    font-size: 15px;
    font-weight: 400;
}

/* Form Elements */
.login-card .form-label {
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 10px;
    font-size: 14px;
    display: block;
}

.login-card .form-control {
    border: 2px solid rgba(71, 85, 105, 0.5);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: rgba(30, 41, 59, 0.8);
    color: #f1f5f9;
    width: 100%;
}

.login-card .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    outline: none;
    background: rgba(30, 41, 59, 0.95);
}

.login-card .form-control::placeholder {
    color: #64748b;
}

/* Checkbox */
.login-card .form-check-input {
    border: 2px solid rgba(71, 85, 105, 0.5);
    border-radius: 6px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    background: rgba(30, 41, 59, 0.8);
}

.login-card .form-check-input:checked {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-color: #3b82f6;
}

.login-card .form-check-label {
    cursor: pointer;
    color: #94a3b8;
    font-size: 14px;
    margin-right: 10px;
}

/* Primary Button */
.login-card .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 17px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    margin-top: 12px;
    margin-bottom: 0;
    color: white;
    width: 100%;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.login-card .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
}

.login-card .btn-primary:active {
    transform: translateY(-1px);
}

/* Links */
.small-link {
    text-decoration: none;
    font-size: 14px;
    color: #60a5fa;
    font-weight: 500;
    transition: all 0.2s ease;
}

.small-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* Alert Messages */
.login-card .alert {
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 24px;
    border: none;
    font-size: 14px;
}

.login-card .alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-left: 4px solid #10b981;
}

.login-card .text-danger {
    color: #f87171;
    font-size: 13px;
    margin-top: 6px;
    display: block;
}

/* Validation Summary */
.login-card .text-danger.mb-2 {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 24px;
    font-size: 14px;
    border-left: 4px solid #ef4444;
}

/* Form spacing */
.login-card .mb-3 {
    margin-bottom: 1.25rem !important;
}

.login-card .mb-2 {
    margin-bottom: 1rem !important;
}

.login-card form {
    margin-bottom: 0;
}

/* Bottom text */
.login-card .mt-3.text-center {
    margin-top: 1.5rem !important;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(71, 85, 105, 0.3);
}

.login-card .mt-3.text-center span {
    color: #94a3b8;
}

/* Custom scrollbar */
.login-card::-webkit-scrollbar {
    width: 8px;
}

.login-card::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 4px;
}

.login-card::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 4px;
}

/* Firefox scrollbar */
.login-card {
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 rgba(30, 41, 59, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-page {
        padding: 15px;
    }
    
    .logo-top-left,
    .logo-top-right,
    .logo-center {
        width: 100px;
        height: 100px;
        top: 10px;
    }
    
    .logo-top-left {
        left: 15px;
    }
    
    .logo-top-right {
        right: 15px;
    }
    
    .login-card {
        padding: 35px 28px;
        max-width: 100%;
        border-radius: 20px;
        margin-top: 120px;
    }
    
    .login-title {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: 10px;
    }
    
    .logo-top-left,
    .logo-top-right,
    .logo-center {
        width: 80px;
        height: 80px;
        top: 8px;
    }
    
    .logo-top-left {
        left: 10px;
    }
    
    .logo-top-right {
        right: 10px;
    }
    
    .login-card {
        padding: 30px 22px;
        border-radius: 16px;
        margin-top: 100px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .login-subtitle {
        font-size: 14px;
    }
    
    .login-card .btn-primary {
        padding: 14px;
        font-size: 16px;
    }
}
