:root {
  --primary: #2c6e49;
  --primary-dark: #1b4332;
  --border: #d1d5db;
  --border-light: #e5e7eb;
  --bg: #f4f5f7;
  --text: #1f2937;
  --text-muted: #6b7280;
  --error: #b91c1c;
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  --error-bg: #fef2f2;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  margin: 0;
  padding: 40px 16px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.page { max-width: 900px; margin: 0 auto; }

.hidden { display: none !important; }

/* Loading / error states */
.loading-wrap {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 14px;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 720px) {
  .layout { grid-template-columns: 1fr; }
}

.panel {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 18px rgba(0,0,0,0.04);
  padding: 28px;
}

/* Form panel */
.amount-block { margin-bottom: 20px; }
.amount-block .label { font-size: 13px; color: var(--text-muted); }
.amount { font-size: 32px; font-weight: 700; margin-top: 2px; }

.section { margin: 24px 0; }
.section-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
}

label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 14px 0 5px;
}

input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14.5px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
}
input::placeholder { color: #a3a9b3; }
input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44,110,73,0.12);
}
input[readonly] { background: var(--bg); color: var(--text-muted); }

/* Method tabs */
.method-tabs { display: flex; gap: 10px; }
.method-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.method-tab .icon { font-size: 20px; }
.method-tab.active {
  border-bottom: 3px solid var(--primary);
  color: var(--primary-dark);
}

.row-2 { display: flex; gap: 12px; }
.row-2 > div { flex: 1; }
.row-3 { display: flex; gap: 12px; }
.row-3 > div { flex: 1; }

.field-group { display: none; }
.field-group.visible { display: block; }

.save-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
.save-note .lock-icon { flex-shrink: 0; }

button[type="submit"] {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button[type="submit"]:hover { background: var(--primary-dark); }
button[type="submit"]:disabled { opacity: 0.6; cursor: not-allowed; }

.status {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  display: none;
}
.status.success { display: block; background: var(--success-bg); color: var(--success-text); border: 1px solid #a7f3d0; }
.status.error { display: block; background: var(--error-bg); color: var(--error); border: 1px solid #fecaca; }

.fine-print {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 14px;
  line-height: 1.5;
}
.fine-print a { color: var(--primary-dark); }

/* Sidebar panel */
.brand-block { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.brand-logo {
  width: 36px; height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 16px;
}
.brand-logo-img {
  width: 36px; height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--bg);
}
.brand-name { font-weight: 700; font-size: 14.5px; }

.page-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
}
.page-footer a { color: var(--text-muted); text-decoration: underline; }
.page-footer a:hover { color: var(--primary-dark); }
.footer-divider { margin: 0 8px; }

.summary-block {
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 0;
  margin-bottom: 20px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--text-muted);
  padding: 5px 0;
}
.summary-row.total {
  font-weight: 700;
  color: var(--text);
  font-size: 14.5px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-light);
}

.info-block { margin-bottom: 20px; }
.info-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.info-text { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.security-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 24px;
}