:root {
  --v-bg: #efefef;
  --v-panel: #ffffff;
  --v-dark: #2b2b2b;
  --v-text: #2b2b2b;
  --v-muted: #707070;
  --v-line: #e2e2e2;
  --v-yellow: #f5de89;
  --v-yellow-hover: #f0d26a;
  --v-red: #bb0000;
  --v-radius: 28px;
}

body {
  background: var(--v-bg);
  color: var(--v-text);
  font-family: Gilroy, Onest, "Helvetica Neue", Arial, sans-serif;
}

.topbar {
  background: var(--v-panel);
  border-radius: 999px;
  padding: .6rem .75rem .6rem 1.5rem;
}

.logo {
  height: 34px;
  width: auto;
}

.badge-soft {
  background: var(--v-yellow);
  color: var(--v-dark);
  border-radius: 999px;
  padding: .55rem 1.25rem;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.panel {
  background: var(--v-panel);
  border-radius: var(--v-radius);
}

.panel-dark {
  background: var(--v-dark);
  color: #fff;
  top: 1.5rem;
}

.eyebrow {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--v-muted);
}

.eyebrow-light {
  color: rgba(255, 255, 255, .6);
}

.title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.05;
}

.lead-text {
  color: var(--v-muted);
}

.form-label {
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: .4rem;
}

.form-control,
.form-select {
  min-height: 52px;
  font-size: 16px;
  border: 1px solid var(--v-line);
  border-radius: 16px;
  background-color: #f7f7f7;
}

.form-control:focus,
.form-select:focus {
  background-color: #fff;
  border-color: var(--v-dark);
  box-shadow: 0 0 0 4px rgba(245, 222, 137, .6);
}

.switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #f2f2f2;
  border-radius: 999px;
}

.switch-item {
  flex: 1;
  text-align: center;
  padding: .8rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.btn-check:checked + .switch-item {
  background: var(--v-dark);
  color: #fff;
}

.option {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--v-line);
  border-radius: 18px;
  cursor: pointer;
  margin: 0;
}

.option span {
  display: flex;
  flex-direction: column;
}

.option small {
  color: var(--v-muted);
}

.option .form-check-input {
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
}

.form-check-input:checked {
  background-color: var(--v-dark);
  border-color: var(--v-dark);
}

.total {
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1;
  color: var(--v-yellow);
}

.btn-brand,
.btn-ghost {
  min-height: 56px;
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-brand {
  background: var(--v-yellow);
  color: var(--v-dark);
  border: 0;
}

.btn-brand:hover,
.btn-brand:focus {
  background: var(--v-yellow-hover);
  color: var(--v-dark);
}

.btn-brand:disabled {
  background: var(--v-yellow);
  color: var(--v-dark);
  opacity: .6;
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
}

.btn-ghost:hover {
  background: #fff;
  color: var(--v-dark);
}

.link-box {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .15);
  color: #fff;
  font-size: .8rem;
  resize: none;
}

.link-box:focus {
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.error {
  color: #ff8a80;
  font-size: .9rem;
}

.error:empty {
  display: none;
}

@media (max-width: 575px) {
  .topbar {
    padding-left: 1rem;
  }

  .badge-soft {
    padding: .5rem .9rem;
    font-size: .7rem;
  }
}

/* ---- additions for the unified payments page ---- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
button.badge-soft { border: 0; cursor: pointer; }
.link-soft { background: none; border: 0; padding: .25rem .5rem; color: var(--v-muted); font-weight: 600; font-size: .85rem; text-decoration: none; }
.link-soft:hover { color: var(--v-dark); }
.opt { color: var(--v-muted); font-weight: 400; }

.switch .switch-item { white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--v-line); background: #f7f7f7; color: var(--v-text);
  border-radius: 999px; padding: .7rem 1.1rem; font-weight: 700; cursor: pointer;
  min-height: 48px; display: inline-flex; flex-direction: column; justify-content: center; align-items: center;
  line-height: 1.1; transition: background .15s, color .15s, border-color .15s;
}
.chip small { font-weight: 500; font-size: .72rem; opacity: .7; margin-top: 2px; }
.chip:hover { border-color: var(--v-dark); }
.chip[aria-checked="true"] { background: var(--v-dark); color: #fff; border-color: var(--v-dark); }
.chips-small .chip { padding: .55rem .9rem; min-width: 64px; }
.chips .empty { color: var(--v-muted); font-size: .9rem; padding: .6rem 0; }

.calc-lines { color: rgba(255,255,255,.7); font-size: .92rem; min-height: 1.4em; }
.calc-lines div + div { margin-top: .2rem; }
.calc-lines b { color: #fff; font-weight: 600; }

.recent { list-style: none; padding: 0; margin: 0; }
.recent li { border-top: 1px solid var(--v-line); padding: .7rem 0; display: flex; gap: .75rem; align-items: center; justify-content: space-between; }
.recent li:first-child { border-top: 0; }
.recent .r-main { min-width: 0; }
.recent .r-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent .r-sub { color: var(--v-muted); font-size: .8rem; }
.recent .muted { color: var(--v-muted); font-size: .9rem; }
.btn-mini { border: 1px solid var(--v-line); background: #fff; border-radius: 999px; padding: .35rem .8rem; font-size: .8rem; font-weight: 700; flex-shrink: 0; }
.btn-mini:hover { border-color: var(--v-dark); }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding-top: 2rem; padding-bottom: 2rem; }
.login-card { width: 100%; max-width: 440px; }
.btn-dark-brand { min-height: 56px; border-radius: 999px; background: var(--v-dark); color: #fff; font-weight: 700; text-transform: uppercase; border: 0; }
.btn-dark-brand:hover { background: #000; color: #fff; }
.alert-soft { background: #fdecea; color: var(--v-red); border-radius: 14px; padding: .75rem 1rem; font-size: .9rem; }

@media (max-width: 575px) {
  .panel.p-4 { padding: 1.25rem !important; }
  .switch-item { padding: .7rem .5rem; font-size: .9rem; }
  .chip { flex: 1 1 calc(50% - 8px); }
  .chips-small .chip { flex: 0 1 auto; }
}

/* Bank buttons in each bank's colour */
.chip-bank { flex-direction: row; gap: .5rem; }
.chip-bank .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bank); box-shadow: 0 0 0 2px var(--bank-accent); flex-shrink: 0; }
.chip-bank:hover { border-color: var(--bank-accent); }
.chip-bank[aria-checked="true"] { background: var(--bank); border: 2px solid var(--bank-accent); color: var(--bank-text); }
.chip-bank[aria-checked="true"] .dot { background: var(--bank-text); box-shadow: none; }

/* Payment status in "my links" */
.r-actions { display: flex; gap: 6px; flex-shrink: 0; }
.st { display: inline-block; border-radius: 999px; padding: .05rem .5rem; font-size: .72rem; font-weight: 700; margin-right: .25rem; }
.st-pending { background: #fff4cc; color: #8a6d00; }
.st-paid { background: #dff5e1; color: #1d7a2e; }
.st-expired { background: #eeeeee; color: #707070; }
.st-refunded { background: #fde2e1; color: #b3261e; }
@media (max-width: 575px) {
  .recent li { flex-wrap: wrap; }
  .r-actions { width: 100%; }
  .r-actions .btn-mini { flex: 1; }
}

/* Calculation details (commission, amounts, monthly payment) */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.stat { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.stat span { color: rgba(255,255,255,.6); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat b { color: #fff; font-size: 1.15rem; font-weight: 800; }
.stat small { color: rgba(255,255,255,.5); font-size: .75rem; }
.stat-wide { grid-column: 1 / -1; background: rgba(245, 222, 137, .12); border-color: rgba(245, 222, 137, .35); }
.stat-wide b { color: #f5de89; font-size: 1.4rem; }
