﻿:root {
    --primary-color: #010463;
    --secondary-color: #2D5BFF;
    --accent-color: #00C9FF;
    --light-color: #F5F7FF;
    --dark-color: #333;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

body {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--dark-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.card-group {
    display: flex;
    flex-wrap: wrap;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.card {
    flex: 1;
    min-width: 300px;
    background: white;
    padding: 0;
}

.login-card {
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

    .brand-card::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
        z-index: 1;
    }

    .brand-card > * {
        position: relative;
        z-index: 2;
    }

.logo {
    width: 180px;
    height: auto;
    margin-bottom: 20px;
}

.system-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.system-description {
    font-size: 0.9rem;
    opacity: 0.9;
    max-width: 300px;
}

.login-header {
    margin-bottom: 30px;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.login-subtitle {
    color: #6c757d;
    font-size: 1rem;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    animation: fadeIn 0.5s ease;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.15);
    border: 1px solid var(--warning-color);
    color: #856404;
}

.alert i {
    margin-left: 10px;
    font-size: 1.2rem;
}

.close {
    background: none;
    border: none;
    font-size: 1.2rem;
    margin-right: auto;
    cursor: pointer;
    color: inherit;
}

.form-group {
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    align-items: center;
    background: var(--light-color);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e1e5eb;
    transition: var(--transition);
}

    .input-group:focus-within {
        border-color: var(--secondary-color);
        box-shadow: 0 0 0 3px rgba(45, 91, 255, 0.1);
    }

.input-group-prepend {
    padding: 0 15px;
    color: #6c757d;
}

.form-control {
    flex: 1;
    border: none;
    padding: 15px;
    background: transparent;
    font-size: 1rem;
    width: 100%;
    outline: none;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

    .btn-primary:hover {
        background: #000842;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(1, 4, 99, 0.3);
    }

.btn-secondary {
    background: var(--accent-color);
    color: white;
}

    .btn-secondary:hover {
        background: #00b0e0;
    }

.login-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.forgot-password {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

    .forgot-password:hover {
        text-decoration: underline;
    }

.features {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #6c757d;
}

    .feature i {
        color: var(--success-color);
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .card-group {
        flex-direction: column;
    }

    .brand-card {
        order: -1;
        padding: 30px 20px;
    }

    .login-card {
        padding: 30px 20px;
    }

    .login-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }

    .logo {
        width: 140px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .system-name {
        font-size: 1.3rem;
    }

    .system-description {
        font-size: 0.9rem;
    }
}

/* Loading animation for button */
.btn-loading {
    position: relative;
    pointer-events: none;
}

    .btn-loading::after {
        content: "";
        position: absolute;
        width: 20px;
        height: 20px;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: auto;
        border: 2px solid transparent;
        border-top-color: #ffffff;
        border-radius: 50%;
        animation: button-loading-spinner 1s ease infinite;
    }

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }

    to {
        transform: rotate(1turn);
    }
}
