:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --ink: #1d2733;
  --muted: #64748b;
  --line: #e6e2d8;
  --brand: #1d5c3f;
  --brand-dark: #164a32;
  --brand-soft: #e9f2ec;
  --gold: #c9a227;
  --gold-soft: #faf3dd;
  --danger: #b3261e;
  --danger-soft: #fdeceb;
  --success: #1f7a3d;
  --success-soft: #e9f6ee;
  --warn: #b45309;
  --warn-soft: #fdf3e3;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(29, 39, 51, 0.08);
  --shadow-sm: 0 4px 14px rgba(29, 39, 51, 0.06);
  --focus: 0 0 0 3px rgba(29, 92, 63, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

a {
  color: var(--brand);
  text-decoration: none;
}

h1, h2, h3, p {
  margin: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: 720px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
}

.brand-name {
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
}

.nav-admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface);
  font-size: 17px;
}

.nav-admin-link:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.site-main {
  min-height: 60vh;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 28px 0;
  margin-top: 40px;
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  font-weight: 800;
  color: var(--ink);
}

.footer-note {
  color: var(--muted);
  font-size: 14px;
  max-width: 640px;
  margin: 8px auto 4px;
}

.footer-meta {
  color: var(--muted);
  font-size: 13px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  padding: 11px 20px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.btn-lg {
  padding: 14px 26px;
  font-size: 16px;
}

.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-dark);
}

.btn-pay {
  background: var(--gold);
  color: #2c2410;
}

.btn-pay:hover {
  background: #b5901c;
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn-success {
  background: var(--success-soft);
  color: var(--success);
}

.btn-success:hover:not(:disabled) {
  background: var(--success);
  color: #fff;
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger);
  color: #fff;
}

.btn-refund {
  background: var(--warn-soft);
  color: var(--warn);
}

.btn-refund:hover:not(:disabled) {
  background: var(--warn);
  color: #fff;
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.link-btn:hover {
  text-decoration: underline;
}

.hero {
  padding: 60px 0 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-eyebrow {
  color: var(--brand);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 38px;
  line-height: 1.35;
  font-weight: 800;
  margin-bottom: 16px;
}

.hero-sub {
  color: var(--muted);
  font-size: 17px;
  max-width: 520px;
  margin-bottom: 22px;
}

.hero-sub strong {
  color: var(--brand);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--brand-soft);
  color: var(--brand);
}

.hero-cta {
  max-width: 260px;
}

.hero-card {
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  border-radius: 22px;
  padding: 34px 30px;
  box-shadow: var(--shadow);
}

.hero-card-total {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
}

.hero-card-cur {
  font-size: 20px;
  font-weight: 700;
}

.hero-card-note {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  margin: 6px 0 22px;
}

.hero-card-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-card-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 12px;
}

.hero-card-item span:last-child {
  color: rgba(255, 255, 255, 0.75);
}

.section {
  padding: 46px 0;
}

.section-soft {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-title {
  font-size: 27px;
  font-weight: 800;
  margin-bottom: 10px;
  text-align: center;
}

.section-lead {
  color: var(--muted);
  text-align: center;
  margin-bottom: 30px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 8px;
}

.benefit {
  padding: 26px 22px;
}

.benefit-icon {
  display: inline-flex;
  font-size: 28px;
  margin-bottom: 12px;
}

.benefit h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.benefit p {
  color: var(--muted);
  font-size: 15px;
}

.steps {
  list-style: none;
  margin: 24px auto 0;
  padding: 0;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: steps;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}

.step-num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
  font-size: 14px;
}

.steps p {
  color: var(--ink);
  font-size: 15px;
}

.policy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 8px;
}

.policy-card {
  padding: 26px 24px;
}

.policy-card h3 {
  font-size: 19px;
  margin-bottom: 14px;
}

.policy-list {
  margin: 0;
  padding: 0 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
  font-size: 15px;
}

.policy-warn {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn);
  font-weight: 700;
  font-size: 14px;
}

.section-form {
  padding-top: 52px;
}

.form-card {
  padding: 34px 30px;
}

.form-title {
  margin-bottom: 6px;
}

.form-sub {
  color: var(--muted);
  text-align: center;
  margin-bottom: 28px;
}

.field {
  border: none;
  margin: 0 0 18px;
  padding: 0;
}

.field legend {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
  padding: 0;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 7px;
}

.req {
  color: var(--danger);
}

.field input[type='text'],
.field input[type='email'],
.field input[type='url'],
.field input[type='tel'],
.field input[type='password'],
.field input[type='search'] {
  width: 100%;
  border: 1.5px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: var(--focus);
}

.field-error {
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  min-height: 18px;
  margin-top: 6px;
}
.field:has(.field-error:not(:empty)) input { border-color: var(--danger); }

.field-hint {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 6px;
}

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

.pkg-card {
  position: relative;
  display: block;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pkg-card:hover {
  border-color: var(--brand);
}

.pkg-card input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.pkg-card:has(input:checked) {
  border-color: var(--brand);
  box-shadow: var(--focus);
}

.pkg-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 16px;
}

.pkg-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pkg-name {
  font-weight: 800;
  font-size: 16px;
}

.pkg-popular {
  font-size: 11px;
  font-weight: 700;
  color: #2c2410;
  background: var(--gold-soft);
  border: 1px solid rgba(201, 162, 39, 0.5);
  border-radius: 999px;
  padding: 2px 10px;
}

.pkg-desc {
  color: var(--muted);
  font-size: 13px;
}

.pkg-price {
  font-size: 24px;
  font-weight: 800;
  color: var(--brand);
  margin-top: 4px;
}

.pkg-currency {
  font-size: 14px;
  font-weight: 700;
}

.pay-box {
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.pay-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
  font-size: 16px;
}

.pay-total {
  font-size: 22px;
  color: var(--brand);
}

.pay-note {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 16px;
}

.pay-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.pay-options-row {
  display: flex;
  gap: 10px;
}
.pay-opt {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  font-family: inherit;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.pay-opt-paypal {
  background: #ffc439;
  border: 1px solid #f0b22e;
}
.pay-opt-paypal:hover {
  box-shadow: 0 2px 10px rgba(204, 150, 18, 0.4);
}
.pp-wordmark {
  display: inline-flex;
  direction: ltr;
  font-style: italic;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
  line-height: 1;
}
.pp-pay {
  color: #003087;
}
.pp-pal {
  color: #009cde;
}
.pay-opt-apple {
  background: #000;
  border: 1px solid #000;
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.3px;
  line-height: 1;
  direction: ltr;
}
.pay-opt-apple:hover {
  background: #1c1c1e;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.pay-opt-card {
  width: 100%;
  background: #14161a;
  border: 1px solid #3a3d42;
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1;
  direction: ltr;
}
.pay-opt-card:hover {
  border-color: #ffc439;
}

.pay-disclaimer {
  color: var(--muted);
  font-size: 13px;
  margin-top: 14px;
  text-align: center;
}

.confirm-wrap {
  padding-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.confirm-card,
.confirm-next {
  padding: 36px 30px;
}

.confirm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: 34px;
  font-weight: 800;
}

.confirm-icon.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.confirm-title {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
}

.confirm-sub {
  color: var(--muted);
  margin-bottom: 20px;
}

.confirm-ref {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--brand-soft);
  border: 1px solid rgba(29, 92, 63, 0.3);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.5px;
  direction: ltr;
}

.confirm-ref span {
  font-family: Consolas, Monaco, monospace;
}

.confirm-summary {
  margin: 22px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  font-size: 14px;
}

.summary-row + .summary-row {
  border-top: 1px solid var(--line);
}

.summary-row span {
  color: var(--muted);
}

.summary-row strong {
  color: var(--ink);
}

.status-completed {
  color: var(--success);
}

.status-pending {
  color: var(--warn);
}

.confirm-note {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--warn-soft);
  color: var(--warn);
  font-weight: 700;
  font-size: 14px;
}

.confirm-cta {
  margin-top: 20px;
}

.confirm-note.refund {
  background: var(--gold-soft);
  color: #7a5d00;
  border: 1px solid rgba(201, 162, 39, 0.4);
}

.confirm-wrap .card.confirm-next {
  padding-top: 26px;
}

.confirm-next h2 {
  font-size: 20px;
  margin-bottom: 16px;
}

.confirm-next .steps {
  margin: 0 0 20px;
  max-width: none;
}

.admin-wrap {
  padding-top: 40px;
}

.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.admin-title {
  font-size: 26px;
  font-weight: 800;
}

.admin-sub {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--brand);
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
}

.admin-tools {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-search {
  width: 100%;
  max-width: 420px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
}

.admin-search:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus);
}

.admin-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.filter-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.filter-btn.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.admin-hint {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}

.admin-table-card {
  padding: 6px;
  overflow: hidden;
}

.admin-table-scroll {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 760px;
}

.admin-table th {
  text-align: right;
  color: var(--muted);
  font-weight: 700;
  font-size: 12.5px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.admin-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.ref-code {
  font-family: Consolas, Monaco, monospace;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12.5px;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-pay {
  background: var(--success-soft);
  color: var(--success);
}

.badge-pay.badge-pending,
.badge-pay.badge-cancelled {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge-pay.badge-failed {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-admin {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge-admin.badge-approved {
  background: var(--success-soft);
  color: var(--success);
}

.badge-admin.badge-rejected {
  background: var(--danger-soft);
  color: var(--danger);
}

.admin-empty {
  text-align: center;
  color: var(--muted);
  padding: 30px 12px;
}

.admin-gate-wrap {
  padding-top: 70px;
}

.admin-gate {
  max-width: 380px;
  margin: 0 auto;
  padding: 34px 28px;
  text-align: center;
}

.gate-icon {
  font-size: 34px;
  margin-bottom: 10px;
}

.gate-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.gate-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 22px;
}

.admin-gate form {
  text-align: right;
}

.admin-gate .btn {
  margin-top: 6px;
}

.admin-gate > .btn-ghost {
  margin-top: 12px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 25, 30, 0.55);
  animation: fade-in 0.2s ease;
}

.modal-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: slide-up 0.25s ease;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--brand-soft);
}

.pay-logo {
  font-weight: 800;
  font-size: 18px;
  color: #003087;
  font-style: italic;
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
}

.modal-close:hover {
  color: var(--ink);
}

.modal-body {
  padding: 22px 20px 20px;
}

.modal-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--warn);
  background: var(--warn-soft);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 10px;
}

.modal-title {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 6px;
}

.modal-desc {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.modal-amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 18px;
}

.modal-amount-label {
  color: var(--muted);
  font-size: 14px;
}

.modal-amount-value {
  font-weight: 800;
  font-size: 20px;
  direction: ltr;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-root {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 90vw;
}

.toast.is-showing {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  background: var(--success);
}

.toast-error {
  background: var(--danger);
}

.toast-info {
  background: var(--ink);
}

.toast-warning {
  background: var(--warn);
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero {
    padding-top: 40px;
  }
  .hero-title {
    font-size: 30px;
  }
  .benefits {
    grid-template-columns: 1fr;
  }
  .policy-grid {
    grid-template-columns: 1fr;
  }
  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .hero-title {
    font-size: 26px;
  }
  .hero-card {
    padding: 26px 22px;
  }
  .pkg-grid {
    grid-template-columns: 1fr;
  }
  .form-card {
    padding: 26px 18px;
  }
  .confirm-card,
  .confirm-next {
    padding: 26px 18px;
  }
  .admin-table-card {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
  }
  .admin-table {
    min-width: 0;
  }
  .admin-table:not(.stat-table),
  .admin-table:not(.stat-table) tr,
  .admin-table:not(.stat-table) td {
    display: block;
    width: 100%;
  }
  .admin-table:not(.stat-table) thead {
    display: none;
  }
  .admin-table:not(.stat-table) tr {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
    padding: 10px 14px;
  }
  .admin-table:not(.stat-table) td {
    border: none;
    padding: 5px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    font-size: 13.5px;
  }
  .admin-table:not(.stat-table) td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--muted);
    font-size: 12.5px;
    flex-shrink: 0;
  }
  .row-actions {
    margin-top: 8px;
    border-top: 1px dashed var(--line);
    padding-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    justify-content: stretch;
  }
  .row-actions .btn {
    width: 100%;
    padding: 9px 4px;
    font-size: 13px;
  }
  .row-actions .link-btn {
    grid-column: 1 / -1;
    text-align: center;
  }
}

.stat-btn {
  font: inherit;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.stat-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}
.modal-backdrop[hidden] {
  display: none;
}
.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface);
}
.modal-head h3 {
  margin: 0;
  font-size: 18px;
}
.modal-close {
  background: none;
  border: 0;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.modal-close:hover {
  color: var(--brand);
}
.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-note {
  color: var(--muted);
  font-size: 13px;
}
.stat-table {
  min-width: 100%;
}
.stat-table th,
.stat-table td {
  text-align: right;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}
.stat-total-row {
  font-weight: 800;
  background: var(--soft);
}
.stat-quick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}
.stat-quick > div {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.loc-row {
  cursor: pointer;
}
.loc-row:hover {
  background: var(--soft);
}

@media (max-width: 620px) {
  .stat-table,
  .stat-table tbody,
  .stat-table tr,
  .stat-table td {
    display: revert;
    width: auto;
  }
  .stat-table thead {
    display: table-header-group;
  }
  .stat-table tr {
    border: none;
    padding: 0;
  }
  .stat-table td {
    padding: 9px 12px;
    display: table-cell;
    justify-content: flex-start;
    text-align: right;
  }
  .stat-table td::before {
    content: none;
  }
}