/* =========================================
   SULTAN FONTS — DESIGN SYSTEM 2026
   ========================================= */
   :root {
    --bg-main: #141414;
    --bg-card: #1f1f1f;
    --bg-input: #292929;
    --text-main: #ffffff;
    --text-muted: #aaaaaa;
    --primary: #00a896;
    --primary-hover: #02c3b3;
    --success: #2ec4b6;
    --danger: #e63946;
    --warning: #ffb703;
    --paypal: #0070ba;
    --border-radius: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 1. General Reset & Typography */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'SFDroob', system-ui, -apple-system, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

h1, h2, h3 { margin-top: 0; font-family: 'SFDroob', sans-serif; font-weight: 700; }
p { font-family: 'SFDroob', sans-serif; font-size: 16px; line-height: 1.6; color: var(--text-muted); }

/* 2. Font Definitions */
@font-face {
    font-family: 'SFDroob';
    src: url('../fonts/SFDroob.woff2') format('woff2');
    font-display: swap;
}

/* 3. Layout & Navigation */
main.container { width: 100%; max-width: 900px; padding: 20px; box-sizing: border-box; }

.navbar {
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    background-color: var(--bg-card);
    border-bottom: 1px solid #2d2d2d;
}

.logo {
    text-decoration: none;
    color: var(--text-main);
    font-size: 1.5rem;
    font-weight: bold;
    transition: var(--transition);
}

.logo:hover { color: var(--primary); transform: scale(1.02); }

.lang-switcher select {
    background: var(--bg-input);
    color: white;
    padding: 8px 12px;
    border: 1px solid #444;
    border-radius: var(--border-radius);
    cursor: pointer;
}

/* 4. Forms, Sections & Cards */
section {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #2d2d2d;
    width: 100%;
    box-sizing: border-box;
}

section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary);
    padding-left: 10px;
}

html[dir="rtl"] section h2 { border-left: none; border-right: 4px solid var(--primary); padding-right: 10px; text-align: right; }

select, input {
    width: 100%; padding: 12px 16px; background: var(--bg-input);
    border: 1px solid #3d3d3d; border-radius: var(--border-radius);
    color: #fff; box-sizing: border-box;
}

/* 5. Tables, Payments & Modals - (بقية التنسيقات ثابتة كما كانت) */
/* ... (تم الحفاظ على أقسام 5 و 6 و 7 و 8 كما هي في كودك) ... */

/* 9. MOBILE RESPONSIVE */
@media screen and (max-width: 768px) {
    .navbar { flex-direction: row-reverse; } /* للحفاظ على ترتيب الأطراف على الجوال */
    .selector-grid { grid-template-columns: 1fr; }
    /* ... باقي التنسيقات ... */
}

/* 1. Utility Classes */
.hidden { display: none !important; }

/* 2. Modal System (Integrated with Dark Theme) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 15px;
    box-sizing: border-box;
}

.modal-content {
    background: var(--bg-card); /* توافق مع الخلفية */
    color: var(--text-main);
    width: 100%;
    max-width: 600px;
    border-radius: var(--border-radius);
    padding: 25px;
    position: relative;
    border: 1px solid #2d2d2d;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Modal Alignment */
html[dir="rtl"] .modal-content { text-align: right; }
html[dir="ltr"] .modal-content { text-align: left; }

.close {
    position: absolute;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}
.close:hover { color: var(--danger); }

html[dir="rtl"] .close { left: 15px; right: auto; }
html[dir="ltr"] .close { right: 15px; left: auto; }

/* 3. Customer Info Inputs (Integrated) */
.customer-info-grid input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: var(--bg-input);
    border: 1px solid #3d3d3d;
    border-radius: var(--border-radius);
    color: #fff;
    font-size: 1rem;
    box-sizing: border-box;
    transition: var(--transition);
}

.customer-info-grid input:focus { border-color: var(--primary); outline: none; }

/* 4. Chat Widget (Integrated) */
#chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 300px;
    background: var(--bg-card);
    border: 1px solid #2d2d2d;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    overflow: hidden;
}

#chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    
    /* قمنا بتصغير الأبعاد من 60px إلى 50px */
    width: 40px; 
    height: 40px;
    
    background-color: var(--primary);
    border-radius: 50%;
    color: #fff;
    
    /* تصغير حجم أيقونة الخط (الرسالة أو الرمز المستخدم) */
    font-size: 24px; 
    
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: var(--transition);
}
#chat-icon:hover { transform: scale(1.05); }

/* دعم RTL للدردشة */
html[dir="rtl"] #chat-window { right: auto; left: 20px; }
html[dir="rtl"] #chat-icon { right: auto; left: 20px; }