/* لجنة الزكاة في غزة — البقاع الغربي */
:root {
  --teal: #0f5257;
  --teal-dark: #0a3a3e;
  --gold: #c9922b;
  --gold-light: #f3e3c3;
  --bg: #f4f1ea;
  --card: #ffffff;
  --ink: #22303a;
  --muted: #6b7a86;
  --line: #e3ddd0;
  --red: #c0392b;
  --green: #1e7e4e;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(15, 82, 87, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

.site-header {
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  color: #fff;
  padding: 28px 16px 24px;
  text-align: center;
}
.site-header .emblem { font-size: 44px; line-height: 1; }
.site-header h1 { margin: 10px 0 4px; font-size: 26px; }
.site-header .sub { color: var(--gold-light); font-size: 15px; margin: 0; }
.gold-bar { height: 5px; background: linear-gradient(90deg, var(--gold), #e8c26a, var(--gold)); }

.wrap { max-width: 780px; margin: 0 auto; padding: 20px 14px 60px; }
.wrap-wide { max-width: 1150px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 18px;
}

.intro-card { border-inline-start: 5px solid var(--gold); }
.intro-card p { margin: 6px 0; }
.intro-quote { font-weight: 700; color: var(--teal); font-size: 17px; }

.section-title {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 4px; font-size: 19px; color: var(--teal);
}
.section-weight {
  font-size: 12.5px; font-weight: 700; color: var(--gold);
  background: var(--gold-light); border-radius: 999px; padding: 2px 12px;
  white-space: nowrap;
}
.section-desc { color: var(--muted); font-size: 14px; margin: 0 0 14px; }

.field { margin-bottom: 16px; }
.field > label, .q-label { display: block; font-weight: 700; margin-bottom: 7px; }
.req { color: var(--red); }

input[type='tel'] { direction: ltr; text-align: right; }

input[type='text'], input[type='tel'], input[type='number'], textarea, select {
  width: 100%; padding: 10px 12px; font: inherit;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: #fcfbf8; color: var(--ink);
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 82, 87, 0.12);
}
textarea { min-height: 110px; resize: vertical; }

.choices { display: flex; flex-direction: column; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--line); border-radius: 10px;
  padding: 9px 13px; cursor: pointer; background: #fcfbf8;
  transition: border-color 0.15s, background 0.15s;
}
.choice:hover { border-color: var(--gold); }
.choice input { accent-color: var(--teal); width: 18px; height: 18px; margin: 0; flex: none; }
.choice.checked { border-color: var(--teal); background: #eef4f3; font-weight: 700; }

.file-field input[type='file'] { display: none; }
.file-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px dashed var(--gold); color: var(--teal);
  background: #fffdf7; border-radius: 10px; padding: 10px 16px;
  cursor: pointer; font-weight: 700;
}
.file-btn:hover { background: var(--gold-light); }
.file-name { font-size: 13.5px; color: var(--muted); margin-inline-start: 10px; }
.file-hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.declaration {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fffdf7; border: 1.5px solid var(--gold);
  border-radius: 10px; padding: 12px 14px; font-weight: 700;
}
.declaration input { width: 20px; height: 20px; accent-color: var(--teal); margin-top: 3px; flex: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; cursor: pointer;
  border: none; border-radius: 10px; padding: 12px 26px;
  background: var(--teal); color: #fff; transition: background 0.15s;
}
.btn:hover { background: var(--teal-dark); }
.btn:disabled { opacity: 0.55; cursor: wait; }
.btn-lg { width: 100%; font-size: 18px; padding: 14px; }
.btn-ghost { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }
.btn-ghost:hover { background: #eef4f3; }
.btn-sm { padding: 7px 14px; font-size: 14px; }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #96291c; }

.alert {
  border-radius: 10px; padding: 12px 15px; margin-bottom: 16px; font-weight: 700;
}
.alert-error { background: #fdecea; color: var(--red); border: 1px solid #f5c6c0; }
.alert-success { background: #e8f5ee; color: var(--green); border: 1px solid #bfe3cf; }

.success-screen { text-align: center; padding: 44px 20px; }
.success-screen .big { font-size: 60px; }
.success-screen h2 { color: var(--teal); }

.site-footer { text-align: center; color: var(--muted); font-size: 13.5px; padding: 18px; }
.site-footer a { color: var(--teal); }

/* ================= الداشبورد ================= */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; text-align: center; box-shadow: var(--shadow);
}
.stat .num { font-size: 26px; font-weight: 800; color: var(--teal); }
.stat .lbl { font-size: 12.5px; color: var(--muted); }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: center; }
.toolbar input, .toolbar select { width: auto; flex: 1 1 180px; }

.table-scroll { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.list th {
  background: var(--teal); color: #fff; padding: 10px 12px; font-size: 14px;
  text-align: right; white-space: nowrap;
}
table.list td { padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 14.5px; white-space: nowrap; }
table.list tbody tr { cursor: pointer; }
table.list tbody tr:hover { background: #f6f3ec; }

.badge { display: inline-block; border-radius: 999px; padding: 2px 12px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.badge-p80 { background: #f8cbad; color: #7a2e0e; }
.badge-p65 { background: #ffe699; color: #7a5c00; }
.badge-p50 { background: #fff2cc; color: #7a6a1e; }
.badge-p35 { background: #e2efda; color: #2e5e3a; }
.badge-p0  { background: #ededed; color: #555; }
.badge-dup { background: #fdecea; color: var(--red); }

/* شارات حالة الطلب */
.badge-st-new   { background: #d6e8f7; color: #1b4f7a; }
.badge-st-study { background: #fdf0d3; color: #8a6207; }
.badge-st-ok    { background: #d9f0e2; color: #1e6e42; }
.badge-st-hold  { background: #e8e2f5; color: #5b4494; }
.badge-st-no    { background: #fadbd7; color: #99271b; }
.badge-st-paid  { background: #d3ecec; color: #0f5257; }

.st-date { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
tr.row-new td { font-weight: 700; }
tr.row-new td:first-child { box-shadow: inset 4px 0 0 #1b4f7a; }

/* أزرار فلترة الحالات */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  background: var(--card); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 14px;
  transition: border-color 0.15s, background 0.15s;
}
.chip:hover { border-color: var(--gold); }
.chip.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.chip-count {
  background: rgba(15, 82, 87, 0.1); border-radius: 999px;
  padding: 1px 9px; font-size: 12.5px;
}
.chip.active .chip-count { background: rgba(255, 255, 255, 0.22); }

.score-cell { font-weight: 800; color: var(--teal); }

/* نافذة التفاصيل */
.modal-back {
  position: fixed; inset: 0; background: rgba(20, 30, 35, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 18px 12px; z-index: 50;
}
.modal {
  background: var(--bg); border-radius: var(--radius); max-width: 720px; width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  display: flex; flex-direction: column; max-height: calc(100dvh - 36px);
}
.modal-head { flex: none; }
.modal-body { overflow-y: auto; flex: 1; }
.modal-foot {
  flex: none; display: flex; align-items: center; gap: 10px;
  background: var(--card); border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius); padding: 11px 16px;
}
.modal-foot select { width: auto; flex: 1; max-width: 240px; }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--teal); color: #fff; border-radius: var(--radius) var(--radius) 0 0;
  padding: 14px 18px;
}
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-close { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; line-height: 1; }
.modal-body { padding: 18px; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.detail-grid .item { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.detail-grid .k { font-size: 12.5px; color: var(--muted); }
.detail-grid .v { font-weight: 700; }
@media (max-width: 560px) { .detail-grid { grid-template-columns: 1fr; } }

.doc-link {
  display: inline-flex; gap: 6px; align-items: center;
  background: #fffdf7; border: 1.5px solid var(--gold); color: var(--teal);
  border-radius: 10px; padding: 7px 13px; margin: 4px 6px 4px 0;
  text-decoration: none; font-weight: 700; font-size: 14px;
}
.doc-link:hover { background: var(--gold-light); }

.login-box { max-width: 400px; margin: 60px auto; }
.hidden { display: none !important; }

/* ================= شريط التنقل ================= */
.topnav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  background: var(--teal-dark); color: #fff;
  padding: 10px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.brand {
  color: #fff; text-decoration: none; font-weight: 800; font-size: 17px;
  display: flex; align-items: center; gap: 8px;
}
.nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-links a {
  color: #dcebe9; text-decoration: none; font-weight: 700; font-size: 14.5px;
  padding: 7px 11px; border-radius: 8px; transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.nav-links .nav-cta {
  background: var(--gold); color: #fff;
}
.nav-links .nav-cta:hover { background: #b07f20; color: #fff; }

/* ================= الواجهة (Hero) ================= */
.hero {
  background:
    radial-gradient(1100px 500px at 50% -100px, rgba(201, 146, 43, 0.25), transparent 60%),
    linear-gradient(160deg, var(--teal-dark) 0%, var(--teal) 60%, #14666c 100%);
  color: #fff; text-align: center;
}
.hero-inner { max-width: 820px; margin: 0 auto; padding: 64px 18px 58px; }
.hero .emblem { font-size: 64px; line-height: 1; }
.hero h1 { font-size: clamp(30px, 6vw, 44px); margin: 14px 0 4px; }
.hero-sub { color: var(--gold-light); font-size: 18px; margin: 0 0 18px; }
.hero-quote {
  font-size: clamp(15px, 2.6vw, 18px); font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px; display: inline-block;
  padding: 10px 22px; margin: 0 0 26px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-gold { background: var(--gold); }
.btn-gold:hover { background: #b07f20; }
.btn-outline {
  background: transparent; border: 2px solid rgba(255, 255, 255, 0.6); color: #fff;
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.12); }

/* ================= أقسام الصفحة الرئيسية ================= */
.section { padding: 52px 0; }
.section-alt { background: #ece7db; }
.sec-title {
  text-align: center; color: var(--teal); font-size: clamp(24px, 4.5vw, 30px);
  margin: 0 0 26px;
}
.sec-desc { text-align: center; max-width: 720px; margin: -10px auto 26px; color: var(--muted); }
.sec-note { text-align: center; color: var(--muted); font-size: 14px; margin-top: 18px; }
.center { text-align: center; margin-top: 26px; }

.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: start; }
.about-card { font-size: 16.5px; border-inline-start: 5px solid var(--gold); margin-bottom: 0; }
.values { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.value-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; text-align: center; box-shadow: var(--shadow);
}
.value-card .v-icon { font-size: 30px; }
.value-card h3 { margin: 6px 0 4px; color: var(--teal); font-size: 17px; }
.value-card p { margin: 0; font-size: 13.5px; color: var(--muted); }

.activity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.activity-card {
  margin-bottom: 0; text-decoration: none; color: inherit; display: block;
  transition: transform 0.15s, box-shadow 0.15s;
}
.activity-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(15, 82, 87, 0.16); }
.activity-card .a-icon { font-size: 38px; }
.activity-card h3 { color: var(--teal); margin: 8px 0 6px; }
.activity-card p { color: var(--muted); font-size: 14.5px; margin: 0; }
.activity-card.featured { border: 2px solid var(--gold); background: #fffdf7; }
.a-cta { display: inline-block; margin-top: 10px; color: var(--gold); font-weight: 800; }

.score-bars { max-width: 640px; margin: 0 auto 20px; display: flex; flex-direction: column; gap: 10px; }
.score-row { display: flex; align-items: center; gap: 12px; }
.s-label { flex: 0 0 150px; font-weight: 700; font-size: 14.5px; }
.s-track { flex: 1; background: #e3ddd0; border-radius: 999px; height: 28px; overflow: hidden; }
.s-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), #17767d);
  color: #fff; font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: flex-end;
  padding-inline-end: 10px; min-width: 34px;
}
.levels-strip { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 16px; text-align: center; box-shadow: var(--shadow); position: relative;
}
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gold); color: #fff; font-weight: 800; font-size: 19px;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 10px;
}
.step h3 { margin: 0 0 6px; color: var(--teal); font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

.contact-card { text-align: center; font-size: 16.5px; }

.footer-dark {
  background: var(--teal-dark); color: #cfe0de; padding: 30px 14px 18px;
}
.footer-grid {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap; padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14); margin-bottom: 14px;
}
.brand-foot { font-weight: 800; font-size: 18px; color: #fff; }
.footer-dark p { margin: 4px 0; }
.footer-links { display: flex; gap: 6px; flex-wrap: wrap; }
.footer-links a {
  color: #cfe0de; text-decoration: none; font-size: 14px; padding: 5px 9px; border-radius: 7px;
}
.footer-links a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.copyright { text-align: center; font-size: 13px; color: #9fb8b5; margin: 0; }

/* ================= أدوات إضافية ================= */
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.pager {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 16px; font-weight: 700; color: var(--muted);
}
.pager button:disabled { opacity: 0.4; cursor: default; }

/* بطاقات الطلبات للموبايل (تظهر بدل الجدول على الشاشات الصغيرة) */
.cards-list { display: none; flex-direction: column; gap: 10px; }
.req-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 14px; box-shadow: var(--shadow); cursor: pointer;
}
.req-card:active { background: #f4f0e7; }
.req-card.rc-new { border-inline-start: 4px solid #1b4f7a; }
.rc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 7px; }
.rc-name { font-weight: 800; font-size: 15.5px; }
.rc-score {
  background: var(--teal); color: #fff; font-weight: 800;
  border-radius: 999px; padding: 2px 12px; font-size: 14px; flex: none;
}
.rc-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.rc-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }

/* ================= استجابة الشاشات ================= */
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .table-scroll { display: none; }
  .cards-list { display: flex; }
  .stat { padding: 8px 10px; }
  .stat .num { font-size: 21px; }
  .stat .lbl { font-size: 11.5px; }
  .site-header { padding: 18px 12px 14px; }
  .site-header .emblem { font-size: 34px; }
  .site-header h1 { font-size: 21px; }
  .chips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .chip { flex: none; }
}
@media (max-width: 640px) {
  .topnav { padding: 8px 10px; justify-content: center; }
  .brand { font-size: 15.5px; }
  .nav-links a { font-size: 13px; padding: 6px 8px; }
  .two-cols { grid-template-columns: 1fr; }
  .s-label { flex-basis: 118px; font-size: 13px; }
  .hero-inner { padding: 44px 14px 40px; }
  .section { padding: 38px 0; }
  .values { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .card { padding: 16px; }
  .footer-grid { flex-direction: column; text-align: center; }
  table.list th, table.list td { padding: 8px 8px; font-size: 13.5px; }
  .modal-back { padding: 12px 6px; }
}
