:root {
  --bg: #f3f7fc;
  --bg-soft: #e9f0f9;
  --surface: #ffffff;
  --line: #c8d7ea;
  --line-strong: #a8bfdc;
  --text: #173154;
  --muted: #536b8d;
  --primary: #1c6de0;
  --primary-hover: #1356b3;
  --warn: #cd7e10;
  --ok: #1f8f5c;
  --err: #b73028;
  --shadow: 0 10px 24px rgba(22, 49, 92, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0, rgba(84, 148, 243, 0.2), transparent 36%),
    radial-gradient(circle at 95% 100%, rgba(28, 109, 224, 0.15), transparent 42%),
    linear-gradient(135deg, var(--bg), var(--bg-soft));
  font-family: "IBM Plex Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

#app {
  min-height: 100vh;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.login-card {
  width: min(92vw, 560px);
  padding: 28px;
}

.login-card h1 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #10305f;
}

.desc {
  color: var(--muted);
  margin-bottom: 20px;
}

.wrap {
  width: min(1080px, 96vw);
  margin: 0 auto;
  padding: 24px 0 40px;
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

h2,
h3 {
  margin: 0;
  color: #113261;
}

.card {
  padding: 18px;
  margin-bottom: 16px;
}

.value {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 700;
}

.sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.field label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.input {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(28, 109, 224, 0.2);
}

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

.quick-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.btn {
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 9px 14px;
  cursor: pointer;
  color: #12315d;
  background: #fff;
  font-weight: 700;
}

.btn:hover {
  background: #edf4fd;
}

.btn.primary {
  background: linear-gradient(130deg, var(--primary), #2254a8);
  border-color: #154b9f;
  color: #fff;
}

.btn.primary:hover {
  background: linear-gradient(130deg, var(--primary-hover), #19468f);
}

.btn.warn {
  background: #fff5e6;
  border-color: #f1d0a3;
  color: #734608;
}

.btn.warn:hover {
  background: #ffedd0;
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.msg {
  margin-top: 10px;
  color: var(--ok);
  font-size: 13px;
  font-weight: 600;
}

.err {
  margin-top: 10px;
  color: var(--err);
  font-size: 13px;
  font-weight: 600;
}

.history-list {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.history-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fbff;
}

.history-main {
  font-size: 14px;
  font-weight: 700;
  color: #173154;
}

.history-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .top {
    flex-direction: column;
    align-items: flex-start;
  }
}
