:root {
    --primary-color: #2e7d32;
    --primary-hover: #1b5e20;
    --accent-color: #e67e22;
    --bg-color: #f5f8f6;
    --card-bg: #ffffff;
    --text-color: #2c3e50;
    --border-color: #e2e8f0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* شريط التنقل (Navbar) */
.navbar {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-color);
}

.logo span {
    color: var(--accent-color);
    font-size: 0.9rem;
    vertical-align: super;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s;
    cursor: pointer;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
    background-color: #e8f5e9;
}

.store-btn {
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 0.9rem;
    transition: background 0.3s, transform 0.2s;
}

.store-btn:hover {
    background-color: #d35400;
    transform: translateY(-2px);
}

/* حاوية المحتوى الرئيسي */
.container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 400px;
}

/* التحكم في الصفحات */
.page-section {
    display: none;
}

.page-section.active {
    display: block;
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* التبويبات الخاصة بتسجيل الدخول وإنشاء حساب */
.auth-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.01);
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px;
    font-size: 1.05rem;
    font-weight: bold;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

.auth-form-container {
    display: none;
}

.auth-form-container.active {
    display: block;
}

/* الكروت والتصميم العام */
.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.01);
    margin-bottom: 30px;
}

h2 {
    color: #1e293b;
    margin-bottom: 5px;
}

.subtitle, .section-desc {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-group.row {
    flex-direction: row;
    gap: 10px;
}

.form-group.row input {
    flex: 1;
}

label {
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

input, select {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    background: #f8fafc;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    background: #fff;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

#searchBtn {
    padding: 12px 24px;
    background-color: #1e293b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

/* لوحة تحكم الإحصائيات */
.stats-result {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.stat-box {
    flex: 1;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-box.highlight {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* الرسائل والتنبيهات */
.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    display: none;
    text-align: center;
    font-weight: bold;
}

.message.success { background-color: #dcfce7; color: #166534; }
.message.error { background-color: #fee2e2; color: #991b1b; }

/* صفحة الشروط والدليل */
.steps-list { margin-right: 20px; margin-top: 15px; }
.steps-list li { margin-bottom: 15px; font-size: 1.05rem; }
.note-box {
    background: #fff9db;
    border-right: 4px solid var(--accent-color);
    padding: 15px;
    border-radius: 4px;
    margin-top: 25px;
}

footer {
    text-align: center;
    padding: 25px;
    color: #64748b;
    font-size: 0.85rem;
    background: #fff;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

@media (max-width: 600px) {
    .nav-container { flex-direction: column; gap: 15px; }
    .stats-result { flex-direction: column; }
}