* { box-sizing: border-box; }

:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #14213d;
  background: var(--page-background, #f4f7fb);
  --primary-color: var(--primary-color, #2d6cdf);
  --page-background: #f4f7fb;
  --card-radius: 24px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(45, 108, 223, .12), transparent 35%),
    var(--page-background, #f4f7fb);
}

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

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.card, .panel-card {
  background: #fff;
  border-radius: var(--card-radius, 24px);
  box-shadow: 0 20px 60px rgba(20, 33, 61, .12);
}

.card {
  width: min(100%, 680px);
  padding: 32px;
}

.compact-card { width: min(100%, 520px); }

.top-actions, .admin-header, .section-heading, .header-actions, .data-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.logo {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
  background: var(--primary-color, #2d6cdf);
  color: #fff;
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--primary-color, #2d6cdf);
}

h1, h2 { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(24px, 4vw, 34px); }
h2 { margin-bottom: 0; font-size: 20px; }

.description {
  margin: 22px 0 14px;
  color: #536179;
  line-height: 1.6;
}

.notice, .warning-box, .admin-warning {
  padding: 14px 16px;
  border-radius: 10px;
  line-height: 1.5;
}

.notice {
  margin-bottom: 22px;
  border-left: 4px solid #2d6cdf;
  background: #eef4ff;
  color: #33435f;
  font-size: 14px;
}

.warning-box, .admin-warning {
  border-left: 4px solid #b54708;
  background: #fff6ed;
  color: #7a2e0e;
  margin: 20px 0;
  font-size: 14px;
}

.admin-warning { margin: 0 0 20px; }

form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

input, select, textarea {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid #cfd8e6;
  border-radius: 12px;
  outline: none;
  transition: .2s ease;
  background: #fff;
}

textarea { resize: vertical; }

input:focus, select:focus, textarea:focus {
  border-color: var(--primary-color, #2d6cdf);
  box-shadow: 0 0 0 4px rgba(45, 108, 223, .12);
}

button, .secondary-button, .admin-link {
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

button {
  background: var(--primary-color, #2d6cdf);
  color: #fff;
}

button:hover, .secondary-button:hover, .admin-link:hover { filter: brightness(.96); }

.admin-link, .secondary-button {
  background: #eef4ff;
  color: #2458b3;
}

.danger-button { background: #b42318; }
.danger-outline-button {
  background: #fff;
  color: #b42318;
  border: 1px solid #f0b6b2;
}
.link-button {
  padding: 6px;
  background: transparent;
  color: var(--primary-color, #2d6cdf);
}
.text-link { color: var(--primary-color, #2d6cdf); font-weight: 700; }
.small-note { color: #667085; font-size: 13px; }

.message {
  min-height: 24px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
}
.message.error { color: #b42318; }
.message.success { color: #067647; }

.result {
  margin-top: 18px;
  padding: 20px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.hidden { display: none !important; }

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.badge, .count-badge {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.badge { background: #fff1d6; color: #8a4b08; }
.count-badge { background: #eef4ff; color: #2458b3; }

dl { margin: 16px 0 0; display: grid; gap: 12px; }
dl div { display: grid; grid-template-columns: 190px 1fr; gap: 12px; }
dt { color: #667085; }
dd { margin: 0; font-weight: 750; text-align: right; }

.demo-help {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e6ebf2;
  color: #536179;
  font-size: 13px;
}
.demo-help p { margin: 8px 0; }

.admin-page {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 32px 16px;
}

.admin-shell { width: 100%; }
.admin-header { margin-bottom: 20px; }
.admin-grid {
  display: grid;
  grid-template-columns: minmax(300px, 430px) 1fr;
  gap: 22px;
  align-items: start;
}

.panel-card {
  padding: 24px;
  border-radius: 18px;
}

.two-columns {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 12px;
}

.search-label { margin: 18px 0; }
.record-list {
  display: grid;
  gap: 12px;
  max-height: 640px;
  overflow: auto;
  padding-right: 4px;
}

.record-item {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fbfcfe;
}

.record-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.record-item h3 { margin: 0; font-size: 17px; }
.record-meta {
  display: grid;
  gap: 5px;
  color: #667085;
  font-size: 13px;
  line-height: 1.4;
}

.record-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.record-actions button {
  padding: 8px 11px;
  font-size: 13px;
}
.edit-button { background: var(--primary-color, #2d6cdf); }
.delete-button { background: #b42318; }

.empty-state {
  padding: 30px 18px;
  text-align: center;
  color: #667085;
  border: 1px dashed #cfd8e6;
  border-radius: 14px;
}

.data-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}

.upload-button { cursor: pointer; }

@media (max-width: 880px) {
  .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .card { padding: 22px; border-radius: 18px; }
  .top-actions, .admin-header { align-items: flex-start; flex-direction: column; }
  .header-actions { width: 100%; }
  .header-actions > * { flex: 1; }
  dl div { grid-template-columns: 1fr; gap: 4px; }
  dd { text-align: left; }
  .two-columns { grid-template-columns: 1fr; }
}

.field-help { font-size: 12px; font-weight: 500; color: #667085; line-height: 1.4; }
.fee-row { margin-top: 4px; padding: 14px 16px; border-radius: 12px; background: #fff7ed; border: 1px solid #fed7aa; }
.fee-row dt { color: #9a3412; font-weight: 800; }
.fee-value { color: #b42318; font-size: 24px; font-weight: 900; }

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

@media (max-width: 620px) {
  .person-columns {
    grid-template-columns: 1fr;
  }
}


.appearance-card {
  margin-bottom: 22px;
}

.theme-preview {
  margin-top: 20px;
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--page-background, #f4f7fb);
  border: 1px solid #e2e8f0;
  border-radius: var(--card-radius, 24px);
}

.preview-logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--primary-color, #2d6cdf);
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  flex: 0 0 auto;
}

.theme-preview h3 {
  margin: 0 0 5px;
}

.theme-preview p {
  margin: 0;
  color: #667085;
  font-size: 14px;
}

input[type="color"] {
  min-height: 48px;
  padding: 6px;
}

input[type="range"] {
  padding: 0;
}


.bank-transfer {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #e5e7eb;
}

.bank-transfer h2 {
  margin-bottom: 8px;
}

.bank-intro {
  color: #667085;
  line-height: 1.6;
}

.recipient-box {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.recipient-box > div {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.recipient-box span {
  color: #667085;
  font-weight: 700;
}

.legal-note {
  margin-top: 18px;
}

@media (max-width: 620px) {
  .recipient-box > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}


.payment-confirmation {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #e5e7eb;
}

.paid-button,
.confirm-button {
  width: 100%;
}

.paid-button {
  background: #067647;
}

.upload-area {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid #d0d5dd;
  border-radius: 16px;
  background: #f8fafc;
}

.upload-area h2 {
  margin: 0 0 8px;
}

.upload-area p {
  color: #667085;
  line-height: 1.5;
}

.file-upload-label {
  margin-top: 16px;
  padding: 16px;
  border: 2px dashed #b8c4d6;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: center;
}

.file-upload-label input {
  margin-top: 10px;
}

.selected-file {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #eef4ff;
  color: #2458b3;
  font-weight: 700;
  word-break: break-word;
}

.confirm-button {
  margin-top: 14px;
}

.confirm-button:disabled {
  opacity: .55;
  cursor: not-allowed;
}


.bank-selection-hint {
  margin: 10px 0 0;
  padding: 11px 13px;
  border-radius: 10px;
  background: #f8fafc;
  color: #667085;
  font-size: 14px;
  font-weight: 700;
}

.bank-selection-hint.success-hint {
  background: #ecfdf3;
  color: #067647;
}
