﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-dark: #0A1E3C;
    --primary: #1A3B5E;
    --primary-light: #2C4F72;
    --accent: #00C9B7;
    --accent-soft: #7FDBD0;
    --gradient-1: #4776E6;
    --gradient-2: #8E54E9;
    --success: #00B09B;
    --warning: #FACC15;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --card-shadow: 0 30px 60px -15px rgba(10, 30, 60, 0.3);
    --neon-shadow: 0 0 30px rgba(0, 201, 183, 0.3);
}

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #0A1E3C 0%, #1A3B5E 50%, #2C4F72 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Animated background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    pointer-events: none;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Main container - Modern card */
.login-container {
    position: relative;
    z-index: 10;
    width: 1320px;
    max-width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 60px 60px 60px 60px;
    box-shadow: var(--card-shadow), var(--neon-shadow);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Left Side - Creative Branding */
.brand-section {
    background: linear-gradient(165deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 60px 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

    .brand-section::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
        animation: rotate 30s linear infinite;
    }

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.brand-logo {
    position: relative;
    z-index: 2;
}

    .brand-logo img {
        height: 100%;
        width: 100%;
        filter: brightness(0) invert(1);
        margin-bottom: 30px;
    }

.brand-title {
    position: relative;
    z-index: 2;
}

    .brand-title h1 {
        color: white;
        font-size: 3.2rem;
        font-weight: 800;
        line-height: 1.2;
        margin-bottom: 20px;
        text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    .brand-title .highlight {
        color: var(--accent);
        position: relative;
        display: inline-block;
    }

        .brand-title .highlight::after {
            position: absolute;
            bottom: 5px;
            left: 0;
            width: 100%;
            height: 8px;
            background: var(--accent);
            opacity: 0.3;
            border-radius: 4px;
        }

.brand-features {
    position: relative;
    z-index: 2;
    margin-top: 60px;
    display: grid;
    gap: 25px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.8);
    transform: translateX(0);
    transition: transform 0.3s ease;
}

    .feature-item:hover {
        transform: translateX(-10px);
    }

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 201, 183, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-text {
    font-size: 1rem;
    font-weight: 500;
}

.stats-container {
    position: relative;
    z-index: 2;
    margin-top: 60px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-number {
    color: var(--accent);
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 5px;
}

/* Right Side - Login Form */
.form-section {
    background: white;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
}

.form-header {
    margin-bottom: 40px;
}

    .form-header h2 {
        color: var(--primary-dark);
        font-size: 2.2rem;
        font-weight: 700;
        margin-bottom: 10px;
    }

    .form-header p {
        color: #6B7A8F;
        font-size: 1rem;
    }

/* Modern Tab Switcher */
.method-switcher {
    display: flex;
    gap: 10px;
    background: #F0F4F8;
    padding: 6px;
    border-radius: 50px;
    margin-bottom: 35px;
}

.method-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 10px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    color: #5A6B7A;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .method-btn i {
        font-size: 1.1rem;
    }

    .method-btn.active {
        background: white;
        color: var(--primary-dark);
        box-shadow: 0 10px 20px -10px rgba(26, 59, 94, 0.2);
    }

/* Saved User Chip */
.saved-user {
    display: none;
    align-items: center;
    background: linear-gradient(135deg, #F0F9F7 0%, #E6F5F2 100%);
    border: 1px solid var(--accent-soft);
    border-radius: 20px;
    padding: 15px 20px;
    margin-bottom: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.saved-user.show {
    display: flex;
}

.saved-user:hover {
    background: linear-gradient(135deg, #E6F5F2 0%, #D9F0EC 100%);
    transform: translateY(-2px);
}

.user-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), var(--success));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    margin-left: 15px;
}

.user-info {
    flex: 1;
}

.user-name {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.user-hint {
    color: #6B7A8F;
    font-size: 0.85rem;
}

.remove-user {
    color: #9AA6B5;
    font-size: 1.2rem;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.2s;
}

    .remove-user:hover {
        color: #FF5A5A;
        background: rgba(255, 90, 90, 0.1);
    }

/* Form Groups */
.form-group-modern {
    position: relative;
    margin-bottom: 20px;
}

    .form-group-modern label {
        display: block;
        color: var(--primary-dark);
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 8px;
        margin-right: 5px;
    }

.input-wrapper {
    position: relative;
}

    .input-wrapper i.input-icon {
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--accent);
        font-size: 1.2rem;
        z-index: 2;
    }

    .input-wrapper .clear-icon {
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        color: #9AA6B5;
        cursor: pointer;
        display: none;
        z-index: 2;
        font-size: 1.1rem;
    }

        .input-wrapper .clear-icon.visible {
            display: block;
        }

        .input-wrapper .clear-icon:hover {
            color: #FF5A5A;
        }

.form-control-modern {
    width: 100%;
    height: 60px;
    border: 2px solid #E9EEF3;
    border-radius: 20px;
    padding: 0 55px 0 50px;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    background: #F8FAFD;
    transition: all 0.3s ease;
}

    .form-control-modern:focus {
        border-color: var(--accent);
        background: white;
        box-shadow: 0 0 0 5px rgba(0, 201, 183, 0.1);
        outline: none;
    }

select.form-control-modern {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2300C9B7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 20px center;
    background-size: 16px;
}

/* Login Button */
.btn-login-modern {
    width: 100%;
    height: 60px;
    border: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 25px 0 15px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

    .btn-login-modern::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 ease;
    }

    .btn-login-modern:hover {
        transform: translateY(-2px);
        box-shadow: 0 20px 30px -10px var(--primary);
    }

        .btn-login-modern:hover::before {
            left: 100%;
        }

/* Fingerprint Panel */
.fp-panel-modern {
    text-align: center;
}

.fp-visual {
    width: 120px;
    height: 120px;
    margin: 20px auto 25px;
    background: linear-gradient(135deg, #F0F9F7 0%, #E6F5F2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .fp-visual i {
        font-size: 3.5rem;
        color: var(--accent);
        transition: all 0.3s ease;
    }

    .fp-visual:hover {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(0, 201, 183, 0.4);
    }

    .fp-visual.scanning::before {
        content: '';
        position: absolute;
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
        border: 2px solid var(--accent);
        border-radius: 50%;
        animation: pulse-ring 1.5s infinite;
    }

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.fp-visual.success {
    background: linear-gradient(135deg, #00B09B, #00C9B7);
}

    .fp-visual.success i {
        color: white;
    }

.fp-visual.error {
    background: linear-gradient(135deg, #FF5A5A, #FF7E5A);
}

    .fp-visual.error i {
        color: white;
    }

.fp-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.fp-subtitle {
    color: #6B7A8F;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.fp-status {
    min-height: 30px;
    color: var(--accent);
    font-weight: 600;
    margin: 15px 0;
}

.fp-register-link {
    color: #6B7A8F;
    font-size: 0.9rem;
}

    .fp-register-link a {
        color: var(--accent);
        font-weight: 700;
        text-decoration: none;
        cursor: pointer;
    }

.fp-not-supported {
    background: #FFF2F0;
    border: 1px solid #FFB8B8;
    border-radius: 20px;
    padding: 15px;
    color: #FF5A5A;
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: none;
}

/* PWA Section */
.pwa-section-modern {
    margin-top: 30px;
    background: #F8FAFD;
    border-radius: 30px;
    padding: 25px;
    border: 2px solid #E9EEF3;
}

.pwa-banner {
    display: none;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
}

    .pwa-banner.ready {
        display: flex;
    }

.pwa-icon-large {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.pwa-text-large {
    flex: 1;
    text-align: right;
}

    .pwa-text-large strong {
        display: block;
        color: var(--primary-dark);
        font-size: 1.05rem;
        font-weight: 700;
        margin-bottom: 3px;
    }

    .pwa-text-large small {
        color: #6B7A8F;
        font-size: 0.85rem;
    }

.btn-pwa-install {
    background: var(--accent);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .btn-pwa-install:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 20px -8px rgba(0, 201, 183, 0.4);
    }

.pwa-steps-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.step-modern {
    background: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #E9EEF3;
}

.offline-indicator {
    text-align: center;
    font-size: 0.85rem;
    color: #9AA6B5;
    margin-top: 12px;
    display: none;
    padding: 10px;
}

    .offline-indicator.show {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

/* Toast Messages */
.toast-modern {
    border-radius: 20px;
    padding: 15px 20px;
    margin-top: 15px;
    display: none;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast-modern.show {
    display: flex;
}

.toast-error-modern {
    background: #FFF2F0;
    border: 1px solid #FFB8B8;
    color: #FF5A5A;
}

.toast-success-modern {
    background: #E6F5F2;
    border: 1px solid var(--accent-soft);
    color: var(--accent);
}

/* Modal */
.modal-modern {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 30, 60, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content-modern {
    background: white;
    border-radius: 40px;
    padding: 40px;
    width: 480px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlide 0.4s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header-modern {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

    .modal-header-modern i {
        width: 50px;
        height: 50px;
        background: linear-gradient(135deg, var(--accent), var(--success));
        border-radius: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 1.5rem;
    }

    .modal-header-modern h3 {
        color: var(--primary-dark);
        font-weight: 700;
        margin: 0;
    }

/* Mobile Responsive */
@media (max-width: 992px) {
    .login-container {
        grid-template-columns: 1fr;
        border-radius: 40px;
    }

    .brand-section {
        padding: 40px 30px;
    }

    .brand-title h1 {
        font-size: 2.5rem;
    }

    .stats-container {
        margin-top: 40px;
    }

    .form-section {
        padding: 40px 30px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .form-section {
        padding: 30px 20px;
    }

    .form-header h2 {
        font-size: 1.8rem;
    }

    .method-btn span {
        display: none;
    }

    .method-btn i {
        font-size: 1.3rem;
    }

    .stats-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}
