:root {
  --primary: #c8102e;
  --primary-dark: #8e0b21;
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --border: #e2e2e6;
  --ok: #2e7d32;
  --err: #c62828;
  --warn: #b26a00;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
.card {
  max-width: 640px;
  margin: 2rem auto;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.06);
  padding: 2rem;
}
header h1 {
  margin: 0 0 0.25rem 0;
  font-size: 1.5rem;
  color: var(--primary);
}
header .sub {
  margin: 0 0 1.5rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}
form { display: grid; gap: 1rem; }
fieldset { border: none; padding: 0; margin: 0; }
fieldset.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 480px) {
  fieldset.row { grid-template-columns: 1fr; }
  .card { margin: 0; border-radius: 0; padding: 1.25rem; box-shadow: none; }
}
label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--text);
}
label > span {
  font-weight: 600;
  color: var(--text);
}
.iban-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}
.iban-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.iban-toggle input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.iban-toggle label {
  cursor: pointer;
  font-weight: 500;
}
.hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.hint.warn { color: var(--warn); }
input, select, textarea {
  font: inherit;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15);
}
input:disabled, input.locked {
  background: #f1f1f4;
  color: var(--muted);
  cursor: not-allowed;
  border-style: dashed;
}
textarea { resize: vertical; min-height: 70px; }
button {
  font: inherit;
  font-weight: 700;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.05s;
}
button:hover:not(:disabled) { background: var(--primary-dark); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: 0.6; cursor: progress; }
.status {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  border: 1px solid transparent;
}
.status.info { background: #eef4fb; border-color: #cfe0f3; color: #14457a; }
.status.ok { background: #e8f5e9; border-color: #b6e0b8; color: var(--ok); }
.status.error { background: #fdecea; border-color: #f5c2c0; color: var(--err); }
.status a { color: inherit; font-weight: 600; }
.status code { background: rgba(0,0,0,0.06); padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.85em; }
.welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background: #eef4fb;
  border: 1px solid #cfe0f3;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #14457a;
}
.welcome small { color: #4a6a8e; font-size: 0.8rem; }
.welcome-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.btn-secondary {
  font-size: 0.85rem;
  padding: 0.5rem 0.85rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.btn-secondary:hover { background: var(--primary-dark); }
.btn-link {
  background: none;
  border: none;
  color: #14457a;
  text-decoration: underline;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.5rem 0.5rem;
}
.btn-link:hover { color: #0d2c54; }
@media (max-width: 480px) {
  .welcome { flex-direction: column; align-items: flex-start; }
}