@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-glow: rgba(37, 99, 235, 0.35);
    --bg-dark: #090d16;
    --card-bg: rgba(15, 23, 42, 0.75);
    --border-glass: rgba(255, 255, 255, 0.12);
    --text-white: #ffffff;
    --text-muted: #94a3b8;
    --input-bg: rgba(30, 41, 59, 0.7);
    --danger: #ef4444;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    padding: 20px;
}

/* Ambient glow blobs */
.glow-blob-1 {
    position: absolute;
    top: 10%;
    right: 15%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.28) 0%, transparent 70%);
    filter: blur(50px);
    z-index: 0;
    pointer-events: none;
}

.glow-blob-2 {
    position: absolute;
    bottom: 10%;
    left: 15%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.22) 0%, transparent 70%);
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
}

/* Login Card */
.login-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 30px rgba(37, 99, 235, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    height: 52px;
    width: auto;
    object-fit: contain;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.login-title {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* Alerts */
.login-alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.login-alert-info {
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: #67e8f9;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    right: 14px;
    color: #64748b;
    pointer-events: none;
    width: 20px;
    height: 20px;
}

.form-input {
    width: 100%;
    padding: 12px 44px 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    outline: none;
}

.form-input::placeholder {
    color: #475569;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    background: rgba(30, 41, 59, 0.95);
}

.input-error-msg {
    color: #f87171;
    font-size: 0.78rem;
    margin-top: 6px;
    display: block;
}

/* Remember me */
.form-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.remember-checkbox {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Submit Button */
.btn-login {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.45);
}

.btn-login:active {
    transform: translateY(0);
}

/* Card Footer */
.login-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
    color: #64748b;
}

.login-credentials-hint {
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-top: 20px;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.5;
}

.login-credentials-hint strong {
    color: #e2e8f0;
}
