:root {
  --navy: #173A5E;
  --navy-d: #0F2C46;
  --green: #2F6B45;
  --gold: #B8892B;
  --paper: #FFFFFF;
  --ink: #20262C;
  --muted: #5B6570;
  --line: #DDE2E6;
  --tint: #F1F5F3;
  --r: 10px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: 'Source Sans 3', Arial, sans-serif;
  line-height: 1.55;
  background:
    radial-gradient(900px 340px at 85% -80px, rgba(47,107,69,.14), transparent 70%),
    radial-gradient(800px 320px at 0% -60px, rgba(23,58,94,.14), transparent 70%),
    var(--tint);
  background-attachment: fixed;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0);
}

header::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--green) 60%, var(--gold));
}

.bar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--navy);
  min-width: 0;
}

/* Logo Gambar Utama */
.brand img.logo-img {
  height: 42px;
  width: auto;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.brand-text span {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 700;
  font-size: 1.3rem;
}

.brand small {
  font-weight: 600;
  color: var(--green);
  font-size: .62rem;
  letter-spacing: .4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 35vw;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-volunteer {
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  border: 1.5px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: border-color .2s, background .2s, color .2s;
}

.btn-volunteer:hover {
  border-color: var(--navy);
  background: var(--tint);
}

.btn-volunteer svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

select#lang {
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  color: var(--navy);
  border: 1.5px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 40px;
  cursor: pointer;
  max-width: 30vw;
  transition: border-color .2s, box-shadow .2s;
}

select#lang:hover {
  border-color: var(--navy);
}

/* Card Container */
.container {
  max-width: 680px;
  margin: 32px auto 24px;
  padding: 0 16px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px -12px rgba(23,58,94,.22);
  overflow: hidden;
  animation: rise .5s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.progress {
  height: 5px;
  background: var(--line);
}

.progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width .35s ease;
}

/* Banner Styling */
.banner-wrapper {
  width: 100%;
  max-height: 200px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--tint);
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 30px 30px 32px;
}

h1 {
  font-family: 'Roboto Slab', Georgia, serif;
  color: var(--navy);
  font-size: 1.65rem;
  line-height: 1.25;
  margin: 0 0 6px;
}

p.sub {
  color: var(--muted);
  font-size: .98rem;
  margin: 0 0 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

/* Form Elements */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 16px;
}

.form-group {
  margin: 0;
  min-width: 0;
}

.full {
  grid-column: 1 / -1;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--navy);
  font-size: .94rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
select:not(#lang) {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none;
  appearance: none;
}

select:not(#lang) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23173A5E' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

input::placeholder {
  color: #98A1AA;
}

input:hover,
select:not(#lang):hover {
  border-color: #B9C3CB;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(23,58,94,.12);
}

/* Stepper */
.stepper {
  display: flex;
  gap: 8px;
}

.stepper input {
  text-align: center;
  font-weight: 700;
  flex: 1;
}

.step-btn {
  flex: none;
  width: 48px;
  min-height: 48px;
  border-radius: var(--r);
  border: 1.5px solid var(--line);
  background: var(--tint);
  color: var(--navy);
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: background .15s, border-color .15s, transform .1s;
}

.step-btn:hover {
  background: #E6EDE9;
  border-color: var(--navy);
}

.step-btn:active {
  transform: scale(.94);
}

.btn-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 24px;
  padding: 13px;
  background: linear-gradient(135deg, var(--navy), #20507F);
  color: #fff;
  border: 0;
  border-radius: var(--r);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px -8px rgba(23,58,94,.7);
  transition: transform .15s, box-shadow .2s, filter .2s;
}

.btn-submit:hover {
  filter: brightness(1.1);
  box-shadow: 0 12px 22px -8px rgba(23,58,94,.75);
}

.btn-submit.loading {
  pointer-events: none;
  opacity: .75;
}

.btn-submit.loading::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 10px;
  vertical-align: -2px;
  border: 2px solid rgba(255,255,255,.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Alerts */
.alert {
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 22px;
  font-size: .98rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: pop .35s ease both;
}

@keyframes pop {
  from { opacity: 0; transform: scale(.97); }
  to { opacity: 1; transform: none; }
}

.alert-success {
  background: #E8F5EC;
  color: #175C33;
  border: 1px solid #BFE0CB;
  border-left: 5px solid var(--green);
}

.alert-error {
  background: #FDECEA;
  color: #B3261E;
  border: 1px solid #F5C6C2;
  border-left: 5px solid #D9534F;
}

.code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.code-box {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 1px;
  background: #fff;
  color: var(--navy);
  border: 1.5px dashed var(--green);
  border-radius: 10px;
  padding: 8px 14px;
}

.copy-btn {
  min-height: 44px;
  min-width: 44px;
  border-radius: 10px;
  border: 1.5px solid var(--green);
  background: #fff;
  color: var(--green);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: background .15s, color .15s;
}

.copy-btn:hover,
.copy-btn.done {
  background: var(--green);
  color: #fff;
}

.copy-btn svg {
  width: 20px;
  height: 20px;
}

footer {
  text-align: center;
  padding: 24px 20px 32px;
  font-size: .88rem;
  color: var(--muted);
}

@media (max-width: 600px) {
  .container { margin-top: 18px; padding: 0 12px; }
  .card-body { padding: 22px 18px 24px; }
  h1 { font-size: 1.4rem; }
  .grid { grid-template-columns: 1fr; gap: 15px; }
  .bar { padding: 10px 14px; }
  .brand-text span { font-size: 1.15rem; }
  .btn-submit { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0)); z-index: 5; }
  .btn-volunteer span { display: none; }
  .btn-volunteer { padding: 8px 10px; }
  .banner-wrapper { max-height: 140px; }
}