:root {
  --g: #087a48;
  --g2: #16a567;
  --red: #d9362e;
  --ink: #17231d;
  --muted: #68776e;
  --line: #dce9e0;
  --soft: #f4faf6
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: linear-gradient(135deg, #f8fcf9, #edf8f1);
  color: var(--ink);
  font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif
}

button,
input,
textarea,
select {
  font: inherit;
  min-height: 44px
}

button {
  cursor: pointer
}

.ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  text-align: left
}

.app {
  max-width: 1180px;
  margin: auto;
  padding: 12px
}

.box,
.card,
.editor,
header {
  background: #fffffff2;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 25px #126d3b12
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 17px;
  margin-bottom: 16px
}

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

.logo {
  width: 46px;
  height: 46px;
  border: 2px solid var(--g);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--g);
  font-size: 25px;
  font-weight: bold;
  background: #e0f6e8
}

.brand h1 {
  margin: 0;
  color: var(--g);
  font-size: 23px
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px
}

.primary {
  border: 0;
  border-radius: 11px;
  padding: 10px 16px;
  background: var(--g);
  color: #fff;
  font-weight: bold
}

.secondary {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 16px;
  background: #fff;
  color: var(--g)
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 16px;
  margin-bottom: 16px
}

.hero .box {
  padding: 24px
}

.eyebrow {
  color: var(--g);
  font-weight: bold
}

.hero h2 {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.2;
  margin: 12px 0
}

.hero h2 span {
  color: var(--red)
}

.hero p {
  line-height: 2;
  color: #506158
}

.notice {
  padding: 12px;
  border: 1px solid #f1dda0;
  border-radius: 11px;
  background: #fff7db;
  color: #735c13;
  font-size: 13px;
  line-height: 1.8
}

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

.stat {
  display: flex;
  justify-content: space-between;
  padding: 11px;
  border-radius: 11px;
  background: #eaf8ef;
  font-size: 13px
}

.stat b {
  color: var(--g)
}

.tabs {
  display: flex;
  gap: 7px;
  overflow: auto;
  margin-bottom: 16px
}

.tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 15px;
  background: #fff;
  color: var(--g);
  font-weight: bold
}

.tab.active {
  background: var(--g);
  color: #fff
}

.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 10px 0 14px
}

.heading h2 {
  margin: 0;
  font-size: 22px
}

.heading p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px
}

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

.card {
  padding: 18px
}

.need-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start
}

.tag {
  color: var(--red);
  font-weight: bold;
  font-size: 13px
}

.need h3 {
  margin: 6px 0 8px;
  font-size: 21px
}

.description {
  font-size: 14px;
  line-height: 1.9;
  color: #596a61
}

.badge {
  font-size: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  white-space: nowrap
}

.pending {
  color: #856213;
  background: #fff3d3
}

.verified {
  color: var(--g);
  background: #dff5e7
}

.complete {
  color: #37528a;
  background: #e9efff
}

.progress {
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line)
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 7px
}

.progress-label b {
  color: var(--g)
}

.bar {
  height: 11px;
  border-radius: 8px;
  background: #dcefe3;
  overflow: hidden
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--g2), var(--g))
}

.amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 10px
}

.amounts div {
  padding: 8px;
  background: var(--soft);
  border-radius: 9px;
  font-size: 12px
}

.amounts strong {
  display: block;
  color: var(--g);
  margin-top: 4px
}

.payments {
  display: grid;
  gap: 7px;
  margin-top: 14px
}

.payment {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  padding: 10px;
  background: var(--soft);
  border-radius: 10px;
  font-size: 13px
}

.payment b {
  color: var(--g);
  overflow-wrap: anywhere
}

.copy {
  border: 0;
  border-radius: 8px;
  padding: 5px 8px;
  min-height: 34px;
  background: #dff4e7;
  color: var(--g)
}

.contact {
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  background: #fff5f4;
  color: #8f332d;
  font-size: 13px
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px
}

.account {
  padding: 16px
}

.account h3 {
  margin: 0 0 10px;
  color: var(--g)
}

.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px
}

.account-row:last-child {
  border: 0
}

.status {
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 999px;
  white-space: nowrap
}

.used {
  color: #a52c27;
  background: #ffe6e3
}

.available {
  color: var(--g);
  background: #dff5e7
}

.fixed {
  color: #37528a;
  background: #e9efff
}

.form,
.admin {
  padding: 20px
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: bold
}

input,
textarea,
select {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfefc;
  color: var(--ink)
}

textarea {
  min-height: 105px;
  resize: vertical
}

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

.actions {
  display: flex;
  gap: 8px;
  margin-top: 14px
}

.account-choice {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff
}

.account-choice small {
  display: block;
  color: var(--muted);
  font-weight: normal;
  margin-top: 4px
}

.danger-mini {
  border: 1px solid #ffd4d0;
  border-radius: 8px;
  padding: 6px 9px;
  min-height: 34px;
  background: #fff;
  color: #a52c27;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap
}

.danger-mini:hover {
  background: #fff5f4
}

.warning {
  padding: 12px;
  border: 1px solid #f1dda0;
  border-radius: 11px;
  background: #fff7db;
  color: #735c13;
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 14px
}

.editor {
  padding: 16px;
  margin-bottom: 14px
}

.editor h3 {
  margin: 0 0 12px;
  color: var(--g)
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  background: #eaf8ef
}

.check input {
  width: auto;
  min-height: auto
}

.design-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 18px;
  align-items: start
}

.design-editor {
  padding: 18px
}

.poster-wrap {
  display: flex;
  justify-content: center
}

.poster {
  position: relative;
  width: min(100%, 700px);
  aspect-ratio: 700/900;
  overflow: hidden;
  padding: 3.5%;
  background: linear-gradient(145deg, #fff, #f3faf5);
  border: 7px solid white;
  box-shadow: 0 12px 30px #126d3b22
}

.poster:before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .1;
  background: repeating-linear-gradient(30deg, transparent 0 25px, #9bbfaa 26px 28px, transparent 29px 55px)
}

.widget {
  position: absolute;
  z-index: 2;
  overflow: hidden;
  padding: 4px;
  text-align: center;
  line-height: 1.45;
  word-break: break-word;
  touch-action: none;
  user-select: none;
  cursor: grab
}

.widget.selected {
  outline: 2px dashed var(--red);
  outline-offset: 3px
}

.title-widget {
  font-weight: bold;
  text-decoration: underline
}

.payment-widget {
  background: #e5f4ea;
  border-radius: 10px;
  white-space: pre-line
}

.contact-widget {
  color: var(--g);
  font-weight: bold
}

.widget-list {
  display: grid;
  gap: 6px;
  margin-bottom: 15px
}

.widget-list button {
  text-align: right;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 8px;
  color: var(--g)
}

.widget-list button.active {
  background: var(--g);
  color: #fff
}

.small-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  place-items: center;
  padding: 16px;
  background: #10251b88
}

.modal.open {
  display: grid
}

.modal-box {
  max-width: 440px;
  padding: 21px;
  border-radius: 18px;
  background: #fff
}

.modal-box h3 {
  color: var(--g)
}

.modal-box p {
  line-height: 1.9;
  color: #53645a
}

.toast {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 400px;
  margin: auto;
  padding: 12px;
  border-radius: 10px;
  background: #14231c;
  color: #fff;
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
  transition: .25s
}

.toast.show {
  opacity: 1;
  transform: translateY(0)
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 24px 0 8px
}

@media(max-width:900px) {
  .hero {
    grid-template-columns: 1fr
  }

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

  .design-layout {
    grid-template-columns: 1fr
  }
}

@media(max-width:620px) {
  .hero .box {
    padding: 19px 16px
  }

  .needs,
  .account-grid,
  .grid {
    grid-template-columns: 1fr
  }

  .full {
    grid-column: auto
  }

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

  .heading {
    align-items: stretch;
    flex-direction: column
  }

  .heading button,
  .actions button {
    width: 100%
  }

  .actions {
    flex-direction: column
  }

  .payment {
    align-items: flex-start
  }
}
