/* برنامج الخدام — نفس ستايل الماكابس: كحلي غامق، كروت كريمي، أحمر، حواف ملونة */
:root {
  --navy: #0e3a52;
  --navy-dark: #0a2c40;
  --cream: #fdf6e0;
  --cream-dark: #f3e9c8;
  --red: #d32f2f;
  --red-dark: #b71c1c;
  --teal: #2a9d8f;
  --gold: #e0a526;
  --text: #1c2b36;
  --muted: #6b7a85;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  background: var(--navy);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 76px;
}
h1, h2, h3 { color: #fff; font-weight: 900; }
.page { max-width: 1100px; margin: 0 auto; padding: 16px; }
.page-title { font-size: 1.5rem; text-align: center; margin: 10px 0 4px; }
.page-sub { color: #cfe3ee; text-align: center; margin-bottom: 18px; font-size: .95rem; }

/* الهيدر */
.topbar {
  background: var(--navy-dark);
  padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20;
  border-bottom: 2px solid rgba(255,255,255,.08);
}
.topbar .brand { color: #fff; font-weight: 900; font-size: 1.15rem; }
.topbar .who { color: #b8d4e4; font-size: .85rem; }
.topbar button { background: none; border: 1px solid #3d637c; color: #cfe3ee; border-radius: 8px; padding: 4px 10px; font-family: inherit; cursor: pointer; }

/* الكروت */
.card {
  background: var(--cream);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  border-top: 7px solid var(--navy);
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.card.red { border-top-color: var(--red); }
.card.teal { border-top-color: var(--teal); }
.card.gold { border-top-color: var(--gold); }
.card h3 { color: var(--text); font-size: 1.1rem; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.card .sub { color: var(--muted); font-size: .85rem; margin-bottom: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.inner {
  background: #fff; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid #eee3c8;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
.inner .meta { color: var(--muted); font-size: .8rem; }

/* الشارات */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; color: #fff; }
.badge.navy { background: var(--navy); }
.badge.red { background: var(--red); }
.badge.teal { background: var(--teal); }
.badge.gold { background: var(--gold); color: #4a3500; }
.badge.gray { background: #9aa7af; }

/* الأزرار */
.btn {
  display: inline-block; border: none; cursor: pointer; font-family: inherit; font-weight: 700;
  border-radius: 10px; padding: 9px 16px; font-size: .95rem; text-decoration: none; text-align: center;
}
.btn.red { background: var(--red); color: #fff; width: 100%; padding: 12px; }
.btn.red:hover { background: var(--red-dark); }
.btn.navy { background: var(--navy); color: #fff; }
.btn.teal { background: var(--teal); color: #fff; }
.btn.gold { background: var(--gold); color: #4a3500; }
.btn.ghost { background: transparent; border: 1.5px solid var(--navy); color: var(--navy); }
.btn.sm { padding: 5px 12px; font-size: .83rem; }
.btn.wa { background: #25d366; color: #fff; }
.btn.call { background: #1976d2; color: #fff; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* الفورم */
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1.5px solid #d8cba4;
  background: #fff; font-family: inherit; font-size: .95rem; margin-bottom: 10px;
}
label { display: block; font-weight: 700; font-size: .88rem; margin-bottom: 4px; }
textarea { resize: vertical; min-height: 70px; }

/* شريط التنقل السفلي */
.bottomnav {
  position: fixed; bottom: 0; right: 0; left: 0; z-index: 30;
  background: var(--cream); display: flex; justify-content: space-around;
  border-top: 2px solid var(--navy); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  max-width: 640px; margin: 0 auto; border-radius: 18px 18px 0 0;
  box-shadow: 0 -3px 14px rgba(0,0,0,.3);
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--navy); text-decoration: none; font-size: .72rem; font-weight: 700;
  padding: 4px 8px; border-radius: 10px; min-width: 56px;
}
.bottomnav a .ico { font-size: 1.25rem; }
.bottomnav a.active { color: var(--red); }
.bottomnav a.active .ico { transform: scale(1.15); }

/* تسجيل الدخول */
.login-wrap { max-width: 420px; margin: 8vh auto 0; padding: 16px; }
.login-wrap .logo { text-align: center; color: #fff; margin-bottom: 18px; }
.login-wrap .logo .big { font-size: 2rem; font-weight: 900; }
.login-wrap .logo .small { color: #b8d4e4; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs button { flex: 1; padding: 9px; border-radius: 10px; border: none; font-family: inherit; font-weight: 700; cursor: pointer; background: #e9dfc2; color: var(--navy); }
.tabs button.on { background: var(--red); color: #fff; }

/* مخطط الكنيسة */
.plan { position: relative; background: #efe7cf; border-radius: 12px; overflow: hidden; }
.plan svg { display: block; width: 100%; height: auto; }
.pin { position: absolute; transform: translate(-50%, -100%); font-size: 1.4rem; cursor: pointer; text-shadow: 0 1px 3px rgba(0,0,0,.4); }

/* الجدول الأسبوعي */
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
th, td { padding: 7px 9px; text-align: right; border-bottom: 1px solid #eadfc0; }
th { color: var(--navy); font-weight: 900; }

.progress { background: #e9dfc2; border-radius: 999px; height: 10px; overflow: hidden; }
.progress > div { background: var(--red); height: 100%; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 5px 12px; border-radius: 999px; border: 1.5px solid var(--navy); background: #fff; font-family: inherit; font-weight: 700; font-size: .83rem; cursor: pointer; color: var(--navy); }
.chip.on-present { background: var(--teal); color: #fff; border-color: var(--teal); }
.chip.on-absent { background: var(--red); color: #fff; border-color: var(--red); }
.chip.on-late { background: var(--gold); color: #4a3500; border-color: var(--gold); }

.muted { color: var(--muted); font-size: .85rem; }
.ok-msg { background: #e3f4ea; color: #1d6b40; border-radius: 10px; padding: 10px; margin-bottom: 10px; font-weight: 700; }
.err-msg { background: #fde3e3; color: var(--red-dark); border-radius: 10px; padding: 10px; margin-bottom: 10px; font-weight: 700; }
.warn-box { background: #fff3d6; border: 1.5px solid var(--gold); border-radius: 10px; padding: 10px 12px; margin: 8px 0; font-size: .9rem; }

@media (min-width: 768px) {
  .bottomnav { position: sticky; bottom: 0; border-radius: 18px; margin-top: 20px; }
  body { padding-bottom: 20px; }
}

/* ===== Hero styles (login + home) ===== */
.hero-login { text-align: center; padding: 26px 10px 20px; }
.hero-login .badge-new { display: inline-block; background: var(--red); color: #fff; font-weight: 700; font-size: .8rem; border-radius: 999px; padding: 4px 14px; margin-bottom: 18px; }
.hero-login .church {
  width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #1d5c80, var(--navy-dark));
  border: 3px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center; font-size: 3rem;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
.hero-login .appname { color: #fff; font-size: 2.6rem; font-weight: 900; letter-spacing: .5px; }
.hero-login .tagline { color: #b8d4e4; font-size: 1rem; margin-top: 6px; line-height: 1.8; }
.login-card { border-radius: 20px !important; padding: 22px !important; }
.login-card label { color: var(--navy); }
.login-foot { text-align: center; color: #7ea6bd; font-size: .8rem; margin-top: 16px; }

.hero-home {
  background: linear-gradient(160deg, #155a7d, var(--navy-dark));
  border-radius: 22px; padding: 22px 20px; margin-bottom: 18px;
  border-bottom: 6px solid var(--red);
  box-shadow: 0 4px 18px rgba(0,0,0,.35);
  display: flex; align-items: center; gap: 16px;
}
.hero-home .church { font-size: 2.6rem; background: rgba(255,255,255,.12); border-radius: 18px; width: 68px; height: 68px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hero-home .hi { color: #fff; font-size: 1.35rem; font-weight: 900; }
.hero-home .date { color: #b8d4e4; font-size: .85rem; margin-top: 2px; }
.hero-home .bless { color: #f4cf8a; font-size: .88rem; margin-top: 6px; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.quick-tile {
  background: var(--cream); border-radius: 16px; padding: 14px 6px; text-align: center;
  text-decoration: none; color: var(--navy); font-weight: 700; font-size: .82rem;
  border-top: 5px solid var(--teal); box-shadow: 0 2px 8px rgba(0,0,0,.22);
}
.quick-tile .qi { font-size: 1.7rem; display: block; margin-bottom: 6px; }
.quick-tile.gold { border-top-color: var(--gold); }
.quick-tile.red { border-top-color: var(--red); }
.quick-tile.navy { border-top-color: var(--navy); }
.quick-tile:active { transform: scale(.97); }

.section-label { color: #cfe3ee; font-weight: 900; font-size: 1.05rem; margin: 18px 2px 10px; }
