:root {
  --green-900: #064e3b;
  --green-800: #075e54;
  --green-700: #0f766e;
  --green-100: #e5f4ef;
  --gold: #b8872f;
  --gold-100: #fbf3df;
  --red: #b91c1c;
  --ink: #17211f;
  --muted: #65716d;
  --line: #dfe7e3;
  --surface: #ffffff;
  --bg: #f5f8f6;
  --shadow: 0 24px 60px rgba(6, 78, 59, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Tajawal", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.8;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
}

.brand,
.admin-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--green-800), var(--green-700));
  color: white;
  font-weight: 800;
  box-shadow: 0 18px 34px rgba(7, 94, 84, .25);
}

.brand strong,
.admin-brand strong {
  display: block;
  color: var(--green-800);
  font-size: 1.25rem;
  font-weight: 800;
}

.brand small,
.admin-brand small {
  display: block;
  color: var(--muted);
  line-height: 1.3;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.nav-links a {
  padding: 10px 16px;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a:first-child {
  background: var(--green-100);
  color: var(--green-800);
}

.hero {
  padding: 72px 0 46px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 44px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--gold-100);
  color: #7a531a;
  font-weight: 800;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 1.05;
  letter-spacing: 0;
  color: var(--green-900);
}

.hero p {
  color: var(--muted);
  font-size: 1.2rem;
  max-width: 650px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: white;
  color: var(--green-800);
  font-weight: 800;
  cursor: pointer;
}

.btn-primary {
  background: var(--green-800);
  color: white;
  border-color: var(--green-800);
  box-shadow: 0 20px 40px rgba(7, 94, 84, .22);
}

.btn-gold {
  background: var(--gold);
  color: white;
  border-color: var(--gold);
}

.hero-card {
  position: relative;
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(180deg, #ffffff, #f8fbfa);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.member-card-preview {
  aspect-ratio: 85.6 / 53.98;
  border-radius: 24px;
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.88), rgba(255,255,255,.92)),
    linear-gradient(135deg, rgba(184,135,47,.18), rgba(7,94,84,.15));
  border: 1px solid rgba(7, 94, 84, .18);
}

.card-strip {
  height: 9px;
  border-radius: 99px;
  background: var(--gold);
  margin-bottom: 18px;
}

.member-card-preview h3 {
  margin: 0;
  color: var(--green-900);
  font-size: 1.35rem;
}

.member-card-preview .badge {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff7e6;
  color: #8a5c19;
  font-weight: 800;
  margin: 12px 0;
}

.card-lines {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.card-lines span {
  display: block;
  height: 10px;
  border-radius: 99px;
  background: rgba(7, 94, 84, .12);
}

.section {
  padding: 58px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 28px;
}

.section-title h2 {
  margin: 0 0 10px;
  color: var(--green-900);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.section-title p {
  margin: 0;
  color: var(--muted);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card,
.form-card,
.stat-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(6, 78, 59, .07);
}

.feature-card {
  padding: 22px;
}

.feature-card strong {
  display: block;
  color: var(--green-900);
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
}

.form-shell {
  width: min(760px, calc(100% - 32px));
  margin: 44px auto;
}

.form-card {
  padding: clamp(22px, 4vw, 34px);
}

.form-card h1,
.form-card h2 {
  margin: 0 0 12px;
  color: var(--green-900);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.field.full { grid-column: 1 / -1; }
.field label { font-weight: 800; color: var(--green-900); }

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fbfdfc;
  color: var(--ink);
}

.field textarea { min-height: 110px; resize: vertical; }

.hint {
  color: var(--muted);
  font-size: .92rem;
}

.alert {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.alert-success { background: #ecfdf5; border-color: #bbf7d0; color: #065f46; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }

.membership-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.membership-option {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
}

.membership-option input { margin-left: 6px; }
.membership-option strong { display: block; color: var(--green-900); }
.membership-option span { display: block; color: var(--muted); font-size: .9rem; }

.site-footer {
  border-top: 1px solid var(--line);
  background: white;
  color: var(--muted);
}

.admin-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  background: var(--green-900);
  color: white;
}

.admin-sidebar .brand-mark {
  background: rgba(255,255,255,.12);
}

.admin-brand {
  margin-bottom: 28px;
}

.admin-brand strong,
.admin-brand small {
  color: white;
}

.admin-sidebar nav {
  display: grid;
  gap: 8px;
}

.admin-sidebar nav a {
  padding: 12px 14px;
  border-radius: 14px;
  color: rgba(255,255,255,.88);
}

.admin-sidebar nav a:hover {
  background: rgba(255,255,255,.1);
}

.admin-main {
  padding: 28px;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.admin-topbar h1 {
  margin: 0;
  color: var(--green-900);
}

.admin-topbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.stat-card {
  padding: 18px;
  overflow: hidden;
  position: relative;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 7px;
  height: 100%;
  background: var(--green-700);
}

.stat-card strong {
  display: block;
  font-size: 2rem;
  color: var(--green-900);
  line-height: 1;
}

.stat-card span {
  color: var(--muted);
}

.panel {
  padding: 20px;
  margin-bottom: 20px;
}

.soft-panel {
  background: #f8fbfa;
  box-shadow: none;
}

.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.detail-head h2 {
  margin: 0;
  color: var(--green-900);
}

.details-grid,
.files-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.details-grid div,
.files-grid div {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 14px;
}

.details-grid strong,
.details-grid span {
  display: block;
}

.details-grid strong {
  color: var(--green-900);
}

.details-grid span {
  color: var(--muted);
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 740px;
}

th, td {
  text-align: right;
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--green-900);
  background: #f8fbfa;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: .86rem;
}

.status-new,
.status-pending,
.status-draft { background: #fff7ed; color: #9a3412; }
.status-approved { background: #ecfdf5; color: #047857; }
.status-rejected { background: #fef2f2; color: #b91c1c; }
.status-open { background: #eff6ff; color: #1d4ed8; }
.status-closed { background: #f1f5f9; color: #475569; }
.status-completed { background: #f0fdf4; color: #15803d; }
.status-cancelled { background: #fef2f2; color: #b91c1c; }

.mobile-card-preview {
  display: none;
}

.volunteer-card-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 18px;
  margin: 22px 0;
}

.digital-card {
  position: relative;
  aspect-ratio: 85.6 / 53.98;
  border-radius: 22px;
  overflow: hidden;
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.92), rgba(255,255,255,.82)),
    radial-gradient(circle at 25% 70%, color-mix(in srgb, var(--card-color) 18%, transparent), transparent 42%),
    #fff;
  border: 1px solid rgba(7, 94, 84, .15);
  box-shadow: var(--shadow);
}

.digital-card-strip {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 10px;
  background: var(--card-color);
}

.digital-card-org {
  display: block;
  color: var(--green-900);
  font-size: .95rem;
  margin-bottom: 12px;
}

.digital-card-badge {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-color) 14%, white);
  color: var(--card-color);
  font-weight: 800;
}

.digital-card h2 {
  margin: 16px 0;
  color: var(--green-900);
}

.digital-card dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 18px;
  margin: 0;
}

.digital-card dt {
  color: var(--muted);
  font-size: .86rem;
}

.digital-card dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.digital-card-back {
  background-image: url("../img/card-back.jpg");
  background-size: cover;
  background-position: center;
}

@media (max-width: 900px) {
  .header-inner,
  .footer-inner,
  .hero-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .hero {
    padding-top: 36px;
  }

  .cards-grid,
  .stats-grid,
  .form-grid,
  .membership-options,
  .details-grid,
  .files-grid {
    grid-template-columns: 1fr;
  }

  .admin-body {
    display: block;
  }

  .admin-sidebar {
    position: relative;
    height: auto;
  }

  .admin-main {
    padding: 18px;
  }

  .volunteer-card-stack {
    grid-template-columns: 1fr;
  }
}
