:root {
  --primary: #1A3A6B;
  --accent: #FFCA1A;
  --navy: var(--primary);
  --navy-soft: #263868;
  --gold: var(--accent);
  --gold-dark: #e6bd24;
  --cream: #fff9e8;
  --ink: #101936;
  --muted: #65708a;
  --soft: #eef3fb;
  --line: #dbe1ec;
  --card: #f8fafc;
  --shadow: 0 20px 46px rgba(16, 25, 54, 0.16);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(246, 211, 75, 0.2), transparent 28rem),
    linear-gradient(135deg, #232833 0%, #17234a 42%, #415788 100%);
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 18px 42px;
  position: relative;
}

.app-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(246, 211, 75, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 211, 75, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
}

.glass,
.stat-card,
.info-card {
  background: var(--card);
  border: 1px solid rgba(219, 225, 236, 0.92);
  box-shadow: var(--shadow);
}

.topbar {
  padding-top: env(safe-area-inset-top);
}

.landing-mode .app-shell {
  display: grid;
  align-items: center;
  min-height: 100svh;
}

.landing-mode .footer {
  display: none;
}

.landing-mode .app-content {
  display: none !important;
}

.app-open .landing-screen {
  display: none !important;
}

.landing-screen {
  position: relative;
  min-height: auto;
  display: grid;
  align-content: start;
  gap: 28px;
  border-radius: 34px;
  padding: 28px;
  overflow: hidden;
  background: linear-gradient(180deg, #fbfcff 0%, #f4f6fb 100%);
  border: 1px solid rgba(246, 211, 75, 0.55);
}

.landing-screen::after {
  content: '';
  position: absolute;
  right: -58px;
  top: -42px;
  width: 174px;
  height: 174px;
  border-radius: 46px;
  background: linear-gradient(135deg, rgba(246, 211, 75, 0.46), rgba(38, 56, 104, 0.14));
  transform: rotate(16deg);
  z-index: -1;
}

.admin-fab {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--navy);
  box-shadow: 0 12px 24px rgba(16, 25, 54, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.admin-fab:hover {
  transform: translateY(-1px);
  background: var(--navy-soft);
  box-shadow: 0 16px 30px rgba(16, 25, 54, 0.24);
}

.admin-fab span {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--gold);
}

.admin-fab span::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -5px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--navy);
}

.admin-fab:hover span::after {
  background: var(--navy-soft);
}

.brand-card {
  display: flex;
  align-items: stretch;
  gap: 18px;
  border-radius: var(--radius-xl);
  padding: 0;
}

.brand-logo {
  width: 96px;
  height: auto;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  padding: 0;
  flex: 0 0 auto;
  align-self: stretch;
}

.brand-text h1,
.hero-copy h2,
.section-heading h3,
.dialog-card h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

.brand-text h1 {
  font-size: clamp(1.65rem, 6vw, 2.28rem);
  line-height: 1.02;
}

.brand-text p {
  margin: 6px 0 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 96px;
}

.landing-copy {
  display: grid;
  gap: 14px;
}

.landing-copy h2 {
  margin: 0;
  max-width: 9ch;
  font-size: clamp(3.25rem, 17vw, 5.9rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.landing-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 1rem;
  font-weight: 400;
}

.eyebrow {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
}

#programSubtitle,
.section-heading p,
.hero-copy p,
.info-card p,
.form-note,
.footer p,
.footer small,
.payment-card p,
.payment-card small,
.dialog-card p {
  color: var(--muted);
  line-height: 1.55;
}

#programSubtitle {
  font-size: 1rem;
  font-weight: 400;
}

main {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.app-content {
  align-content: start;
}

.app-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 28px 24px;
  border-radius: 30px;
  background: linear-gradient(180deg, #fbfcff 0%, #f3f5fa 100%);
  border: 1px solid rgba(246, 211, 75, 0.45);
  box-shadow: var(--shadow);
}

.app-hero h2 {
  margin: 14px 0 6px;
  font-size: clamp(2.05rem, 10vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.app-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.95rem;
  font-weight: 400;
}

.app-hero .btn {
  flex: 0 0 auto;
  min-width: 100px;
}

.tab-nav {
  position: sticky;
  top: max(10px, env(safe-area-inset-top));
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--navy);
  border-color: rgba(246, 211, 75, 0.28);
}

.tab-button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 900;
  padding: 0 6px;
  white-space: nowrap;
}

.tab-button.active {
  background: var(--gold);
  color: var(--navy);
  box-shadow: 0 12px 28px rgba(246, 211, 75, 0.24);
}

.tab-panel {
  display: none;
  gap: 18px;
}

.tab-panel.active {
  display: grid;
}

.hero-section {
  position: relative;
  overflow: hidden;
  border-radius: 38px;
  padding: 28px 22px;
}

.hero-section::before {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 48px;
  background: linear-gradient(135deg, rgba(0, 196, 183, 0.34), rgba(255, 122, 10, 0.28));
  right: -98px;
  top: -90px;
  transform: rotate(18deg);
}

.hero-copy,
.hero-actions {
  position: relative;
  z-index: 1;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 900;
  font-size: 0.8rem;
}

.hero-copy h2 {
  margin-top: 18px;
  font-size: clamp(2rem, 10vw, 3.65rem);
  line-height: 0.98;
}

.hero-copy h2 span {
  color: var(--gold-dark);
}

.hero-copy p {
  font-size: 1rem;
  margin: 16px 0 0;
}

.hero-actions,
.footer-actions,
.admin-toolbar,
.status-search {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 24px;
}

.btn {
  appearance: none;
  border: 0;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 900;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(23, 37, 42, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn:focus-visible,
.tab-button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(246, 211, 75, 0.58);
  outline-offset: 3px;
}

.btn.primary {
  background: var(--gold);
  color: var(--navy);
}

.btn.secondary {
  background: var(--gold);
  color: var(--navy);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.whatsapp {
  background: #25d366;
  color: #fff;
}

.btn.full {
  width: 100%;
}

.btn.tiny {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 0.82rem;
  box-shadow: none;
}

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

.stat-card {
  border-radius: 26px;
  padding: 15px;
  min-height: 112px;
}

.stat-card span,
.stat-card small {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.82rem;
}

.stat-card strong {
  display: block;
  margin: 7px 0 2px;
  font-size: clamp(1.72rem, 7vw, 2.55rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.stat-card.accent strong {
  color: var(--navy);
  font-size: clamp(1.35rem, 5vw, 1.8rem);
}

.section-block {
  display: grid;
  gap: 14px;
}

.section-heading {
  padding: 8px 2px 0;
}

.section-heading.compact {
  padding-top: 0;
}

.section-heading h3 {
  font-size: clamp(1.4rem, 5.5vw, 2rem);
  line-height: 1.05;
}

.section-heading p {
  margin: 8px 0 0;
}

.package-list {
  display: grid;
  gap: 12px;
}

.package-card {
  border-radius: var(--radius-xl);
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 42px rgba(23, 37, 42, 0.08);
  overflow: hidden;
  position: relative;
}

.package-card::after {
  content: '';
  width: 118px;
  height: 118px;
  position: absolute;
  right: -54px;
  top: -54px;
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(246, 211, 75, 0.28), rgba(38, 56, 104, 0.1));
  transform: rotate(22deg);
}

.package-top,
.package-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.package-title h4 {
  margin: 0;
  font-size: 1.14rem;
  letter-spacing: -0.03em;
}

.package-title p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.price {
  white-space: nowrap;
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 900;
}

.package-meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.meta-chip {
  padding: 9px;
  border-radius: 16px;
  background: var(--soft);
}

.meta-chip span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.meta-chip strong {
  display: block;
  margin-top: 2px;
  font-size: 0.95rem;
}

.payment-card,
.contact-card,
.status-panel,
.admin-panel,
.qurban-form {
  border-radius: var(--radius-xl);
  padding: 18px;
}

.payment-card,
.contact-card {
  display: grid;
  gap: 16px;
  align-items: center;
}

.payment-card h3 {
  margin: 0;
  font-size: clamp(1.1rem, 4.6vw, 1.45rem);
  line-height: 1.2;
}

.payment-card p {
  margin: 6px 0 0;
  font-size: 1.04rem;
  font-weight: 800;
  color: var(--ink);
}

.payment-card p:empty {
  display: none;
}

.contact-card h3 {
  margin: 6px 0 8px;
  font-size: clamp(1.25rem, 5vw, 1.7rem);
  line-height: 1.05;
}

.contact-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
}

.contact-card p span {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 900;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.contact-actions .btn {
  flex: 1 1 150px;
  min-height: 50px;
}

.qurban-form {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 800;
  font-size: 0.92rem;
}

.field-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
}

.field-label strong {
  color: var(--gold-dark);
  font-size: 0.95em;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  outline: none;
  min-height: 46px;
  font-weight: 500;
}

select {
  font-weight: 700;
}

input::placeholder,
textarea::placeholder {
  color: #707887;
  font-weight: 500;
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 4px rgba(246, 211, 75, 0.24);
}

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

.form-note {
  margin: 0;
  font-size: 0.75rem;
  text-align: center;
}

.qurban-form .btn.full {
  margin-top: 4px;
  min-height: 48px;
}

.qurban-form input::placeholder,
.qurban-form textarea::placeholder {
  font-size: 0.92rem;
  font-weight: 500;
}

.qurban-form .form-note {
  max-width: 34ch;
  justify-self: center;
}

.qurban-form label:has(input[name="jumlah_bagian"]) {
  max-width: 170px;
}

.qurban-form label:has(input[name="jumlah_bagian"]) input {
  text-align: center;
}

.status-search input {
  flex: 1;
  min-width: 170px;
}

.status-search .btn {
  min-width: 92px;
}

.status-result {
  margin-top: 12px;
  border-radius: 20px;
  padding: 14px;
  background: rgba(246, 211, 75, 0.12);
  border: 1px dashed rgba(38, 56, 104, 0.22);
}

.status-result.muted {
  color: var(--muted);
}

.status-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.certificate-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 10px 16px;
  font-size: 0.86rem;
  white-space: nowrap;
}

.info-grid {
  grid-template-columns: 1fr;
}

.info-card {
  border-radius: var(--radius-lg);
  padding: 18px;
}

.info-card span {
  font-size: 1.55rem;
}

.info-card h4 {
  margin: 8px 0 4px;
  font-size: 1.05rem;
}

.info-card p {
  margin: 0;
}

.admin-toolbar {
  margin: 14px 0;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-item {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  background: #fff;
}

.admin-item h4 {
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.admin-item p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: 12px;
}

.badge {
  display: inline-flex;
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(246, 211, 75, 0.26);
  color: var(--navy);
  font-weight: 900;
  font-size: 0.72rem;
}

.footer {
  margin-top: 28px;
  text-align: center;
  display: grid;
  gap: 8px;
}

.footer p {
  margin: 0;
}

.footer-actions {
  justify-content: center;
  margin-top: 8px;
}

.admin-dialog {
  width: min(92vw, 430px);
  border: 0;
  border-radius: 28px;
  padding: 0;
  background: transparent;
}

.admin-dialog::backdrop {
  background: rgba(10, 20, 20, 0.54);
  backdrop-filter: blur(6px);
}

.dialog-card {
  background: #fff;
  border-radius: 28px;
  padding: 22px;
  display: grid;
  gap: 12px;
}

.dialog-card menu {
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(120px);
  width: min(92vw, 450px);
  background: var(--navy);
  color: #fff;
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transition: all 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.skeleton-card {
  height: 162px;
  border-radius: var(--radius-xl);
  background: linear-gradient(90deg, #f2f4f7, #ffffff, #f2f4f7);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@media (min-width: 460px) {
  .info-grid {
    grid-template-columns: 1fr 1fr;
  }

  .info-grid .info-card:last-child {
    grid-column: 1 / -1;
  }

  .payment-card {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .contact-card {
    grid-template-columns: 1fr;
    align-items: center;
  }

  .contact-actions {
    justify-content: stretch;
  }
}

@media (max-width: 370px) {
  .app-shell {
    padding-inline: 12px;
  }

  .landing-screen {
    border-radius: 28px;
    padding: 14px;
  }

  .admin-fab {
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
  }

  .brand-logo {
    width: 78px;
  }

  .brand-card {
    gap: 12px;
    padding: 0;
  }

  .brand-text {
    min-height: 78px;
  }

  .brand-text h1 {
    font-size: 1.62rem;
  }

  .app-hero {
    padding: 22px 18px;
    border-radius: 26px;
  }

  .app-hero h2 {
    font-size: 2rem;
  }

  .app-hero .btn {
    min-width: 86px;
    min-height: 44px;
    padding-inline: 14px;
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .tab-nav {
    gap: 4px;
    padding: 5px;
  }

  .tab-button {
    min-height: 40px;
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
