:root {
  --bg: #f3f6f8;
  --card: #ffffff;
  --text: #152238;
  --muted: #5a6b7f;
  --line: #dce5ec;
  --primary: #09665b;
  --primary-2: #a10000;
  --danger: #c0392b;
  --radius: 14px;
  --shadow: 0 18px 35px rgba(9, 31, 57, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Tajawal", sans-serif;
  background: linear-gradient(180deg, #f7fafc 0%, var(--bg) 100%);
  color: var(--text);
}

.bg-shape {
  display: none;
}

.bg-shape-a {
  width: 240px;
  height: 240px;
  top: -60px;
  left: -40px;
  background: #88ebd8;
}

.bg-shape-b {
  width: 300px;
  height: 300px;
  bottom: -80px;
  right: -60px;
  background: #9fc0ff;
}

.container {
  width: min(1400px, 96%);
  margin: 28px auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(9, 31, 57, 0.08);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.1);
  background: #fff;
  box-shadow: 0 8px 16px rgba(15, 93, 187, 0.16);
}

.site-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.site-brand-text h2 {
  margin: 0;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
}

.site-lang {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-lang-label {
  color: var(--muted);
  font-weight: 700;
}

#google_translate_element .goog-te-gadget {
  font-family: "Tajawal", sans-serif !important;
  color: transparent !important;
}

#google_translate_element .goog-te-gadget-simple {
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  background: #fff !important;
  padding: 7px 10px !important;
}

#google_translate_element .goog-te-gadget-simple .goog-te-menu-value {
  color: #1f2f44 !important;
  font-size: .92rem !important;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 2rem);
}

.hero p {
  margin: 10px 0 20px;
  color: var(--muted);
}

.hero-actions {
  margin: 0 0 18px;
}

.admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(120deg, #0f5dbb, #0c86e8);
  border-radius: 12px;
  padding: 10px 20px;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(15, 93, 187, 0.22);
}

.admin-link:hover {
  filter: brightness(1.03);
}

.card {
  background: var(--card);
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.progress-wrap {
  margin-bottom: 14px;
}

.steps-labels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.step-label {
  text-align: center;
  font-size: .92rem;
  color: var(--muted);
  background: #f5f8fb;
  padding: 8px 10px;
  border-radius: 10px;
}

.step-label.active {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
}

.progress-bar {
  height: 8px;
  background: #edf2f6;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  transition: width .25s ease;
}

.step-panel {
  display: none;
  animation: fadeIn .25s ease;
}

.step-panel.active {
  display: block;
}

.step-panel h2 {
  margin: 8px 0 16px;
  font-size: 1.12rem;
}

.form-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(9, 102, 91, 0.12);
  border-right: 5px solid var(--primary);
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(9, 102, 91, 0.08), rgba(161, 0, 0, 0.04));
}

.form-section-title span {
  font-size: 1rem;
  font-weight: 800;
  color: #12344a;
  white-space: nowrap;
}

.form-section-title p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  text-align: left;
}

.form-section-title.compact {
  margin-bottom: 12px;
}

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

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #1f2f44;
  font-weight: 600;
  font-size: .95rem;
}

.required-mark {
  color: var(--danger);
  font-weight: 800;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font-family: inherit;
  font-size: .95rem;
  color: var(--text);
  background: #fff;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 121, 107, 0.15);
}

textarea {
  resize: vertical;
}

.full {
  grid-column: 1 / -1;
}

.inline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fafcfd;
}

.inline label,
.checks label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fafcfd;
}

.sub-card {
  border: 1px dashed #b8c9d8;
  border-radius: 12px;
  padding: 14px;
}

.sub-card h3 {
  margin: 0 0 12px;
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 11px 18px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
}

.btn:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
}

.btn-light {
  color: #294160;
  background: #eef3f7;
}

.hidden {
  display: none !important;
}

.message {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  display: none;
  font-weight: 600;
}

.message.ok {
  display: block;
  background: #e9f9f5;
  color: #0b5f53;
}

.message.err {
  display: block;
  background: #fdecea;
  color: var(--danger);
}

.note {
  margin-top: 0;
  color: var(--muted);
}

.check-single {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.invalid {
  border-color: var(--danger) !important;
}

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

@media (max-width: 1200px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
  }

  .site-lang {
    justify-content: space-between;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }

  .form-section-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-section-title p {
    text-align: right;
  }

  .btn {
    width: 100%;
  }
}
