@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;600;700&family=Tajawal:wght@300;500;700&display=swap");

:root {
  --bg: #0d2f2e;
  --bg-deep: #0a2321;
  --teal: #0b6b63;
  --teal-bright: #0b8a7c;
  --accent: #e5282a;
  --text: #f5f7f8;
  --muted: #c9d5d4;
  --card: #0f3a36;
  --stroke: #1c4e49;
  --shadow: 0 24px 50px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Tajawal", "Poppins", sans-serif;
  background: radial-gradient(circle at top, #114744 0%, var(--bg) 45%, var(--bg-deep) 100%);
  color: var(--text);
  min-height: 100vh;
}

body[dir="ltr"] {
  font-family: "Poppins", "Tajawal", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  background: rgba(8, 23, 22, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}

.topbar__contact {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dot {
  opacity: 0.6;
}

.lang-toggle {
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--text);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  min-height: calc(100vh - 54px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(12, 39, 38, 0.9), rgba(7, 20, 20, 0.4));
}

.hero__content {
  position: relative;
  max-width: 800px;
  text-align: center;
  z-index: 1;
}

.hero__logo img {
  width: 220px;
  height: auto;
  display: block;
  margin: 0 auto 24px;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin: 0 0 12px;
}

.hero p {
  font-size: 18px;
  margin: 0 0 28px;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  width: auto;
}

.btn {
  padding: 12px 28px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn--primary {
  background: var(--teal);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 16px 30px rgba(11, 138, 124, 0.25);
}

.btn--ghost {
  border: 1px solid var(--teal-bright);
  color: var(--text);
  background: transparent;
}

.btn--primary:hover {
  background: #0a5e57;
  box-shadow: 0 18px 34px rgba(11, 138, 124, 0.35);
}

.btn--ghost:hover {
  background: rgba(11, 138, 124, 0.15);
}

.btn--danger:hover {
  background: rgba(229, 40, 42, 0.12);
}

.site-header {
  max-width: 1100px;
  margin: 20px auto 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}

.page {
  max-width: 900px;
  margin: 30px auto 80px;
  padding: 0 20px;
}

body[data-page="admin"] .page {
  max-width: 1300px;
}

.card {
  background: linear-gradient(160deg, rgba(14, 63, 59, 0.95), rgba(8, 38, 36, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 32px;
  box-shadow: var(--shadow);
}

body[data-page="admin"] .card {
  padding: 28px;
}

.card h1 {
  margin-top: 0;
  font-size: clamp(24px, 3vw, 32px);
}

.muted {
  color: var(--muted);
  margin-top: 8px;
}

.form {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.form__group {
  display: grid;
  gap: 8px;
}

.form__group input,
.form__group select {
  background: rgba(8, 28, 27, 0.9);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 15px;
  width: 100%;
}

.form__group input:focus,
.form__group select:focus {
  outline: 2px solid rgba(11, 138, 124, 0.6);
  border-color: transparent;
}

.form__message {
  margin: 0;
  font-weight: 600;
  color: var(--accent);
  min-height: 20px;
}

.label--required::after {
  content: " *";
  color: var(--accent);
  font-weight: 700;
}

.is-hidden {
  display: none;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 24px 0 10px;
}

.admin-actions__item {
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(8, 28, 27, 0.7);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.stat {
  padding: 16px;
  border-radius: 12px;
  background: rgba(8, 28, 27, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 10px 0 20px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.card-grid {
  display: none;
  gap: 12px;
  margin-top: 16px;
}

.admin-card {
  background: rgba(8, 28, 27, 0.7);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.admin-card__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
}

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

.admin-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  table-layout: false;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: start;
  font-size: 14px;
  vertical-align: middle;
  word-break: break-word;
}

.data-table th {
  background: rgba(8, 28, 27, 0.8);
}

.data-table tbody tr:hover {
  background: rgba(11, 138, 124, 0.1);
}

.data-table td:last-child {
  min-width: 220px;
  white-space: nowrap;
}

.data-table .btn {
  white-space: nowrap;
}

.data-table th:nth-child(1),
.data-table td:nth-child(1) {
  width: 140px;
}

.data-table th:nth-child(2),
.data-table td:nth-child(2) {
  width: 140px;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
  width: 120px;
}

.data-table th:nth-child(4),
.data-table td:nth-child(4) {
  width: 220px;
}

.data-table th:nth-child(5),
.data-table td:nth-child(5) {
  width: 120px;
}

.data-table th:nth-child(6),
.data-table td:nth-child(6) {
  width: 160px;
}

.data-table th:nth-child(7),
.data-table td:nth-child(7) {
  width: 140px;
}

.btn--danger {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.result {
  display: grid;
  gap: 12px;
  margin: 24px 0;
  padding: 20px;
  border-radius: 16px;
  background: rgba(8, 28, 27, 0.7);
  border: 1px solid var(--stroke);
}

.result__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 16px;
}

.section-title {
  margin-top: 32px;
  font-size: 20px;
}

.list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 10px;
}

.list li {
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(8, 28, 27, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.notice {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

@media (max-width: 768px) {
  .hero {
    padding: 40px 18px;
  }

  .hero__logo img {
    width: 180px;
  }

  .site-header {
    margin-top: 14px;
  }

  .card {
    padding: 24px;
  }

  .result__row {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero__actions,
  .form {
    gap: 12px;
  }

  .btn {
    width: 100%;
  }

  .table-wrap {
    display: none;
  }

  .card-grid {
    display: grid;
  }
}

@media (max-width: 480px) {
  .topbar__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header {
    flex-direction: column;
    gap: 12px;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__content {
    animation: rise 0.9s ease-out both;
  }

  .card {
    animation: fade 0.6s ease-out both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
