:root {
  --green: #0c9d65;
  --deep-green: #0a7a50;
  --blue: #0b5fa5;
  --sand: #f5f5f0;
  --text: #0f172a;
  --muted: #6b7280;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(12, 157, 101, 0.08), transparent 25%),
    radial-gradient(circle at 80% 0%, rgba(11, 95, 165, 0.09), transparent 30%),
    linear-gradient(135deg, #f7f9fb, #ffffff);
  color: var(--text);
  direction: rtl;
  min-height: 100vh;
}

a {
  color: var(--blue);
  text-decoration: none;
}

header.hero {
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(12, 157, 101, 0.95), rgba(11, 95, 165, 0.9));
  color: #fff;
  border-bottom-left-radius: 32px;
  border-bottom-right-radius: 32px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

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

.hero .brand img {
  height: 64px;
}

.hero h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.2px;
}

.hero p {
  margin: 0;
  opacity: 0.9;
}

.card {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 12px 36px rgba(12, 157, 101, 0.08);
  margin-bottom: 18px;
}

.grid {
  display: grid;
  gap: 16px;
}

.two-col {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #0f172a;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  font-family: inherit;
  transition: border 0.2s, box-shadow 0.2s, background 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(12, 157, 101, 0.15);
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  background: linear-gradient(135deg, var(--green), var(--blue));
  color: #fff;
  box-shadow: 0 12px 24px rgba(12, 157, 101, 0.18);
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(11, 95, 165, 0.2);
}

button.secondary {
  background: #e0f2ef;
  color: var(--deep-green);
  box-shadow: none;
  border: 1px solid rgba(12, 157, 101, 0.15);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title h2 {
  margin: 0;
  font-size: 20px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list .item {
  padding: 12px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fdfefe;
}

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

.badge {
  background: rgba(11, 95, 165, 0.12);
  color: var(--blue);
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

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

.charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.charts canvas {
  width: 100% !important;
  height: 260px !important;
}

/* Survey page */
body.survey-page {
  background: linear-gradient(135deg, rgba(12, 157, 101, 0.12), rgba(11, 95, 165, 0.16)), #f9fbfd;
  color: #0b1b2b;
  font-size: 18px;
}

.survey-wrapper {
  max-width: 820px;
  margin: 30px auto;
  padding: 0 18px 32px;
}

.survey-card {
  padding: 24px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(11, 95, 165, 0.12);
  border: 1px solid #e3eef7;
}

.survey-header {
  text-align: center;
  margin-bottom: 20px;
}

.survey-header h2 {
  margin: 10px 0 4px;
  font-size: 26px;
  color: var(--deep-green);
}

.survey-header p {
  margin: 0;
  color: #4b5563;
}

.success {
  background: #e8f6ef;
  border: 1px solid rgba(12, 157, 101, 0.4);
  color: var(--deep-green);
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
  font-weight: 600;
}

.error {
  background: #ffecee;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
  font-weight: 600;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: right;
  padding: 8px 10px;
  border-bottom: 1px solid #eef2f7;
}

.table th {
  background: #f8fafc;
}

.tag {
  background: rgba(12, 157, 101, 0.12);
  color: var(--deep-green);
  padding: 4px 10px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 12px;
}

.link {
  color: var(--blue);
  word-break: break-all;
}
