:root {
    --bg-color: #0D0D0B;
    --gold: #D4B483;
    --white: #FFFFFF;
    --card-bg: rgba(255, 255, 255, 0.03);
    --input-bg: rgba(255, 255, 255, 0.07);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* تغيير التوسيط لتبدأ من الأعلى */
    padding-top: 2vh; /* تقليل المسافة العلوية لأقصى حد ممكن */
    overflow-y: auto; /* السماح بالتمرير إذا كانت الشاشة صغيرة جداً */
    position: relative;
}

/* محاكاة الـ DotBackground الموجودة في الكود */
.dot-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--gold) 1.5px, transparent 1.5px);
    background-size: 40px 40px;
    opacity: 0.05;
    z-index: 0;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

/* الهيدر المزدوج */
.header-brand {
    display: flex;
    flex-direction: row; /* جعل اللوجو يمين والنص يسار */
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

.app-logo {
    width: 70px;
    height: auto;
    margin-left: 15px; /* مسافة من اليسار لأن اللوجو يمين */
}

.brand-text {
    display: flex;
    flex-direction: column;
    align-items: center; /* توسيط النصوص فوق بعضها */
    text-align: center;
    line-height: 1.1;
}

.arabic-text {
    font-size: 17px;
    font-weight: 900;
    color: var(--white);
    letter-spacing: normal; /* إلغاء أي مسافات قد تسبب تقطع التطويل */
    white-space: nowrap;
}

.english-text {
    font-size: 15px;
    font-weight: 800;
    color: var(--white);
    white-space: nowrap;
}

.gold { color: var(--gold); }

/* البطاقة الرئيسية */
.form-wrapper {
    background-color: var(--card-bg);
    border: 1px solid rgba(212, 180, 131, 0.1);
    border-radius: 24px;
    padding: 40px 30px;
    backdrop-filter: blur(10px);
}

.form-title {
    color: var(--white);
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 8px;
    text-align: center;
}

.form-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    text-align: center;
    margin-bottom: 30px;
}

.input-field {
    margin-bottom: 16px;
}

.input-field input {
    width: 100%;
    height: 60px;
    background-color: var(--input-bg);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0 20px;
    color: var(--white);
    font-size: 16px;
    font-weight: 700;
    text-align: right;
    outline: none;
    transition: all 0.3s ease;
}

.input-field input:focus {
    border-color: rgba(212, 180, 131, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
}

.login-btn {
    width: 100%;
    height: 58px;
    background-color: var(--gold);
    color: #000;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 900;
    margin-top: 20px;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
}

.login-btn:hover {
    background-color: #e1c393;
}

.login-btn:active { transform: scale(0.97); }

.hidden { display: none !important; }
.status-message {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600; /* تقليل سمك الخط قليلاً */
}
.status-message.success { 
    background: rgba(76, 175, 80, 0.1); /* أخضر باهت */
    color: #81C784; /* لون أخضر هادئ مطفي */
}
.status-message.error { 
    background: rgba(239, 68, 68, 0.1); 
    color: #ef4444; 
}

/* واجهة النجاح الجديدة */
.success-screen {
    text-align: center;
    padding: 20px 0;
    animation: fadeIn 0.5s ease;
}

.check-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(76, 175, 80, 0.1);
    color: #81C784;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 24px;
}

.check-icon svg {
    width: 40px;
    height: 40px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.loader {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #000;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
