:root {
  --bg: #12070a;
  --cream: #f7f1e7;
  --cream-dim: #d9cbb8;
  --gold: #e6b15a;
  --gold-2: #f3d7a1;
  --wine: #8e2f3a;
  --ink: #1a0e10;
  --line: rgba(230, 177, 90, 0.32);
  --card: rgba(255, 246, 236, 0.07);
  --danger: #ffc1c1;
  --ok: #c9efd4;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
  --serif: "Fraunces", "Noto Naskh Arabic", Georgia, serif;
  --sans: "Manrope", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  font-family: var(--sans);
  font-size: 1.02rem;
  line-height: 1.55;
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(142, 47, 58, 0.55), transparent 60%),
    radial-gradient(700px 480px at 110% 0%, rgba(230, 177, 90, 0.18), transparent 55%),
    linear-gradient(180deg, #241014 0%, var(--bg) 42%, #0c0608 100%);
}

html[dir="rtl"] body { font-family: "Noto Naskh Arabic", var(--sans); }

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 0.6px, transparent 0.6px);
  background-size: 4px 4px;
  opacity: 0.12;
  mix-blend-mode: soft-light;
}

::selection { background: var(--gold); color: var(--ink); }

a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--gold);
  color: var(--ink);
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  z-index: 20;
}

.skip:focus { top: 1rem; }

.sky { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  animation: drift 16s ease-in-out infinite;
}

.orb-a {
  width: 280px;
  height: 280px;
  left: -80px;
  top: 12vh;
  background: rgba(142, 47, 58, 0.35);
}

.orb-b {
  width: 220px;
  height: 220px;
  right: -40px;
  bottom: 8vh;
  background: rgba(230, 177, 90, 0.16);
  animation-delay: -6s;
}

.leaf {
  position: absolute;
  top: -12vh;
  width: 12px;
  height: 16px;
  background: linear-gradient(160deg, var(--gold-2), #c4783a);
  border-radius: 0 80% 0 80%;
  opacity: 0.75;
  animation: fall linear infinite;
}

.l1 { left: 6%; animation-duration: 15s; animation-delay: -2s; }
.l2 { left: 18%; animation-duration: 18s; animation-delay: -9s; width: 9px; }
.l3 { left: 32%; animation-duration: 13s; animation-delay: -4s; }
.l4 { left: 47%; animation-duration: 17s; animation-delay: -11s; }
.l5 { left: 61%; animation-duration: 14s; animation-delay: -6s; width: 10px; }
.l6 { left: 73%; animation-duration: 19s; animation-delay: -1s; }
.l7 { left: 84%; animation-duration: 16s; animation-delay: -8s; }
.l8 { left: 93%; animation-duration: 12s; animation-delay: -3s; width: 8px; }

.top, main, .foot {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.top {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 0 0.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  min-width: 0;
}

.logo {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 640;
}
.brand-text small { color: var(--cream-dim); font-size: 0.78rem; }

.nav {
  margin-inline-start: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.7rem;
}

.nav-link {
  text-decoration: none;
  color: var(--cream-dim);
  padding: 0.35rem 0.15rem;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

html[dir="rtl"] .nav-link::after { transform-origin: right; }
.nav-link:hover, .nav-link.is-active { color: var(--cream); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }

.langs {
  display: flex;
  gap: 0.3rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
}

.lang {
  text-decoration: none;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  color: var(--cream-dim);
  font-size: 0.92rem;
}

.lang.is-on, .lang:hover { background: var(--gold); color: var(--ink); }

main { padding: 0.75rem 0 2rem; }

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr);
  gap: 1.5rem 2rem;
  align-items: start;
}

.hero-logo {
  width: min(340px, 100%);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  margin: 0 0 0.85rem;
  border-radius: 50%;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--gold-2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0;
}

h1 { font-size: clamp(2.15rem, 4vw, 3.35rem); }
.hero-copy h1 { animation: rise 0.8s ease both; }
.lede, .card-lead { color: var(--cream-dim); font-size: 1.08rem; }
.lede { max-width: 36rem; }

.points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: 1.4rem 0 0;
  list-style: none;
}

.points li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  animation: rise 0.7s ease both;
}

.points li:nth-child(2) { animation-delay: 0.08s; }
.points li:nth-child(3) { animation-delay: 0.16s; }

.card {
  background: linear-gradient(180deg, rgba(255, 248, 240, 0.1), rgba(255, 248, 240, 0.04));
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.form-card, .login-card, .desk-card { padding: 1.5rem 1.4rem 1.35rem; }
.form-card { animation: rise 0.9s ease 0.05s both; }
.form-card h2, .login-card h1 { font-size: 2rem; margin-bottom: 0.35rem; }

.field { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.9rem; }
.field:first-of-type { margin-top: 0; }

label { font-weight: 650; font-size: 0.95rem; }
label.req::after { content: " *"; color: var(--gold); }

.picker { position: relative; }
.picker-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: start;
  background: rgba(8, 3, 5, 0.45);
  border: 1px solid rgba(247, 241, 231, 0.16);
  border-radius: 14px;
  padding: 0.82rem 0.95rem;
  color: var(--cream);
  cursor: pointer;
}
.picker-btn:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(230, 177, 90, 0.18);
}
.picker-label { flex: 1; min-width: 0; }
.picker-chevron {
  width: 9px;
  height: 9px;
  flex: none;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg) translateY(-2px);
}
.picker.is-open .picker-chevron { transform: rotate(225deg) translateY(-1px); }
.picker-menu {
  position: absolute;
  z-index: 25;
  inset-inline: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: #241418;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
  max-height: 240px;
  overflow: auto;
}
.picker-menu[hidden] { display: none; }
.picker-menu li {
  padding: 0.7rem 0.85rem;
  border-radius: 11px;
  cursor: pointer;
  color: var(--cream);
}
.picker-menu li:hover,
.picker-menu li.is-on,
.picker-menu li.is-active {
  background: rgba(230, 177, 90, 0.2);
  color: var(--gold-2);
}
.picker > select.city-select {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

input, select, textarea {
  width: 100%;
  background: rgba(8, 3, 5, 0.45);
  border: 1px solid rgba(247, 241, 231, 0.16);
  border-radius: 14px;
  padding: 0.82rem 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  color-scheme: dark;
}

textarea { resize: vertical; min-height: 96px; }

#PhoneBox, #CaptchaBox, #FromBox, #ToBox { direction: ltr; }
html[dir="rtl"] #PhoneBox, html[dir="rtl"] #CaptchaBox { text-align: right; }

input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(230, 177, 90, 0.18);
}

.hint, .counter { color: var(--cream-dim); font-size: 0.84rem; margin: 0; }
.label-row { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }

.field-error { color: var(--danger); margin: 0; font-size: 0.9rem; }
.field-error[hidden] { display: none; }

.captcha-block { margin-top: 0.4rem; }
.captcha-row { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.9rem; }
.captcha-row img {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #2a1214;
}

.text-btn, .btn {
  border: 0;
  cursor: pointer;
}

.text-btn {
  background: transparent;
  color: var(--gold-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0.4rem;
}

.btn {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  padding: 0.85rem 1.3rem;
  font-weight: 750;
  margin-top: 1rem;
}

.btn-gold {
  background: linear-gradient(180deg, #f3d7a1, #d3923d);
  color: #2a1408;
  box-shadow: 0 12px 30px rgba(211, 146, 61, 0.28);
}

.btn-gold::after, .btn-ghost::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-130%);
}

.btn-gold:hover::after { animation: sweep 0.8s ease; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line);
}

.banner {
  margin: 0.8rem 0 0.2rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: rgba(142, 47, 58, 0.35);
  border: 1px solid rgba(255, 193, 193, 0.35);
  color: var(--danger);
  animation: rise 0.35s ease;
}

.banner-ok {
  background: rgba(80, 130, 90, 0.28);
  border-color: rgba(201, 239, 212, 0.4);
  color: var(--ok);
}

.banner-info {
  background: rgba(230, 177, 90, 0.12);
  border-color: var(--line);
  color: var(--gold-2);
}

.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(8, 3, 4, 0.66);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(440px, 100%);
  text-align: center;
  padding: 2rem 1.5rem 1.5rem;
  border-radius: 28px;
  background: linear-gradient(180deg, #3a1c22, #241014);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: rise 0.45s ease;
}

.modal-card h2 { font-size: 2.4rem; margin-bottom: 0.4rem; }
.modal-card p { color: var(--cream-dim); }

.seal {
  width: 84px;
  height: 84px;
  margin: 0 auto 0.8rem;
  animation: seal 0.55s ease both;
}

.seal svg { width: 100%; height: 100%; }
.seal circle { fill: none; stroke: var(--gold); stroke-width: 2; }
.seal path {
  fill: none;
  stroke: var(--gold-2);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: draw 0.6s ease 0.25s forwards;
}

body.modal-open { overflow: hidden; }

.login-wrap {
  min-height: calc(100vh - 220px);
  display: grid;
  place-items: center;
}

.login-card { width: min(460px, 100%); animation: rise 0.7s ease both; }

.page-head { margin: 0.4rem 0 1.1rem; animation: rise 0.6s ease both; }
.page-head h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
.page-head .lede { margin-bottom: 0; }

.desk-card + .desk-card { margin-top: 1rem; }

.split, .filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  align-items: flex-end;
}

.split .grow, .filters .field { flex: 1 1 180px; margin-top: 0; }
.split .btn, .filters .btn { margin-top: 0; }

.total {
  margin: 0 0 0.8rem;
  font-family: var(--serif);
  font-size: 1.6rem;
}

.table-scroll { overflow-x: auto; }

.grid {
  width: 100%;
  border-collapse: collapse;
}

.table-scroll .grid { min-width: 720px; }

.grid th {
  text-align: start;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-2);
  padding: 0.75rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

.grid td {
  padding: 0.85rem 0.8rem;
  border-bottom: 1px solid rgba(247, 241, 231, 0.08);
  vertical-align: top;
  word-break: break-word;
}

.grid tbody tr { animation: rise 0.45s ease both; }
.grid tbody tr:nth-child(2) { animation-delay: 0.04s; }
.grid tbody tr:nth-child(3) { animation-delay: 0.08s; }
.grid tbody tr:nth-child(4) { animation-delay: 0.12s; }
.grid tbody tr:hover td { background: rgba(230, 177, 90, 0.07); }

.empty { padding: 1.4rem 0.2rem; color: var(--cream-dim); }

.pager, .pager td { border: 0 !important; }
.pager a, .pager span {
  display: inline-block;
  margin-inline-end: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  text-decoration: none;
}
.btn-delete {
  display: inline-block;
  background: transparent;
  color: #ffc1c1;
  border: 1px solid rgba(255, 193, 193, 0.45);
  border-radius: 999px;
  padding: 0.32rem 0.8rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
}
.btn-delete:hover { background: rgba(142, 47, 58, 0.55); }

.pager a { color: var(--gold-2); }
.pager span { background: var(--gold); color: var(--ink); }

.foot {
  padding: 0 0 1.6rem;
  color: var(--cream-dim);
  font-size: 0.88rem;
}

@keyframes fall {
  0% { transform: translate3d(0, -10vh, 0) rotate(0deg); opacity: 0; }
  12% { opacity: 0.8; }
  100% { transform: translate3d(30px, 110vh, 0) rotate(220deg); opacity: 0.15; }
}

@keyframes drift {
  50% { transform: translateY(-18px) scale(1.05); }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes sweep {
  from { transform: translateX(-130%); }
  to { transform: translateX(130%); }
}

@keyframes seal {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes draw { to { stroke-dashoffset: 0; } }

@media (max-width: 900px) {
  body { overflow-x: hidden; }
  .top, main, .foot { width: min(1120px, calc(100% - 1.5rem)); }
  .top {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
  }
  .brand { justify-content: center; }
  .logo { width: 54px; height: 54px; }
  .brand-text { align-items: flex-start; }
  html[dir="rtl"] .brand-text { align-items: flex-end; }
  .brand-text strong { font-size: 1.15rem; }
  .nav {
    margin-inline-start: 0;
    width: 100%;
    justify-content: center;
  }
  .hero { grid-template-columns: 1fr; min-height: 0; justify-items: center; }
  .hero-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
  }
  .hero-logo { width: 168px; margin: 0.1rem auto 0.45rem; }
  .hero-copy .eyebrow,
  .hero-copy h1 { text-align: center; width: 100%; }
  .hero-copy h1 { font-size: 1.85rem; }
  .form-card { width: 100%; }
  .orb-a { left: 50%; opacity: 0.2; transform: translateX(-50%); }
  .grid { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  body { background: white; color: black; }
  .sky, .top, .foot, .filters, .btn, .btn-delete, .banner { display: none !important; }
  .card { box-shadow: none; background: white; border-color: #ccc; }
  .grid, .grid th, .grid td, .total { color: black; }
  .grid { min-width: 0; }
}
