@font-face {
  font-family: 'Yekan Bakh';
  src: url('/fonts/YekanBakh-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Yekan Bakh';
  src: url('/fonts/YekanBakh-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Yekan Bakh';
  src: url('/fonts/YekanBakh-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Yekan Bakh';
  src: url('/fonts/YekanBakh-Black.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}

:root {
  --brand: #05985a;
  --brand-dark: #047747;
  --brand-tint: #e7f6ee;
  --navy: #253343;
  --text-2: #5b6b78;
  --text-3: #8a97a3;
  --bg: #f4f7f6;
  --card: #ffffff;
  --line: #e4eae7;
  --line-2: #eef2f0;
  --warn: #b26a00;
  --warn-tint: #fff4e0;
  --danger: #c0392b;
  --danger-tint: #fdecea;
  --ok-tint: #e7f6ee;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 10px 30px rgba(37, 51, 67, 0.07);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Yekan Bakh', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--navy);
  direction: rtl;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--brand-dark);
  text-decoration: none;
}
button {
  font-family: inherit;
}
input,
select,
textarea {
  font-family: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-2);
}
.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 18px;
}
.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 6px 16px rgba(5, 152, 90, 0.28);
}
.logo small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  line-height: 1.2;
}
.spacer {
  flex: 1;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 18px 60px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 860px) {
  .grid-2 {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card-plain {
  box-shadow: none;
}
.card h2 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
}
.card-sub {
  color: var(--text-3);
  font-size: 12px;
  margin-bottom: 14px;
}

.hero {
  background: linear-gradient(135deg, #05985a 0%, #058a63 55%, #0c7f6f 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 16px 40px rgba(5, 152, 90, 0.25);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  inset-inline-start: -60px;
  bottom: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.hero-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.hero h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 900;
}
.hero .hero-sub {
  margin: 4px 0 0;
  font-size: 12.5px;
  opacity: 0.85;
}
.hero .days {
  font-size: 40px;
  font-weight: 900;
  line-height: 1.15;
  margin-top: 8px;
}
.hero .days small {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.85;
  margin-inline-start: 6px;
}
.status-pill {
  margin-inline-start: auto;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.hero .hero-hint {
  margin: 10px 0 0;
  font-size: 12px;
  opacity: 0.9;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, opacity 0.15s ease;
  background: transparent;
  color: var(--navy);
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 20px rgba(5, 152, 90, 0.26);
}
.btn-primary:hover {
  background: var(--brand-dark);
}
.btn-soft {
  background: var(--brand-tint);
  color: var(--brand-dark);
}
.btn-ghost {
  border-color: var(--line);
  background: #fff;
}
.btn-danger {
  background: var(--danger-tint);
  color: var(--danger);
}
.btn-sm {
  min-height: 38px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 11px;
}
.btn-block {
  width: 100%;
}
.btn-link {
  min-height: 0;
  padding: 0;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-2);
}
.input {
  width: 100%;
  min-height: 48px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: #fbfcfc;
  padding: 0 14px;
  font-size: 14px;
  color: var(--navy);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-tint);
  background: #fff;
}
textarea.input {
  min-height: 84px;
  padding: 12px 14px;
  resize: vertical;
}
.hint {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.8;
}
.error-text {
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 600;
  min-height: 18px;
}

.tabs {
  display: flex;
  background: var(--line-2);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
}
.tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  min-height: 40px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
}
.tabs button.active {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(37, 51, 67, 0.08);
}

.plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 700px) {
  .plans {
    grid-template-columns: repeat(3, 1fr);
  }
}
.plan {
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  cursor: pointer;
  background: #fff;
  text-align: start;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.plan strong {
  display: block;
  font-size: 14px;
}
.plan .price {
  font-size: 19px;
  font-weight: 900;
  margin-top: 6px;
}
.plan .price small {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
}
.plan .per {
  font-size: 11px;
  color: var(--text-3);
}
.plan.selected {
  border-color: var(--brand);
  background: var(--brand-tint);
}

.pay-box {
  background: #f8fbf9;
  border: 1px dashed #bcd9ca;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-number {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.card-number b {
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  font-size: 16px;
  letter-spacing: 1px;
  direction: ltr;
}
.mini {
  font-size: 11px;
  color: var(--text-3);
}
.copy-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  min-height: 30px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-2);
}

.upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.receipt-preview {
  max-width: 120px;
  max-height: 120px;
  border-radius: 12px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 12px;
  background: #fbfcfc;
}
.row-main {
  flex: 1;
  min-width: 0;
}
.row-title {
  font-size: 13.5px;
  font-weight: 700;
}
.row-meta {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.chip-pending {
  background: var(--warn-tint);
  color: var(--warn);
}
.chip-approved {
  background: var(--ok-tint);
  color: var(--brand-dark);
}
.chip-rejected {
  background: var(--danger-tint);
  color: var(--danger);
}
.chip-blocked {
  background: var(--danger-tint);
  color: var(--danger);
}
.chip-active {
  background: var(--ok-tint);
  color: var(--brand-dark);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 760px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
}
.stat b {
  display: block;
  font-size: 24px;
  font-weight: 900;
}
.stat span {
  font-size: 11.5px;
  color: var(--text-3);
}

.search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.empty {
  text-align: center;
  color: var(--text-3);
  font-size: 12.5px;
  padding: 26px 10px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 28, 0.4);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 18px;
  z-index: 50;
}
.modal {
  background: #fff;
  border-radius: 22px;
  padding: 20px;
  width: min(560px, 100%);
  max-height: 88vh;
  overflow: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
}
.modal img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin: 10px 0;
}

.toast {
  position: fixed;
  bottom: 20px;
  inset-inline-start: 50%;
  transform: translateX(50%);
  background: var(--navy);
  color: #fff;
  padding: 11px 18px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  z-index: 80;
  max-width: 88vw;
  text-align: center;
}
.toast.error {
  background: var(--danger);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.section-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.section-head .muted {
  margin-inline-start: auto;
  font-size: 11.5px;
  color: var(--text-3);
}

.badge-trial {
  background: var(--warn-tint);
  color: var(--warn);
}
.footer-note {
  text-align: center;
  color: var(--text-3);
  font-size: 11px;
  margin-top: 26px;
  line-height: 2;
}
.shop-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
}
@media (min-width: 760px) {
  .shop-actions {
    width: auto;
    flex-wrap: nowrap;
    align-self: center;
  }
}
.row .chip {
  align-self: flex-start;
}
.plan-edit {
  align-items: flex-end;
  flex-wrap: wrap;
}
.plan-edit .field {
  min-width: 120px;
}

@media (max-width: 520px) {
  .hero .days {
    font-size: 34px;
  }
  .wrap {
    padding: 16px 14px 48px;
  }
  .card {
    padding: 16px;
  }
}
