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

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

body{
    font-family:'Tajawal',sans-serif;
    /* مسار الصورة (تأكد أن المسار دقيق) */
    background: url('../images/login_bg.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height:100vh;
    direction:rtl;
    position: relative;
}

/* طبقة التعتيم لزيادة وضوح النص */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); 
    z-index: -1; 
}

/* الصفحة */
.page-container{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:40px 20px;
}

/* الكارت */
.login-card{
    position: relative; /* لضمان ظهوره فوق الخلفية */
    z-index: 1;
    width:100%;
    max-width:420px;
    background:#eeeeeecc;
    border-radius:24px;
    padding:36px 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,.06);
    transition:.3s;
}

/* اللوجو */
.logo-wrapper{
    display:flex;
    justify-content:center;
    margin-bottom:22px;
}

.logo-circle{
    width:72px;
    height:72px;
    border-radius:20px;
    background:#0f766e;
    color:#fff;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:28px;
}

/* الهيدر */
.login-header{
    text-align:center;
    margin-bottom:28px;
}

.login-header h1{
    font-size:28px;
    color:#111827;
    margin-bottom:8px;
}

.company-name{
    color:#0f766e;
    font-weight:600;
    margin-bottom:8px;
}

.sub-text{
    color:#6b7280;
    font-size:14px;
    line-height:1.7;
}

/* الحقول */
.input-group{
    margin-bottom:18px;
}

.label-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:8px;
}

.input-group label{
    font-weight:500;
    color:#374151;
    margin-bottom:8px;
    display:block;
}

.input-wrapper{
    position:relative;
}

.input-icon{
    position:absolute;
    right:16px;
    top:50%;
    transform:translateY(-50%);
    color:#9ca3af;
    font-size:16px;
}

.input-group input{
    width:100%;
    height:54px;
    border:1px solid #e5e7eb;
    border-radius:14px;
    background:#fff;
    padding:0 48px;
    font-size:15px;
    outline:none;
    transition:.2s;
    font-family:'Tajawal',sans-serif;
}

.input-group input::placeholder{
    color:#9ca3af;
}

.input-group input:focus{
    border-color:#0f766e;
    box-shadow: 0 0 0 4px rgba(15,118,110,.08);
}

#phone, #nationalId, #identity{
    direction:ltr;
    text-align:right;
}

.toggle-password{
    position:absolute;
    left:14px;
    top:50%;
    transform:translateY(-50%);
    border:none;
    background:none;
    cursor:pointer;
    color:#9ca3af;
    font-size:16px;
}

.toggle-password:hover{
    color:#0f766e;
}

.forgot-link{
    color:#0f766e;
    text-decoration:none;
    font-size:14px;
}

.forgot-link:hover{
    text-decoration:underline;
}

.remember-row{
    margin:18px 0;
}

.remember-me{
    display:flex;
    gap:8px;
    align-items:center;
    color:#4b5563;
    cursor:pointer;
}

.submit-btn{
    width:100%;
    height:54px;
    border:none;
    border-radius:14px;
    background:#0f766e;
    color:#fff;
    font-size:16px;
    font-weight:700;
    cursor:pointer;
    transition:.2s;
    font-family:'Tajawal',sans-serif;
}

.submit-btn:hover{
    background:#115e59;
    transform:translateY(-1px);
}

.register-link{
    text-align:center;
    margin-top:22px;
    color:#6b7280;
    font-size:15px;
}

.register-link a{
    color:#0f766e;
    text-decoration:none;
    font-weight:600;
}

.register-link a:hover{
    text-decoration:underline;
}

.error-message{
    display:block;
    margin-top:6px;
    color:#dc2626;
    font-size:13px;
}

/* Responsive */
@media (max-width:992px){
    .login-card{ max-width:400px; }
}

@media (max-width:768px){
    .page-container{ padding:20px 16px; align-items:flex-start; }
    .login-card{ max-width:100%; padding:28px 22px; border-radius:20px; }
    .logo-circle{ width:64px; height:64px; font-size:24px; border-radius:18px; }
    .login-header h1{ font-size:24px; }
    .company-name{ font-size:15px; }
    .sub-text{ font-size:13px; }
    .input-group input{ height:52px; font-size:14px; }
    .submit-btn{ height:52px; font-size:15px; }
}

@media (max-width:400px){
    .login-card{ padding:24px 18px; }
    .login-header h1{ font-size:22px; }
}