/* auth-overhaul.css - Modern Auth Aesthetics */

#auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    overflow: hidden;
}

#auth-overlay::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    top: -50%;
    left: -50%;
    animation: rotate-bg 60s linear infinite;
}

@keyframes rotate-bg {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
    transform: translateY(20px);
    opacity: 0;
    animation: slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slide-up {
    to { transform: translateY(0); opacity: 1; }
}

.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-logo-circle {
    width: 80px;
    height: 80px;
    background: #3b82f6;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.auth-header h1 {
    font-size: 1.8rem;
    color: #1e293b;
    font-weight: 800;
    margin-bottom: 8px;
}

.auth-header p {
    color: #64748b;
    font-size: 0.95rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #475569;
}

.input-field-wrapper {
    position: relative;
}

.input-field-wrapper i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    transition: color 0.3s;
}

.auth-form input {
    width: 100%;
    padding: 14px 55px 14px 15px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    font-size: 1rem;
    transition: all 0.3s;
    outline: none;
}

.auth-form input:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.auth-form input:focus + i {
    color: #3b82f6;
}

.auth-btn {
    background: #3b82f6;
    color: white;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
}

.auth-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

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

.auth-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.auth-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Error styling */
#auth-error {
    background: #fee2e2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
    display: none;
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.hidden {
    display: none !important;
}

/* Ticking clock in auth for dynamic feel */
.auth-clock {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: rgba(255,255,255,0.4);
    font-family: monospace;
    font-size: 0.9rem;
}

/* Fix popup overlay z-index behind login modal */
.swal2-container {
    z-index: 99999 !important;
}
