/*! app.css — SEPA 测试数据生成器 */
:root {
  --bg:      #0d1620;
  --bg2:     #12212f;
  --panel:   rgba(255, 255, 255, .045);
  --panel2:  rgba(255, 255, 255, .075);
  --line:    rgba(255, 255, 255, .10);
  --txt:     #e9eff5;
  --dim:     #92a7ba;
  --dim2:    #6d8296;
  --accent:  #f2a154;
  --accent-d:#d9863a;
  --ok:      #4fd1a5;
  --bad:     #f2777a;
  --warn:    #e8c26a;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --serif: Georgia, "Songti SC", "Noto Serif", "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(58, 110, 150, .30) 0%, transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(242,161,84,.10) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg2) 0%, var(--bg) 45%, var(--bg) 100%);
  background-attachment: fixed;
  color: var(--txt);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 18, 26, .82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 1160px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(140deg, var(--accent), #c9702c);
  color: #21150a; font: 700 12px/30px var(--mono); text-align: center;
  letter-spacing: -.5px; box-shadow: 0 3px 12px rgba(242,161,84,.28);
}
.brand-txt { font-weight: 650; font-size: 15px; letter-spacing: .2px; white-space: nowrap; }
.brand-sub { display: block; font-weight: 400; font-size: 11px; color: var(--dim2); letter-spacing: .3px; }

.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; }
.nav::-webkit-scrollbar { display: none; }
.nav button {
  appearance: none; border: 0; background: transparent; color: var(--dim);
  font: inherit; font-size: 14px; padding: 7px 13px; border-radius: 9px;
  cursor: pointer; white-space: nowrap; transition: background .15s, color .15s;
}
.nav button:hover { color: var(--txt); background: var(--panel); }
.nav button.on { color: #10202c; background: var(--txt); font-weight: 600; }

.lang { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; flex: none; }
.lang button {
  appearance: none; border: 0; background: transparent; color: var(--dim);
  font: inherit; font-size: 12.5px; padding: 4px 9px; border-radius: 7px; cursor: pointer;
}
.lang button:hover { color: var(--txt); }
.lang button.on { background: var(--panel2); color: var(--txt); font-weight: 600; }

/* ---------------- 布局 ---------------- */
main { max-width: 1160px; margin: 0 auto; padding: 30px 20px 70px; }
.view { display: none; animation: fade .22s ease; }
.view.on { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

h1.page { font: 400 30px/1.25 var(--serif); margin: 6px 0 4px; letter-spacing: .2px; }
.page-sub { color: var(--dim); font-size: 13.5px; margin: 0 0 22px; max-width: 780px; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; margin-bottom: 18px;
}
.card > h2 {
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim2); margin: 0 0 14px; font-weight: 700;
}

/* ---------------- 表单控件 ---------------- */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.f > label { font-size: 12px; color: var(--dim); letter-spacing: .02em; }
select, input[type=text], input[type=number], input[type=search], textarea {
  appearance: none; width: 100%; color: var(--txt);
  background: rgba(0, 0, 0, .25); border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 11px; font: inherit; font-size: 14px;
  transition: border-color .15s, background .15s;
}
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%2392a7ba' stroke-width='1.6'/></svg>");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px;
}
select option { background: #16242f; color: var(--txt); }
textarea { min-height: 84px; resize: vertical; font-family: var(--mono); letter-spacing: .04em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
select:hover, input:hover, textarea:hover { border-color: rgba(255,255,255,.2); }

.btn {
  appearance: none; border: 1px solid var(--line); background: var(--panel2);
  color: var(--txt); font: inherit; font-size: 14px; font-weight: 500;
  padding: 9px 16px; border-radius: 9px; cursor: pointer;
  transition: background .15s, border-color .15s, transform .08s;
}
.btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-d));
  border-color: transparent; color: #221507; font-weight: 650;
  box-shadow: 0 4px 16px rgba(242,161,84,.22);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.big { font-size: 16px; padding: 13px 30px; border-radius: 11px; }
.btn.sm { font-size: 12.5px; padding: 5px 10px; border-radius: 7px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  width: 38px; height: 22px; border-radius: 12px; background: rgba(255,255,255,.14);
  position: relative; transition: background .18s; flex: none;
}
.switch .track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #d8e2ea; transition: transform .18s;
}
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { transform: translateX(16px); background: #06231b; }

/* ---------------- IBAN 首屏 ---------------- */
.hero { text-align: center; padding: 26px 16px 30px; }
.hero h1 { font: 400 clamp(26px, 4.4vw, 40px)/1.2 var(--serif); margin: 0 0 26px; }
.iban-out {
  font-family: var(--mono); font-weight: 600;
  font-size: clamp(19px, 4.6vw, 40px); letter-spacing: .045em;
  word-break: break-all; margin: 0 auto 8px; max-width: 900px;
  cursor: pointer; padding: 6px 10px; border-radius: 10px; display: inline-block;
  transition: background .15s;
}
.iban-out:hover { background: var(--panel); }
.iban-out.flash { animation: flash .5s ease; }
@keyframes flash { 0% { background: rgba(79,209,165,.28); } 100% { background: transparent; } }
.hero-hint { color: var(--dim2); font-size: 12px; height: 16px; margin-bottom: 22px; }
.hero-ctrl { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; align-items: center; }
.hero-ctrl select { width: auto; min-width: 210px; max-width: 100%; }

/* 徽章 / 元信息 */
.meta { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
        grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.meta div { background: #101d28; padding: 11px 14px; min-width: 0; }
.meta dt { font-size: 11px; color: var(--dim2); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 3px; }
.meta dd { margin: 0; font-family: var(--mono); font-size: 13.5px; word-break: break-all; }
.meta dd.txt { font-family: inherit; font-size: 13.5px; word-break: normal; }

.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600;
       padding: 2px 8px; border-radius: 20px; letter-spacing: .02em; }
.tag.ok   { background: rgba(79,209,165,.15); color: var(--ok); }
.tag.bad  { background: rgba(242,119,122,.15); color: var(--bad); }
.tag.warn { background: rgba(232,194,106,.15); color: var(--warn); }
.tag.mute { background: var(--panel2); color: var(--dim); }

/* ---------------- 表格 ---------------- */
.tbl-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; max-height: 480px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
thead th {
  position: sticky; top: 0; background: #16252f; z-index: 1;
  text-align: left; font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--dim2); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: top; }
tbody tr:hover td { background: rgba(255,255,255,.035); }
td.mono, th.mono { font-family: var(--mono); white-space: nowrap; }

/* ---------------- 校验结果 ---------------- */
.checks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 7px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.checks .ic { flex: none; width: 18px; text-align: center; font-weight: 700; }
.checks .ic.y { color: var(--ok); }
.checks .ic.n { color: var(--bad); }
.checks .ic.u { color: var(--dim2); }
.verdict { font-size: 17px; font-weight: 650; display: flex; align-items: center; gap: 10px; }

/* ---------------- 身份卡 ---------------- */
.id-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.id-card {
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.id-head { padding: 15px 17px; border-bottom: 1px solid var(--line); display: flex; gap: 13px; align-items: center; }
.avatar {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font: 600 16px/1 var(--mono); color: #10202c;
  background: linear-gradient(140deg, #9fd4c4, #6fb0c9);
}
.avatar.f { background: linear-gradient(140deg, #e8b0c0, #c79ad8); }
.id-name { font-size: 17px; font-weight: 650; letter-spacing: .01em; }
.id-sub { font-size: 12px; color: var(--dim); margin-top: 2px; }
.id-sec { padding: 6px 17px 10px; }
.id-sec > h3 {
  font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--dim2);
  margin: 12px 0 7px; font-weight: 700;
}
.frow { display: flex; gap: 10px; align-items: baseline; padding: 3.5px 0; font-size: 13.5px; }
.frow .fk { flex: none; width: 40%; max-width: 150px; color: var(--dim); font-size: 12.5px; }
.frow .fv { flex: 1 1 auto; min-width: 0; word-break: break-word; }
.frow .fv.mono { font-family: var(--mono); font-size: 13px; letter-spacing: .02em; }
.frow .cp {
  appearance: none; border: 0; background: transparent; color: var(--dim2);
  cursor: pointer; font-size: 12px; padding: 2px 5px; border-radius: 6px; flex: none;
  opacity: 0; transition: opacity .15s, background .15s, color .15s;
}
.frow:hover .cp { opacity: 1; }
.frow .cp:hover { background: var(--panel2); color: var(--txt); }
.frow .cp.done { opacity: 1; color: var(--ok); }
.id-foot { padding: 11px 17px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- 其他 ---------------- */
.note { font-size: 12.5px; color: var(--dim); line-height: 1.65; }
.note code { font-family: var(--mono); font-size: 12px; background: var(--panel2); padding: 1px 5px; border-radius: 5px; }
.bullets { margin: 8px 0 0; padding-left: 20px; color: var(--dim); font-size: 13.5px; line-height: 1.8; }
.bullets li::marker { color: var(--dim2); }
.kv-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--dim); margin-top: 10px; }
footer {
  max-width: 1160px; margin: 0 auto; padding: 22px 20px 46px;
  color: var(--dim2); font-size: 12px; line-height: 1.75; border-top: 1px solid var(--line);
}
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 16px);
  background: #eef4f8; color: #10202c; font-size: 13.5px; font-weight: 600;
  padding: 9px 18px; border-radius: 22px; box-shadow: 0 8px 30px rgba(0,0,0,.4);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 90;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.empty { color: var(--dim2); font-size: 13.5px; padding: 26px 0; text-align: center; }

@media (max-width: 640px) {
  .topbar-in { flex-wrap: wrap; gap: 10px; padding: 9px 14px; }
  .nav { order: 3; width: 100%; }
  main { padding: 22px 14px 50px; }
  .frow .fk { width: 42%; }
}
@media print {
  .topbar, .id-foot, footer, .btn, .cp { display: none !important; }
  body { background: #fff; color: #000; }
  .id-card, .card { border-color: #ccc; background: #fff; }
}
