:root {
  --bg: #f7f8f6;
  --surface: #ffffff;
  --text: #19302b;
  --muted: #63736e;
  --primary: #147d78;
  --primary-dark: #0d5f5b;
  --accent: #e5f4f0;
  --border: #dce8e4;
  --shadow: 0 14px 36px rgba(18, 61, 55, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --card: var(--surface);
  --foreground: var(--text);
  --destructive: #c94b4b;
  --destructive-light: #fff0f0;
  --success: #2d8a61;
  --primary-rgb: 20, 125, 120;
  --destructive-rgb: 201, 75, 75;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: "Tajawal", "Cairo", "Inter", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  line-height: 1.6;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

body {
  min-height: 100vh;
}

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

.site-header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border);
}

.nav-brand,
.brand {
  color: var(--primary-dark);
  font-weight: 800;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 1.25rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.nav-items,
.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero {
  display: grid;
  place-items: center;
  min-height: 420px;
  text-align: left;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.25rem);
  line-height: 1.1;
  margin: 0 0 16px;
}

.lead {
  max-width: 700px;
  font-size: 1.1rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.97);
}

.btn-outline {
  background: var(--surface);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-whatsapp {
  background: #25a867;
  color: #fff;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-secondary {
  background: var(--accent);
  color: var(--primary-dark);
}

.section {
  padding: 48px 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
}

.form-group,
.field {
  display: grid;
  gap: 0.5rem;
}

label {
  color: var(--text);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 0.9rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(var(--primary-rgb), 0.15);
  border-color: var(--primary);
}

.card h3 {
  margin-top: 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #fff;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  color: var(--muted);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(460px, 100%);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin-top: 0;
  margin-bottom: 18px;
}

.auth-card form {
  display: grid;
  gap: 16px;
}

.auth-card label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.auth-card input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font: inherit;
}

.box {
  width: min(100%, 480px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.box h1,
.intro h1 {
  color: var(--primary-dark);
}

.box .btn,
.page .btn {
  background: var(--primary);
  color: #fff;
}

.links {
  color: var(--muted);
}

.links a {
  color: var(--primary);
  font-weight: 700;
}

.page {
  min-height: 100vh;
  padding: 1.5rem;
  background: var(--bg);
}

.page > .card {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.topbar {
  border-color: var(--border);
  background: var(--surface);
}

.benefit {
  background: var(--accent);
  border-radius: var(--radius-md);
}

.status-card,
.stat-card,
.request-item,
.admin-table {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

@media (max-width: 700px) {
  .container {
    width: min(100% - 24px, 1100px);
  }

  .nav,
  .dashboard-header,
  .footer-inner {
    gap: 1rem;
    flex-wrap: wrap;
  }

  .nav-links {
    gap: 0.75rem;
  }
}

/* Keep the standalone landing/auth pages on the same design tokens. */
body {
  background: var(--bg) !important;
  color: var(--text) !important;
}

.box,
.page > .card,
.auth-card,
.card,
.service-card,
.form-card {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow) !important;
}

.btn,
button.btn {
  border-radius: var(--radius-md) !important;
  font-weight: 700 !important;
}

.btn-primary,
.box .btn,
.page .btn:not(.btn-secondary):not(.btn-outline) {
  background: var(--primary) !important;
  color: #fff !important;
}

.btn-secondary {
  background: var(--accent) !important;
  color: var(--primary-dark) !important;
}

.w-full {
  width: 100%;
}
