/* ============================================
   هوية منصة لاتكس الزراعية — موقع الفريق الداخلي
   الألوان الأساسية كلها هنا: عدّل قيمة اللون مرة واحدة
   وهيتطبق على كل صفحات الموقع.
   ============================================ */
:root {
  --brown:      #4d3533;   /* البني الأساسي (هوية لاتكس) */
  --brown-dark: #352423;   /* بني أغمق للخلفيات الداكنة */
  --green:      #3e6b3f;   /* الأخضر الزراعي */
  --green-soft: #e7efe4;   /* أخضر فاتح للخلفيات */
  --cream:      #f7f2ec;   /* لون خلفية الصفحات */
  --gold:       #c9a35c;   /* ذهبي لصفحة مميز الشهر */
  --ink:        #2c2320;   /* لون الكتابة الأساسي */
  --muted:      #7a6a64;   /* كتابة هادية */
  --card:       #ffffff;   /* لون الكروت */
  --radius:     16px;
}

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

body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.7;
}

a { color: var(--green); }

/* ===== الهيدر ===== */
.site-header {
  background: var(--brown);
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.site-header img { width: 40px; height: 40px; object-fit: contain; }
.site-header .title { font-weight: 800; font-size: 18px; }
.site-header .sub { font-size: 12px; opacity: .8; }

.nav {
  background: var(--brown-dark);
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 6px 10px;
}
.nav a {
  color: #e9ded6;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  white-space: nowrap;
}
.nav a.active, .nav a:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ===== المحتوى ===== */
.page { max-width: 860px; margin: 0 auto; padding: 22px 16px 60px; }

.page-title { font-size: 22px; font-weight: 800; color: var(--brown); margin-bottom: 4px; }
.page-hint { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 1px 6px rgba(77,53,51,.09);
  border: 1px solid rgba(77,53,51,.07);
}

.badge {
  display: inline-block;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 12px;
}
.badge.brown { background: #efe4de; color: var(--brown); }
.badge.gold  { background: #f6ecd9; color: #8a6a24; }

.month-head {
  display: flex; align-items: center; gap: 10px;
  margin: 26px 0 12px;
}
.month-head h2 { font-size: 18px; color: var(--brown); }
.month-head .line { flex: 1; height: 1px; background: rgba(77,53,51,.18); }

/* ===== تسجيل الدخول ===== */
.login-wrap {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--brown) 0%, var(--brown-dark) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-box {
  background: #fff;
  border-radius: 22px;
  padding: 34px 26px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0,0,0,.3);
}
.login-box img { width: 92px; height: 92px; object-fit: contain; margin-bottom: 8px;
  background: var(--brown); border-radius: 50%; padding: 10px; }
.login-box h1 { color: var(--brown); font-size: 21px; margin-bottom: 4px; }
.login-box p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.code-input {
  width: 100%;
  font-size: 19px;
  letter-spacing: 2px;
  text-align: center;
  padding: 13px;
  border: 2px solid #e0d5ce;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  color: var(--brown);
  margin-bottom: 12px;
  direction: ltr;
}
.code-input:focus { outline: none; border-color: var(--green); }
.btn {
  display: inline-block;
  width: 100%;
  background: var(--green);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 16.5px;
  font-weight: 800;
  padding: 13px;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn:hover { filter: brightness(1.07); }
.btn.brown { background: var(--brown); }
.login-error {
  color: #a33;
  font-size: 14px;
  font-weight: 600;
  min-height: 22px;
  margin-bottom: 8px;
}

/* ===== كروت الداشبورد ===== */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.dash-card {
  display: block;
  text-decoration: none;
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 18px;
  border: 1px solid rgba(77,53,51,.07);
  box-shadow: 0 1px 6px rgba(77,53,51,.09);
  color: var(--ink);
  transition: transform .12s ease;
}
.dash-card:hover { transform: translateY(-2px); }
.dash-card .icon { font-size: 26px; margin-bottom: 8px; }
.dash-card h3 { color: var(--brown); font-size: 16.5px; margin-bottom: 3px; }
.dash-card p { color: var(--muted); font-size: 13.5px; line-height: 1.6; }

.stats { display: flex; gap: 10px; margin: 18px 0 22px; flex-wrap: wrap; }
.stat {
  flex: 1; min-width: 90px;
  background: var(--brown);
  color: #fff;
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
}
.stat .num { font-size: 24px; font-weight: 800; }
.stat .lbl { font-size: 12.5px; opacity: .85; }

/* ===== التقييم ===== */
.score-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.score-row .lbl { width: 110px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.score-bar { flex: 1; height: 10px; background: #eee4dd; border-radius: 99px; overflow: hidden; }
.score-bar i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.score-row .val { width: 46px; text-align: left; font-weight: 800; color: var(--brown); font-size: 14px; }
.avg-chip {
  background: var(--green); color: #fff;
  border-radius: 12px; padding: 6px 16px;
  font-weight: 800; font-size: 15px;
}
.notes-box {
  background: var(--green-soft);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  color: #2f4a30;
  margin-top: 12px;
}

/* ===== مميز الشهر ===== */
.star-hero {
  background: linear-gradient(150deg, var(--brown) 0%, #6b4a3e 100%);
  border-radius: 22px;
  color: #fff;
  text-align: center;
  padding: 34px 22px 30px;
  position: relative;
  overflow: hidden;
}
.star-hero::before {
  content: '🌟';
  position: absolute; font-size: 90px; opacity: .12;
  top: -14px; left: -10px; transform: rotate(-18deg);
}
.star-photo {
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 4px dashed rgba(255,255,255,.5);
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.1);
  overflow: hidden;
  font-size: 12px; color: rgba(255,255,255,.75);
  text-align: center; padding: 8px;
}
.star-photo img { width: 100%; height: 100%; object-fit: cover; }
.star-hero h2 { font-size: 24px; margin-bottom: 2px; }
.star-hero .why { font-size: 14.5px; opacity: .92; margin-top: 10px; line-height: 1.8; }

/* ===== الأعضاء ===== */
.member-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px dashed rgba(77,53,51,.14);
}
.member-row:last-child { border-bottom: none; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brown); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px;
  flex-shrink: 0;
}
.member-row .name { font-weight: 700; font-size: 15px; }
.member-row .meta { font-size: 12.5px; color: var(--muted); }

/* ===== متفرقات ===== */
.empty {
  text-align: center; color: var(--muted);
  padding: 40px 10px; font-size: 14.5px;
}
.loading { text-align: center; color: var(--muted); padding: 30px; }
.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  padding: 20px 0 30px;
}
.footer img { width: 26px; vertical-align: middle; opacity: .6; }
.back-home { font-size: 13px; color: var(--muted); text-decoration: none; }
