:root {
  --blue: #075386;
  --blue-2: #0077bd;
  --green: #008f46;
  --green-2: #006638;
  --ink: #172033;
  --muted: #5f6c80;
  --line: #d8e2ec;
  --panel: #ffffff;
  --page: #f4f7fa;
  --soft: #eef5fa;
  --danger: #a43b3b;
  --warn: #a66d00;
  --ok: #207344;
  --shadow: 0 16px 42px rgba(16, 24, 40, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--page);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 40px;
  padding: 10px 14px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 700;
  cursor: pointer;
}

button:hover,
button:focus {
  background: var(--green-2);
  outline: none;
}

button.secondary {
  background: var(--blue-2);
}

button.ghost {
  color: var(--ink);
  background: #e8edf0;
}

.topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
}

.topbar-inner {
  max-width: 1220px;
  min-height: 88px;
  margin: 0 auto;
  padding: 14px 24px;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.logo-box {
  padding: 5px;
  border: 1px solid rgba(0, 119, 189, 0.18);
  border-radius: 8px;
  background: #ffffff;
}

.bank-logo {
  display: block;
  width: 100%;
  height: 50px;
  object-fit: contain;
}

.brand-title p,
.eyebrow {
  margin: 0 0 6px;
  color: var(--green-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-title h1 {
  margin: 0;
  color: var(--blue);
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.top-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue);
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.accent-bar {
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--blue-2), var(--green));
}

.wrap {
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px;
}

.intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.intro h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.2;
}

.intro p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.dev-credit {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.panel {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.08);
}

.accent-panel {
  border-top: 4px solid var(--blue-2);
}

.panel h2 {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 18px;
  line-height: 1.25;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 12px;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  color: #31424d;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select {
  min-height: 40px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.field input:focus,
.field select:focus {
  border-color: var(--blue-2);
  outline: 3px solid rgba(0, 119, 189, 0.12);
}

.risk-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.score {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.result {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.result div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(#ffffff, #f4f8fa);
}

.result span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8edf0;
  font-size: 12px;
  font-weight: 700;
}

.low {
  color: var(--ok);
  background: #e1f1e8;
}

.medium {
  color: var(--warn);
  background: #fff1d4;
}

.high {
  color: var(--danger);
  background: #f6dddd;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.msg {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--danger);
  background: #f9e2e2;
}

.small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .topbar-inner,
  .form-grid,
  .risk-grid,
  .result {
    grid-template-columns: 1fr;
  }

  .logo-box {
    max-width: 330px;
  }

  .top-actions,
  .intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .dev-credit {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .topbar-inner,
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  .bank-logo {
    height: 44px;
  }

  .brand-title h1 {
    font-size: 25px;
  }

  .panel {
    padding: 14px;
  }

  .actions button {
    width: 100%;
  }
}
