:root {
    /* ألوان هوية جمعية ريادة */
    --primary: #0693AD;
    --secondary: #BE9427;
    --success: #45AA8A;
    --grey: #939598;
    --bg: #f8f9fa;
    --surface: #ffffff;
    --radius: 16px;
    --shadow: 0 10px 40px rgba(0,0,0,0.08);
    --danger: #c0392b;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg);
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    direction: rtl;
}

/* --- الهيدر --- */
header {
    background: var(--surface);
    border-bottom: 4px solid var(--secondary);
    padding: 0.8rem 5%;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: sticky; top: 0; z-index: 1000;
}
.logo-area { display: flex; align-items: center; gap: 15px; }
.logo-img { height: 75px; width: auto; }
.logo-text h1 { margin: 0; font-size: 1.4rem; color: var(--secondary); font-weight: 800; }
.logo-text span { font-size: 0.9rem; color: var(--primary); font-weight: bold; }
.user-nav { display: flex; align-items: center; gap: 15px; }

/* --- الحاويات --- */
.container {
    width: 90%; max-width: 950px; margin: 3rem auto;
    background: var(--surface); padding: 3rem;
    border-radius: var(--radius); box-shadow: var(--shadow);
    animation: fadeIn 0.5s ease;
}
.wide { max-width: 1300px; } /* توسيع للأدمن */

/* كارت تسجيل الدخول */
.login-card {
    width: 90%; max-width: 420px; margin: 5vh auto;
    background: var(--surface); padding: 2.5rem;
    border-radius: var(--radius); box-shadow: var(--shadow);
    text-align: center; border-top: 6px solid var(--primary);
}

/* --- الحقول والأزرار --- */
.form-group { margin-bottom: 1.2rem; text-align: right; }
.form-section { margin-bottom: 2rem; border-bottom: 1px solid #eee; padding-bottom: 1rem; }
.form-section h3 { color: var(--primary); margin-bottom: 15px; font-size: 1.1rem; border-right: 4px solid var(--secondary); padding-right: 10px; }
.form-section h4 { color: var(--grey); font-size: 0.95rem; margin-top: 20px; border-bottom: 1px dashed #eee; padding-bottom: 5px; }

label { display: block; margin-bottom: 8px; font-weight: 600; color: #444; font-size: 0.9rem; }
.required-star { color: #e74c3c; margin-right: 3px; }

input, select {
    width: 100%; padding: 12px 15px;
    border: 1px solid #ddd; border-radius: 8px;
    font-family: inherit; font-size: 1rem;
    background: #fdfdfd; box-sizing: border-box;
    transition: 0.3s;
}
input:focus, select:focus {
    border-color: var(--primary); outline: none;
    box-shadow: 0 0 0 4px rgba(6, 147, 173, 0.1);
}
/* إزالة أسهم الأرقام */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* تنسيق رفع الملفات */
input[type="file"] {
    padding: 10px; background: #f0f0f0; border: 1px dashed #ccc;
}

/* الأزرار */
button {
    cursor: pointer; font-family: inherit; font-weight: bold;
    border-radius: 8px; transition: all 0.3s; font-size: 1rem;
}
.primary-btn {
    background: linear-gradient(135deg, var(--primary), #057a91);
    color: white; padding: 12px 30px; border: none; width: 100%;
    box-shadow: 0 4px 10px rgba(6, 147, 173, 0.2);
}
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(6, 147, 173, 0.3); }

.secondary-btn {
    background: white; color: var(--primary);
    border: 1px solid var(--primary); padding: 8px 20px;
}
.secondary-btn:hover { background: var(--bg); }
.back-btn { background: none; border: none; color: var(--grey); font-size: 1.2rem; float: left; padding: 0; }

/* زر "تم التقديم" الجديد */
.btn-applied {
    background: #e8f5e9; color: #2e7d32;
    border: 1px solid #c8e6c9; cursor: not-allowed;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    width: 100%; padding: 12px;
}
.btn-applied i { font-size: 1.1rem; }

/* البطاقات */
.cards-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px;
}
.program-card {
    background: var(--surface); border: 1px solid #eee;
    border-radius: var(--radius); padding: 20px;
    transition: all 0.3s; position: relative;
    border-top: 5px solid var(--primary);
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    display: flex; flex-direction: column; justify-content: space-between;
    min-height: 240px;
}
.program-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.card-type-job { border-top-color: var(--secondary); }
.card-type-training { border-top-color: var(--primary); }

.badge { padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: bold; color: white; display: inline-block; }
.badge-male { background: #2980b9; }
.badge-female { background: #c0392b; }
.badge-both { background: var(--success); }

.alert-box {
    background-color: #fff3cd; color: #856404;
    border: 1px solid #ffeeba; padding: 15px;
    border-radius: 8px; margin-bottom: 20px;
    display: flex; align-items: center; justify-content: space-between;
}

/* الجداول */
table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 15px; }
th { background: var(--primary); color: white; padding: 12px; text-align: right; font-size: 0.9rem; }
td { border-bottom: 1px solid #eee; padding: 10px; background: #fff; vertical-align: middle; font-size: 0.95rem; }
th:first-child { border-top-right-radius: 10px; }
th:last-child { border-top-left-radius: 10px; }

.filter-input {
    width: 90%; padding: 6px; margin-top: 5px;
    border: 1px solid #82c6d4; border-radius: 4px;
    font-size: 0.8rem; color: #333;
}
.filter-input::placeholder { color: #eee; opacity: 0.7; }

/* Grid Layouts */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.tabs-container { display: flex; gap: 10px; margin-bottom: 25px; border-bottom: 2px solid #eee; padding-bottom: 10px; }
.tab-btn { background: none; border: none; padding: 10px 20px; color: #666; border-radius: 8px; }
.tab-btn.active { background: rgba(6, 147, 173, 0.1); color: var(--primary); font-weight: bold; }

@media (max-width: 768px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .container { padding: 1.5rem; width: 95%; margin: 1rem auto; }
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }