/* form-uae.com — Arabic RTL lead form */

:root {
  --ink:       #0f1f1c;
  --ink-soft:  #4a5f5a;
  --line:      #dfe5e1;
  --bg:        #f4f6f3;
  --surface:   #ffffff;
  --brand:     #0d6b4f;
  --brand-dk:  #0a5540;
  --brand-tint:#e8f3ee;
  --accent:    #c8a24a;
  --danger:    #b3261e;
  --radius:    14px;
  --shadow:    0 1px 2px rgba(16,32,28,.05),
               0 12px 32px -12px rgba(16,32,28,.18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:       #eaf1ee;
    --ink-soft:  #9db0aa;
    --line:      #26332f;
    --bg:        #0b100e;
    --surface:   #131a18;
    --brand:     #3fae86;
    --brand-dk:  #56c79d;
    --brand-tint:#16241f;
    --accent:    #d9b76a;
    --danger:    #ef8b84;
    --shadow:    0 1px 2px rgba(0,0,0,.4),
                 0 12px 32px -12px rgba(0,0,0,.6);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 1rem;
  font-family: "Tajawal", "Segoe UI", "Noto Sans Arabic", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(1100px 480px at 82% -12%, color-mix(in srgb, var(--brand) 13%, transparent), transparent 70%),
    radial-gradient(900px 420px at 10% 108%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 70%);
  background-attachment: fixed;
}

.shell {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* ---------- card ---------- */

.card {
  width: 100%;
  max-width: 540px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 5vw, 2.5rem);
}

.card.wide  { max-width: 1100px; }
.card.center { text-align: center; }

.card-head { margin-bottom: 1.75rem; }

.badge {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--brand);
  background: var(--brand-tint);
  border-radius: 999px;
  padding: .3rem .85rem;
  margin-bottom: .9rem;
}

h1 {
  margin: 0 0 .5rem;
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.3;
}

.lede { margin: 0; color: var(--ink-soft); font-size: .97rem; }

/* ---------- fields ---------- */

.field { margin-bottom: 1.15rem; }

label {
  display: block;
  margin-bottom: .4rem;
  font-weight: 500;
  font-size: .93rem;
}

.req { color: var(--danger); font-weight: 700; }
.opt { color: var(--ink-soft); font-weight: 400; font-size: .85rem; }

input, textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: .72rem .9rem;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

input::placeholder, textarea::placeholder { color: var(--ink-soft); opacity: .65; }

input:focus, textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--brand);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--brand) 18%, transparent);
}

input.invalid, textarea.invalid { border-color: var(--danger); }

textarea { resize: vertical; min-height: 110px; line-height: 1.65; }

/* LTR fields still align to the right edge in an RTL form */
input[dir="ltr"] { text-align: right; }

.err {
  display: block;
  margin-top: .35rem;
  font-size: .85rem;
  color: var(--danger);
}

/* honeypot — off-screen, never focusable by sighted users */
.hp {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- button ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  margin-top: .5rem;
  padding: .85rem 1.5rem;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, transform .08s, box-shadow .15s;
  box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--brand) 75%, transparent);
}

.btn:hover  { background: var(--brand-dk); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent);
  outline-offset: 2px;
}

.btn.small { width: auto; padding: .55rem 1.1rem; font-size: .9rem; }

.privacy {
  margin: 1rem 0 0;
  text-align: center;
  font-size: .84rem;
  color: var(--ink-soft);
}

/* ---------- alert ---------- */

.alert {
  background: color-mix(in srgb, var(--danger) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--danger) 32%, transparent);
  border-radius: 10px;
  padding: .85rem 1.05rem;
  margin-bottom: 1.25rem;
  font-size: .9rem;
  color: var(--danger);
}
.alert ul { margin: .4rem 0 0; padding-inline-start: 1.15rem; }

/* ---------- success ---------- */

.tick {
  width: 76px; height: 76px;
  margin: 0 auto 1.25rem;
  display: grid; place-items: center;
  color: var(--brand);
  background: var(--brand-tint);
  border-radius: 50%;
  animation: pop .45s cubic-bezier(.2,.9,.3,1.3);
}

@keyframes pop {
  from { transform: scale(.55); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.card.center .lede { margin-bottom: 1.75rem; }
.card.center .btn  { width: auto; padding-inline: 1.75rem; }

@media (prefers-reduced-motion: reduce) {
  .tick { animation: none; }
  * { transition: none !important; }
}

/* ---------- admin ---------- */

.admin-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.admin-head h1 { font-size: 1.5rem; }

.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

table { width: 100%; border-collapse: collapse; font-size: .9rem; }

th, td {
  padding: .7rem .85rem;
  text-align: right;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--brand-tint);
  font-weight: 700;
  white-space: nowrap;
  position: sticky;
  top: 0;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: color-mix(in srgb, var(--brand) 4%, transparent); }

td.msg  { max-width: 340px; white-space: pre-wrap; word-break: break-word; }
td.date { white-space: nowrap; color: var(--ink-soft); font-size: .82rem; }

h2.sub {
  margin: 0 0 .35rem;
  font-size: 1.2rem;
  font-weight: 700;
}
h2.sub + .lede { margin-bottom: 1.25rem; }

.tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 11%, transparent);
  border-radius: 999px;
  padding: .12rem .6rem;
}

.empty, .note {
  text-align: center;
  color: var(--ink-soft);
  padding: 2rem 0 0;
  font-size: .9rem;
}

/* ---------- footer ---------- */

.foot {
  display: flex;
  gap: .5rem;
  font-size: .82rem;
  color: var(--ink-soft);
}
.foot .dot { opacity: .5; }
.lede .dot { opacity: .45; margin-inline: .35rem; }
