/* POAFI institution workspace — visual layer over the functional prototype. */
:root {
  --nav: #ffffff;
  --green: #176a53;
  --green-deep: #123f32;
  --green-strong: #0d5944;
  --mint: #dff5eb;
  --mint-soft: #f0faf5;
  --light: #edf8f2;
  --ink: #1c302b;
  --muted: #71847a;
  --line: #e4ece8;
  --bg: #f5f8f7;
  --gold: #9f8655;
  --shadow: 0 2px 8px rgba(24, 59, 46, .025), 0 10px 28px rgba(24, 59, 46, .025);
}

html { color-scheme: light; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { 
  min-height: 38px;
  padding: 8px 15px;
  color: #344a42;
  background: #fff;
  border: 1px solid #dce7e1;
  border-radius: 8px;
  font-weight: 500;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease;
}
button:hover { background: #f4faf7; border-color: #bddccf; color: #125b46; }
button:active:not(:disabled) { transform: translateY(1px); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(77, 174, 135, .35);
  outline-offset: 2px;
}
button:disabled { opacity: .42; }
button.primary {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: #fff;
  box-shadow: 0 3px 7px rgba(21, 66, 51, .12);
}
button.primary:hover { background: #1d5a46; border-color: #1d5a46; color: #fff; }
button.link { min-height: 0; padding: 4px 5px; color: #21775e; border: 0; background: transparent; box-shadow: none; font-weight: 600; }
button.link:hover { color: #104e3b; background: #edf8f2; }
button.danger { color: #b35147; }
a { color: #1a7459; }
input, select, textarea {
  min-height: 40px;
  padding: 9px 12px;
  background: #fff;
  border: 1px solid #dce7e1;
  border-radius: 8px;
  color: #243d34;
  box-shadow: 0 1px 2px rgba(23, 56, 43, .02);
}
input::placeholder, textarea::placeholder { color: #a1ada7; }
input:hover, select:hover, textarea:hover { border-color: #bed5c9; }
input:focus, select:focus, textarea:focus { border-color: #67b799; outline: none; box-shadow: 0 0 0 3px rgba(103, 183, 153, .14); }
input[type="checkbox"], input[type="radio"] { min-height: 0; accent-color: #176a53; }
label { color: #5c6f67; font-size: 12px; font-weight: 500; }
h1, h2, h3 { color: #1c302a; }
h1 { font-size: 25px; line-height: 1.25; letter-spacing: -.045em; font-weight: 700; }
h2 { font-size: 15px; letter-spacing: -.015em; font-weight: 700; }
h3 { font-size: 13px; font-weight: 700; }
small, .muted { color: var(--muted); }
small { font-size: 11px; }
.num, .number, .balance, .bigvalue { font-family: Inter, "Noto Sans SC", sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }

/* Shell */
.app { grid-template-columns: 238px minmax(0, 1fr); }
.sidebar {
  z-index: 2;
  height: 100vh;
  padding: 27px 14px 18px;
  background: #fff;
  border-right: 1px solid #e5ede9;
  color: #607269;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 25px; color: #173e31; letter-spacing: 0; }
.brandmark { width: 36px; height: 36px; flex: 0 0 36px; position: relative; display: block; border-radius: 11px; background: #d9f5e8; }
.brandtext { display: block; min-width: 0; }
.brandtext strong { display: block; font: 800 20px/1 Inter, sans-serif; letter-spacing: .02em; }
.brand .brandtext small { display: block; margin-top: 5px; color: #8a9b92; font: 600 8px/1.1 Inter, sans-serif; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.org { padding: 11px 10px; margin: 0 0 17px; border: 1px solid #e5eee9; border-radius: 10px; background: #f8fbf9; color: #263e35; }
.org .row { gap: 9px; }
.orgtext { min-width: 0; flex: 1; line-height: 1.35; }
.orgtext strong { display: block; font-size: 12px; font-weight: 700; }
.org .orgtext small { display: block; margin-top: 4px; color: #96a59d; font-size: 9px; white-space: nowrap; }
.org-chevron { color: #a0afa7; font-size: 15px; }
.avatar, .avatar.dark { width: 34px; height: 34px; border-radius: 9px; background: #e5f6ed; color: #26755b; font-weight: 700; font-size: 11px; }
.sidebar nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d9e8e0 transparent; }
.section-label { padding: 16px 12px 7px; color: #a8b5ae; font-size: 10px; font-weight: 600; letter-spacing: .08em; }
.navbutton { width: 100%; min-height: 38px; gap: 11px; padding: 8px 11px; margin: 2px 0; border: 0; border-radius: 8px; background: transparent; color: #62756b; font-size: 12px; font-weight: 500; }
.navbutton .glyph { width: 20px; color: #8fa49a; font: 17px/1 Inter, sans-serif; }
.navbutton:hover { background: #f3faf6; color: #245d48; }
.navbutton.active { background: #e4f6ec; color: #146447; font-weight: 700; }
.navbutton.active .glyph { color: #208863; }
.navbutton .count { border-radius: 5px; background: #e5eee9; color: #788d81; font-size: 10px; line-height: 19px; }
.navbutton.active .count { background: #cfeede; color: #287657; }
.sidefoot { flex: 0 0 auto; margin-top: 12px; padding: 15px 10px 0; border-top: 1px solid #edf2ef; color: #8a9a91; font-size: 10px; }
.sidefoot .row { gap: 0; color: #597468; font-size: 11px; font-weight: 600; }
.sidefoot-note { margin-top: 5px; }
.statusdot { width: 7px; height: 7px; margin-right: 7px; background: #44b785; box-shadow: 0 0 0 3px #e6f7ee; }
.main { min-width: 0; }
.topbar { height: 68px; padding: 0 32px; background: rgba(255,255,255,.96); border-color: #e8efeb; }
.breadcrumbs { display: flex; align-items: center; min-width: 0; color: #42564d; font-size: 12px; font-weight: 600; white-space: nowrap; }
.breadcrumbs .muted { font-weight: 400; }
.breadcrumbs #breadcrumb { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.crumb-separator { margin: 0 12px; color: #d2ddd6; }
.topbar .right { flex-shrink: 0; gap: 16px; color: #8e9e95; font-size: 11px; }
.topbar .avatar { width: 32px; height: 32px; }
.topbar-divider { width: 1px; height: 22px; background: #e8eeea; }
.topbar-message { display: inline-flex; align-items: center; gap: 6px; color: #647a6e !important; font-size: 12px; }
.topbar-message .tag { padding: 1px 6px; border-radius: 5px; }
.viewbadge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid #e0eee7; border-radius: 6px; background: #f7fcf9; color: #66897a; font-size: 10px; font-weight: 500; }
.viewbadge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #66bf95; }
.content { max-width: 1600px; padding: 29px 32px 38px; }
.pagehead { min-height: 54px; margin-bottom: 23px; align-items: center; }
.pagehead p { margin-top: 7px; color: #778c80; font-size: 12px; }
.pagehead > .row { flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.row { gap: 10px; }
.between { gap: 12px; }
.grid { gap: 16px; }
.mt { margin-top: 18px; }

/* Surface, metrics, status */
.card { border: 1px solid #e4ece7; border-radius: 11px; background: #fff; box-shadow: var(--shadow); }
.pad { padding: 21px 22px; }
.cardhead { min-height: 62px; padding: 17px 22px; border-color: #edf2ef; }
.metric { position: relative; min-height: 139px; padding: 19px 20px 17px; }
.metric > .muted { color: #687f72; font-size: 12px; font-weight: 500; }
.metric .number { margin: 13px 0 6px; color: #20392f; font-size: 27px; line-height: 1.15; font-weight: 700; }
.metric .number small { margin-left: 6px; color: #94a39a; font: 500 11px/1.3 Inter, "Noto Sans SC", sans-serif; letter-spacing: 0; }
.metric .bottom { color: #7e9185; font-size: 10px; }
.metric .mini-icon { display: flex; align-items: center; justify-content: center; width: 29px; height: 29px; padding: 0; border-radius: 8px; background: #edf9f2; color: #66ac8a; font: 600 14px Inter, sans-serif; }
.up { color: #26966d; font-weight: 600; }
.tag { min-height: 22px; padding: 3px 8px; border-radius: 5px; color: #27825d; background: #e9f8ef; font-size: 10px; font-weight: 600; line-height: 1.4; }
.tag.amber { color: #a77b2f; background: #fff7e8; }
.tag.blue { color: #547da8; background: #eef5fb; }
.tag.red { color: #b76659; background: #fcf1ef; }
.tag.gray { color: #82948a; background: #f3f6f4; }
.callout { padding: 13px 15px; border: 1px solid #d8eee2; border-radius: 8px; background: #f2faf5; color: #648474; font-size: 12px; line-height: 1.7; }
.callout.amber { border-color: #f5e9cf; background: #fffbf2; color: #9b8356; }
.note { color: #94a39b; font-size: 11px; line-height: 1.7; }
.divider { margin: 16px 0; background: #edf2ef; }

/* Overview and actions */
.chart { height: 166px; margin-top: 18px; }
.chart svg { height: 137px; }
.chart svg path[stroke="#c7ad72"] { stroke: #b1cab9; }
.chartlabels { color: #a6b3ac; font-size: 10px; }
.legend { gap: 16px; color: #93a298; font-size: 10px; }
.legend i { background: #4caf86; }
.legend i.gold { background: #b6cabc; }
.todo { min-height: 64px; gap: 11px; padding: 12px 0; border-color: #eff3f0; }
.todo .info { color: #40574c; font-size: 12px; font-weight: 500; }
.todo .info small { margin-top: 2px; color: #9daaa3; font-size: 10px; font-weight: 400; }
.todo .link { flex-shrink: 0; font-size: 11px; }
.circle { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; background: #f4f9f6; color: #86a497; font: 600 10px Inter, sans-serif; }
.quick { gap: 10px; }
.grid.two .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quick button { min-width: 0; min-height: 80px; padding: 15px 14px; border: 1px solid #edf3ef; border-radius: 8px; background: #f8fbf9; color: #365a49; font-size: 12px; font-weight: 700; }
.quick button:hover { border-color: #cde9d9; background: #eff9f3; }
.quick button span { overflow: hidden; color: #91a399; font-size: 10px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }

/* Lists and compact data tables */
.tabs { gap: 25px; margin-bottom: 20px; border-color: #e6eeea; }
.tabs button { min-height: 41px; padding: 10px 1px; color: #8a9a91; font-size: 12px; }
.tabs button:hover { color: #20765a; background: none; }
.tabs button.selected { color: #176a50; border-bottom: 2px solid #308d6c; }
.toolbar { flex-wrap: wrap; gap: 9px; padding: 15px 20px; border-color: #edf2ef; }
.toolbar input, .toolbar select { min-height: 37px; font-size: 12px; }
.toolbar input { max-width: 260px; }
.toolbar select { max-width: 156px; }
.tablewrap { width: 100%; overflow-x: auto; }
table { color: #45594f; font-size: 12px; }
th { padding: 12px 20px; border-bottom: 1px solid #edf2ef; background: #f8fbf9; color: #758a7d; font-size: 11px; font-weight: 500; }
td { padding: 14px 20px; border-color: #f0f4f1; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f9fcfa; }
td .sub { margin-top: 3px; color: #9ca9a1; font-size: 10px; }
td .link { font-size: 11px; }
.customer { gap: 10px; color: #30493d; font-weight: 600; }
.customer .sub { font-weight: 400; }
.customer .avatar { width: 34px; height: 34px; }
.footer { min-height: 52px; padding: 12px 20px; border-top: 1px solid #f0f4f1; color: #95a49a; }
.footer button { min-height: 28px; padding: 3px 9px; border-radius: 6px; font-size: 11px; }

/* Customer details, forms, and account surfaces */
.detailhero { gap: 14px; padding: 23px 24px; }
.detailhero .avatar { width: 50px; height: 50px; border-radius: 12px; font-size: 17px; }
.detailhero h2 { font-size: 16px; }
.detailhero p { margin-top: 5px; font-size: 11px; }
.detailhero + .grid { padding-top: 17px; padding-bottom: 17px; }
.kv { padding: 9px 0; gap: 16px; color: #5e7468; font-size: 12px; }
.kv strong { color: #344e40; font-weight: 600; text-align: right; }
.context { gap: 12px; padding: 14px 17px; margin-bottom: 18px; border: 1px solid #e1eee6; border-left: 3px solid #63bd94; border-radius: 9px; box-shadow: var(--shadow); }
.context .meta strong { color: #2b4739; font-size: 12px; }
.context .sub { margin-top: 2px; color: #99aaa0; font-size: 10px; }
.context select { min-height: 36px; width: 220px; font-size: 12px; }
.field { margin-bottom: 16px; }
.field label { margin-bottom: 0; line-height: 1.6; }
.field label input, .field label select, .field label textarea { display: block; margin-top: 6px; }
.field strong { color: #536b5e; }
.amountfield { padding: 15px 16px; border-color: #e0ece5; border-radius: 9px; background: #f8fbf9; }
.amountfield input { min-height: 0; padding: 7px 0; border: 0; box-shadow: none; color: #254a39; font: 700 28px Inter, sans-serif; }
.amountfield input:focus { box-shadow: none; }
.amountfield .coin { color: #37594a; font-size: 15px; }
.bigvalue, .profit .value { color: #176d52; font-family: Inter, sans-serif; font-weight: 700; }
.profit { border: 1px solid #e0f0e6; background: #f1faf4; }
.asset, .template { padding: 21px; }
.asset .balance, .template .number { color: #234437; font-family: Inter, sans-serif; font-weight: 700; letter-spacing: -.035em; }
.coinicon { width: 36px; height: 36px; background: #e9f8ef; color: #288a65; }
.template .pairs span { background: #f2f8f4; color: #70877a; font-family: Inter, sans-serif; }
.bar { background: #eaf3ed; }
.bar span { background: #72c79b; }
.steps { color: #a1afa7; }
.steps b { color: #22775b; }
.stepnum { background: #e7f7ed; }
.upload { border-color: #c8dfd1; background: #fafdfb; color: #759283; }
.timeline { border-color: #e0eee6; }
.timeline p { color: #526a5d; }
.timeline p::before { background: #77c39d; }
.timeline small { margin-top: 3px; color: #a0aea5; }

/* Potential/funding-account cards used by customer management views. */
.account-card, .asset-card, .va-card, .potential-card, .potential-account { min-width: 0; padding: 20px; border: 1px solid #e2eee7; border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.account-card:hover, .asset-card:hover, .va-card:hover, .potential-card:hover, .potential-account:hover { border-color: #c8e6d5; }
.account-card .number, .asset-card .number, .va-card .number, .potential-card .number, .potential-account .number { color: #234a37; font-weight: 700; }
.account-card .account-head, .asset-card .account-head, .va-card .account-head, .potential-card .account-head, .potential-account .account-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.account-card .account-meta, .asset-card .account-meta, .va-card .account-meta, .potential-card .account-meta, .potential-account .account-meta { margin-top: 7px; color: #7c9084; font-size: 11px; }
.account-card .account-actions, .asset-card .account-actions, .va-card .account-actions, .potential-card .account-actions, .potential-account .account-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* Dialogs and feedback */
.modalback { padding: 22px; background: rgba(26, 48, 39, .34); backdrop-filter: blur(2px); }
.modal { border: 1px solid #e8f0eb; border-radius: 13px; box-shadow: 0 22px 65px rgba(22, 54, 40, .18); }
.modalhead { min-height: 66px; padding: 18px 23px; border-color: #edf2ef; }
.modalhead h2 { font-size: 16px; }
.modalhead .link { width: 30px; height: 30px; border-radius: 7px; color: #94a59a; font-size: 15px; }
.modalbody { padding: 21px 23px; }
.modalfoot { gap: 9px; padding: 15px 23px; border-color: #edf2ef; background: #fbfdfb; }
.error { color: #bb6255; font-size: 11px; }
.toast { padding: 12px 18px; border-radius: 9px; background: #194c3a; box-shadow: 0 10px 30px rgba(25, 70, 49, .2); font-size: 12px; }
.empty { padding: 44px 24px; color: #a0aea5; }
.result .check { color: #3fa779; }
.prototypefooter { margin-top: 27px; color: #aab7af; font-size: 10px; letter-spacing: .03em; }

@media (min-width: 1600px) {
  .content { padding: 35px 42px 44px; }
  .topbar { padding: 0 42px; }
}
@media (max-width: 1150px) {
  .app { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .content { padding: 26px; }
  .topbar { padding: 0 26px; }
  .split { grid-template-columns: 1fr; }
  .four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .app { display: block; }
  .sidebar { position: static; height: auto; padding: 14px 15px 0; border-right: 0; border-bottom: 1px solid #e5ede9; }
  .brand { padding: 0 1px 12px; }
  .brandmark { width: 32px; height: 32px; flex-basis: 32px; }
  .brandtext strong { font-size: 18px; }
  .brand .brandtext small { font-size: 7px; }
  .org, .section-label, .sidefoot { display: none; }
  .sidebar nav { display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; padding-bottom: 9px; }
  .navbutton { width: auto; min-width: max-content; min-height: 34px; padding: 7px 11px; margin: 0; font-size: 11px; }
  .navbutton .glyph, .navbutton .count { display: none; }
  .topbar { height: 57px; padding: 0 16px; }
  .topbar .right { gap: 8px; }
  .topbar .right .topbar-date, .topbar-divider { display: none; }
  .topbar .right .viewbadge { display: inline-flex; }
  .viewbadge { padding: 4px 6px; font-size: 9px; }
  .topbar-message { font-size: 11px; }
  .topbar .avatar { width: 29px; height: 29px; font-size: 10px; }
  .breadcrumbs { font-size: 11px; }
  .crumb-separator { margin: 0 7px; }
  .content { padding: 22px 15px 32px; }
  .pagehead { align-items: flex-start; flex-wrap: wrap; gap: 14px; margin-bottom: 19px; }
  .pagehead > .row { justify-content: flex-start; }
  h1 { font-size: 22px; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { gap: 12px; }
  .metric { min-height: 124px; padding: 16px 14px; }
  .metric .number { margin-top: 12px; font-size: 23px; }
  .metric .bottom { font-size: 10px; }
  .pad, .asset, .template { padding: 18px; }
  .cardhead { padding: 15px 18px; }
  .context { flex-wrap: wrap; }
  .context select { width: 100%; }
  .toolbar { gap: 8px; padding: 14px; }
  .toolbar input { flex: 1 1 100%; max-width: none; }
  .toolbar select { flex: 1 1 135px; max-width: none; }
  .toolbar .muted { flex: 1 1 100%; margin-left: 0 !important; }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs { gap: 19px; overflow-x: auto; }
  .tabs button { flex: 0 0 auto; white-space: nowrap; }
  .detailhero { flex-wrap: wrap; padding: 18px; }
  .detailhero > div { min-width: calc(100% - 70px); }
  .modalback { align-items: center; padding: 12px; }
  .modal { max-height: calc(100vh - 24px); }
  .modalhead, .modalbody { padding-left: 18px; padding-right: 18px; }
  .modalfoot { padding: 14px 18px; }
  .steps { flex-wrap: wrap; gap: 8px; }
}
@media (max-width: 390px) {
  .metric .number { font-size: 20px; }
  .metric .number small { font-size: 10px; }
  .chartlabels { font-size: 9px; }
}

/* 客户详情与业务客户筛选：合并时在现有原型样式之后加载。 */
.customer-detail-tabs { overflow-x: auto; }
.customer-detail-tabs button { flex: 0 0 auto; white-space: nowrap; }
.customer-detail-tabs button:focus-visible,
.business-client-picker summary:focus-visible,
.business-client-picker input:focus-visible,
.business-client-results button:focus-visible {
  outline: 2px solid #20765a;
  outline-offset: 3px;
}
.business-client-picker { position: relative; flex: 0 0 auto; }
.business-client-picker summary {
  cursor: pointer;
  list-style: none;
  padding: 9px 13px;
  border: 1px solid #d9e9df;
  border-radius: 7px;
  color: #276c51;
  background: #f8fbf9;
  font-size: 12px;
}
.business-client-picker summary::-webkit-details-marker { display: none; }
.business-client-picker summary::after { content: " ▾"; }
.business-client-menu {
  position: absolute;
  z-index: 20;
  right: 0;
  top: calc(100% + 6px);
  width: min(360px, calc(100vw - 40px));
  padding: 14px;
  border: 1px solid #dfebe4;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(35, 70, 50, .15);
}
.business-client-menu label { display: block; margin-bottom: 8px; color: #526a5d; font-size: 12px; }
.business-client-menu input { width: 100%; box-sizing: border-box; }
.business-client-menu .note { margin: 8px 0; }
.business-client-results { max-height: 240px; overflow-y: auto; padding: 0; margin: 0; list-style: none; }
.business-client-results button { display: block; width: 100%; padding: 9px 10px; text-align: left; border: 0; background: transparent; }
.business-client-results button:hover,
.business-client-results button[aria-current="true"] { background: #eff9f3; }
.business-client-results button strong,
.business-client-results button span { display: block; overflow-wrap: anywhere; }
.business-client-results button span { color: #70887b; font-size: 11px; margin-top: 3px; }
@media (max-width: 600px) {
  .business-client-picker { margin-left: auto; }
}

/* 客户资金页：在 prototype.css 与 design.css 之后加载。 */
.funds-group { padding-top: 16px; }
.funds-group + .funds-group { border-top: 1px solid var(--line); }
.funds-group h3 { padding: 0 20px 12px; }
.funds-filters { align-items: end; flex-wrap: wrap; }
.funds-filters label { flex: 1 1 130px; min-width: 0; margin: 0; }
.funds-filters label select, .funds-filters label input {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 38px;
  margin-top: 5px;
}
.funds-filters > button { flex: 0 0 auto; min-height: 38px; }
@media (max-width: 760px) {
  .funds-filters label { flex: 1 1 140px; }
  .funds-filters > button { flex: 1 1 100%; }
}

/* 个人 KYC 本地演示；不影响企业 KYB 和其他页面。 */
.personal-disclaimer { margin-bottom: 18px; }
.personal-file { border: 1px dashed #c7d6cf; border-radius: 10px; padding: 14px; margin: 12px 0; }
.personal-file label { display: block; font-weight: 600; }
.personal-file input[type="file"] { display: block; width: 100%; margin-top: 8px; font-weight: 400; }
.personal-file-card { overflow-wrap: anywhere; margin-top: 8px; font-size: 13px; }
.personal-consent { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; margin: 10px 0; }
.personal-consent input { flex: none; width: auto; margin-top: 3px; }
.personal-checks { margin-top: 12px; padding-top: 8px; border-top: 1px solid #edf2ee; }
.personal-preview { display: block; width: 100%; height: min(65vh, 650px); border: 1px solid #dce6e0; background: #f5f7f6; margin-top: 14px; }
.personal-preview-image { display: block; max-width: 100%; max-height: 65vh; object-fit: contain; margin: 14px auto; }

/* 独立追加；原有 .personal-preview-image 仍用于图片 Blob 预览。 */
.personal-pdf { margin-top: 14px; min-width: 0; }
.personal-pdf-toolbar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; }
.personal-pdf-toolbar [data-pdf-page] { min-width: 110px; text-align: center; font-variant-numeric: tabular-nums; }
.personal-pdf-status { min-height: 1.5em; margin: 8px 0; font-size: 13px; color: #50635b; overflow-wrap: anywhere; }
.personal-pdf-status.personal-pdf-error { color: #ad2929; }
.personal-pdf-sheet { display: flex; align-items: flex-start; justify-content: center; max-width: 100%; max-height: min(62vh, 680px); overflow: auto; background: #e8edea; border: 1px solid #dce6e0; }
.personal-pdf canvas:not([hidden]) { display: block; max-width: 100%; height: auto; background: #fff; }
.personal-pdf canvas[hidden] { display: none; }

/* KYC / KYB：默认展开的客户专属版本资料。 */
.kyc-detail-heading { align-items: flex-start; flex-wrap: wrap; }
.kyc-detail-heading .note { margin-top: 7px; }
.kyc-detail-heading .note .tag { margin-left: 6px; }
.kyc-notice { margin: 18px 0 4px; padding: 11px 14px; border: 1px solid #e0f1e7; border-radius: 8px; background: #f3faf6; color: #6b8879; font-size: 11px; line-height: 1.7; }
.kyc-version { margin-top: 18px; padding: 18px; border: 1px solid #e3eee8; border-radius: 9px; background: #fcfefd; }
.kyc-version-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.kyc-version .note { margin-top: 5px; }
.kyc-version .kv strong { overflow-wrap: anywhere; }
.kyc-empty { margin-top: 18px; padding: 35px 20px; border: 1px dashed #d9e8df; border-radius: 9px; background: #fbfdfc; color: #627f6f; text-align: center; }
.kyc-empty p { margin-top: 7px; color: #94a39b; font-size: 12px; }
@media (max-width: 600px) { .kyc-version { padding: 14px; } }

/* 账户详情：分组收款信息与可复制字段。 */
.modal.receiving-dialog {
  --receiving-head-height: 68px;
  width: 860px;
  scroll-padding-top: min(230px, 70%);
}
.receiving-dialog > .modalhead {
  position: sticky;
  z-index: 4;
  top: 0;
  height: var(--receiving-head-height);
  min-height: var(--receiving-head-height);
  gap: 12px;
  padding-top: 0;
  padding-bottom: 0;
  background: #fff;
}
.receiving-dialog > .modalhead h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receiving-dialog > .modalhead .link { flex: 0 0 30px; }
.receiving-dialog .receiving-actions {
  position: sticky;
  z-index: 3;
  top: var(--receiving-head-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  min-width: 0;
  margin: 20px -23px 0;
  padding: 11px 23px;
  border-top: 1px solid #edf2ef;
  border-bottom: 1px solid #e7f0eb;
  background: #fff;
  box-shadow: 0 5px 12px rgba(24, 59, 46, .06);
}
.receiving-dialog .receiving-actions-title { flex: 0 0 auto; color: #547062; font-size: 12px; font-weight: 700; }
.receiving-dialog .receiving-actions-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; min-width: 0; }
.receiving-dialog .receiving-actions-buttons button {
  flex: 0 1 auto;
  min-width: 44px;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  font-size: 12px;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}
.receiving-dialog .receiving-actions-buttons button:focus-visible { outline: 2px solid var(--green-strong); outline-offset: 2px; }
@media (max-width: 760px) {
  .receiving-dialog .receiving-actions { margin-right: -18px; margin-left: -18px; padding-right: 18px; padding-left: 18px; }
}
@media (max-width: 600px) {
  .receiving-dialog .receiving-actions { flex-direction: column; align-items: stretch; gap: 7px; padding-top: 10px; padding-bottom: 10px; }
  .receiving-dialog .receiving-actions-buttons { justify-content: flex-start; gap: 6px; }
  .receiving-dialog .receiving-actions-buttons button { flex: 1 1 auto; padding-right: 8px; padding-left: 8px; }
}
@media (max-width: 340px) {
  .receiving-dialog .receiving-actions-buttons:has(> button:nth-child(4)) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 260px) {
  .receiving-dialog .receiving-actions-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* 极短屏压缩留白；空操作尾栏不占用账户详情的滚动空间。 */
.receiving-dialog .modalfoot:empty { display: none; }
@media (max-height: 360px) {
  .receiving-dialog .receiving-actions { gap: 4px; padding-top: 6px; padding-bottom: 6px; }
  .receiving-dialog .receiving-actions-title { display: none; }
}
@media (max-height: 260px) {
  .modal.receiving-dialog { --receiving-head-height: 56px; }
  .receiving-dialog .modalbody { padding-bottom: 0; }
  .receiving-dialog .receiving-actions-buttons button { padding: 4px 3px; }
}
@media (max-width: 180px) {
  .receiving-dialog .receiving-actions-buttons,
  .receiving-dialog .receiving-actions-buttons:has(> button:nth-child(4)) {
    grid-template-columns: minmax(0, 1fr);
    max-height: max(44px, calc(100vh - var(--receiving-head-height) - 74px));
    overflow-y: auto;
    padding: 3px;
    scrollbar-width: thin;
  }
}
.receiving-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--mint-soft);
}
.receiving-summary-main, .receiving-summary-meta { min-width: 0; overflow-wrap: anywhere; }
.receiving-summary-main { flex: 1 1 240px; color: var(--ink); }
.receiving-summary-meta { flex: 0 1 auto; color: var(--muted); font-size: 12px; }
.receiving-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 22px 0 12px;
}
.receiving-methods { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.receiving-method { min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.receiving-method-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 14px; }
.receiving-method-name { flex: 1 1 150px; min-width: 0; overflow-wrap: anywhere; }
.receiving-method-label { display: block; color: var(--green-deep); font-size: 14px; font-weight: 700; }
.receiving-method-subtitle { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.receiving-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; margin-top: 12px; padding-top: 4px; border-top: 1px solid #edf2ef; }
.receiving-field { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.3fr); align-items: center; gap: 8px; min-width: 0; border-bottom: 1px solid #f1f5f2; }
.receiving-field-label { min-width: 0; color: #71847a; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.receiving-field-value { min-width: 0; color: #29463a; font-size: 12px; }
.receiving-field-text {
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  user-select: text;
  -webkit-user-select: text;
}
.receiving-dialog .receiving-value-copy {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 3px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
}
.receiving-dialog .receiving-value-copy:hover:not(:disabled) {
  background: transparent;
  color: var(--green-strong);
  text-decoration: underline;
  text-decoration-color: #85bd9f;
  text-underline-offset: 3px;
}
.receiving-dialog .receiving-value-copy:active:not(:disabled) { transform: none; }
.receiving-value-muted { padding: 9px 3px; color: #94a39b; font-weight: 400; line-height: 1.5; }
.receiving-dialog .receiving-copy-all {
  flex: 0 0 auto;
  min-width: 84px;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #cfe5d9;
  border-radius: 8px;
  background: #f6fbf8;
  color: var(--green-strong);
  font-weight: 600;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
}
.receiving-dialog .receiving-copy-all:hover:not(:disabled) {
  border-color: var(--green);
  background: var(--mint);
  color: var(--green-deep);
}
.receiving-dialog .receiving-value-copy:focus-visible, .receiving-dialog .receiving-copy-all:focus-visible {
  outline: 2px solid var(--green-strong);
  outline-offset: 1px;
}
.receiving-blank { padding: 18px; border: 1px dashed var(--line); border-radius: 8px; background: var(--mint-soft); color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.receiving-ledger { min-width: 0; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 600px) {
  .receiving-summary { padding: 14px; }
  .receiving-method { padding: 14px; }
  .receiving-fields { grid-template-columns: minmax(0, 1fr); }
}

.receiving-manual-wrap:not([hidden]) { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--mint-soft); }
.receiving-manual-wrap label { display: block; margin-bottom: 8px; color: var(--green-deep); font-size: 13px; font-weight: 600; }
.receiving-manual-wrap textarea { display: block; width: 100%; min-height: 100px; resize: vertical; overflow-wrap: anywhere; }
.receiving-manual-wrap[hidden] { display: none; }
.receiving-dialog .modalfoot { flex-wrap: wrap; }

/* 换汇：客户和机构自身换汇共用，独立作用域不影响其他表单。 */
.fx-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  align-items: start;
  gap: 18px;
  min-width: 0;
}
.fx-layout > .card { min-width: 0; overflow: visible; }
.fx-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 22px;
}
.fx-panel-head > div { flex: 1 1 160px; min-width: 0; }
.fx-panel-head h2 { font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.fx-panel-head .tag { flex: 0 0 auto; }
.fx-panel-subtitle { margin-top: 5px; color: #7a8d82; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.fx-exchange-box {
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid #e1ede6;
  border-radius: 11px;
  background: #f8fbf9;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.fx-exchange-box:focus-within { border-color: #9dcfb7; box-shadow: 0 0 0 3px rgba(103, 183, 153, .12); }
.fx-box-label { display: block; min-height: 18px; margin: 0 0 6px; color: #647c6f; font-size: 12px; font-weight: 600; line-height: 18px; }
.fx-entry { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px 16px; min-width: 0; }
.fx-amount-column { flex: 1 1 170px; min-width: 0; }
.fx-layout input.fx-amount-input {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 3px 2px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  color: #203f32;
  font-size: clamp(22px, 2.2vw, 29px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  letter-spacing: -.025em;
}
.fx-layout input.fx-amount-input::placeholder { color: #97aba0; font-size: 14px; font-weight: 500; letter-spacing: 0; }
.fx-layout input.fx-amount-input:focus { border: 0; background: transparent; box-shadow: none; }
.fx-layout input.fx-amount-input[readonly] { color: #4f6b5c; cursor: default; }
.fx-amount-caption { display: block; margin-top: 4px; color: #8a9e92; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.fx-selector { flex: 1 1 200px; min-width: 0; max-width: 100%; }
.fx-selector-label { display: block; min-height: 18px; margin: 0 0 6px; color: #809388; font-size: 11px; line-height: 18px; overflow-wrap: anywhere; }
.fx-layout .fx-selector select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #d8e8df;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: none;
  color: #294b3b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fx-layout .fx-selector select:hover { border-color: #a9d3bd; }
.fx-layout .fx-selector select:focus { border-color: #67b799; box-shadow: 0 0 0 3px rgba(103, 183, 153, .14); }
.fx-balance { margin-top: 12px; color: #7d9085; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.fx-swap-row { position: relative; z-index: 1; display: flex; justify-content: center; height: 16px; }
.fx-layout button.fx-swap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  margin-top: -14px;
  padding: 0;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #e5f5eb;
  box-shadow: 0 1px 3px rgba(24, 59, 46, .12);
  color: #176a53;
  font-size: 21px;
  line-height: 1;
}
.fx-layout button.fx-swap:hover:not(:disabled) { background: #d0efdd; color: #104c39; }
.fx-layout button.fx-swap:disabled { opacity: .55; }
.fx-rate-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  min-width: 0;
  margin-top: 20px;
  padding: 14px 0;
  border-top: 1px solid #edf2ef;
  border-bottom: 1px solid #edf2ef;
  color: #71877a;
  font-size: 12px;
}
.fx-rate-line > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.fx-rate-line strong { flex: 1 1 auto; color: #265b44; font-variant-numeric: tabular-nums; text-align: right; }
.fx-rate-line small { flex: 1 1 100%; text-align: right; }
.fx-support { margin-top: 16px; padding: 12px 14px; border: 1px solid #dceee3; border-radius: 8px; background: #f3faf6; color: #567b67; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.fx-support:empty { display: none; }
.fx-disclosure { margin: 12px 0 16px; color: #889b90; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.fx-layout button.fx-quote-button { width: 100%; min-height: 48px; padding: 11px 16px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.fx-layout button:focus-visible, .fx-layout input:focus-visible, .fx-layout select:focus-visible { outline: 2px solid #176a53; outline-offset: 2px; }
.fx-result-panel { min-width: 0; }
.fx-result-panel .empty { padding: 44px 16px; line-height: 1.8; overflow-wrap: anywhere; }
.fx-result-panel .kv { align-items: flex-start; flex-wrap: wrap; gap: 4px 14px; }
.fx-result-panel .kv > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.fx-result-panel .kv strong { text-align: right; }
.fx-result-panel .profit, .fx-result-panel .callout, .fx-result-panel .note, .fx-result-panel .bigvalue, .fx-result-panel small { overflow-wrap: anywhere; }
.fx-result-panel .profit .between { align-items: flex-start; flex-wrap: wrap; }
.fx-result-panel .profit .between > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.fx-result-panel button { min-height: 44px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .fx-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .fx-panel-head { margin-bottom: 18px; }
  .fx-exchange-box { padding: 15px; }
  .fx-layout input.fx-amount-input { font-size: 25px; }
  .fx-result-panel .profit { padding: 15px; }
}

/* 出金：收款账户选择与交易详情，仅作用于对应组件。 */
.beneficiary-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  min-width: 0;
  margin-bottom: 6px;
}
.beneficiary-picker-head label { flex: 1 1 130px; min-width: 0; margin: 0; color: #536b5e; font-weight: 600; overflow-wrap: anywhere; }
.beneficiary-picker-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.beneficiary-picker-actions button {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border-color: #d7e9df;
  background: #f8fcf9;
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.beneficiary-picker-actions button:hover:not(:disabled) { border-color: #a9d3bd; background: #eaf8ef; }
#payoutForm #beneficiary { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 44px; }
.beneficiary-summary {
  min-width: 0;
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px solid #e0f0e7;
  border-radius: 8px;
  background: #f4faf6;
  line-height: 1.5;
}
.beneficiary-summary strong, .beneficiary-summary span { display: block; min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: normal; }
.beneficiary-summary strong { margin: 0; color: #2a5140; font-size: 12px; font-weight: 700; }
.beneficiary-summary span { margin-top: 3px; color: #718a7c; font-size: 11px; }
.beneficiary-summary + .note { margin-top: 8px; overflow-wrap: anywhere; }
.beneficiary-picker-actions button:focus-visible, #payoutForm #beneficiary:focus-visible {
  outline: 2px solid var(--green-strong);
  outline-offset: 2px;
}

.payout-detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.payout-detail > *, .payout-information > *, .payout-summary-head > *, .payout-amounts > *,
.payout-summary-meta > *, .payout-info-grid > *, .payout-order-info > *, .payout-records > * { min-width: 0; max-width: 100%; }
.payout-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  padding: 22px 16px;
  border: 1px solid #e4ece7;
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--shadow);
}
.payout-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; text-align: center; }
.payout-step:not(:last-child)::after { content: ""; position: absolute; z-index: 0; top: 15px; left: 50%; width: 100%; height: 2px; background: #e7eee9; }
.payout-step.is-done:not(:last-child)::after { background: #a8d8bf; }
.payout-step-index {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid #dce6e0;
  border-radius: 50%;
  background: #f7faf8;
  color: #60766a;
  font: 700 12px/1 Inter, sans-serif;
}
.payout-step.is-done .payout-step-index { border-color: #176a53; background: #176a53; color: #fff; }
.payout-step.is-current .payout-step-index { border-color: #27825f; background: #e2f5e9; color: #176a50; box-shadow: 0 0 0 4px #f1faf5; }
.payout-step > div { min-width: 0; max-width: 100%; padding: 0 5px; }
.payout-step strong, .payout-step small { display: block; overflow-wrap: anywhere; }
.payout-step strong { color: #60766a; font-size: 12px; line-height: 1.4; }
.payout-step.is-done strong { color: #456b57; }
.payout-step.is-current strong { color: #165d44; }
.payout-step small { margin-top: 4px; color: #62786b; font-size: 11px; line-height: 1.5; }

.payout-summary-head, .payout-info-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.payout-summary-head > div { flex: 1 1 150px; }
.payout-summary-head small { display: block; margin-bottom: 4px; color: #81958a; }
.payout-summary-head h2 { color: #26483a; font-size: 17px; line-height: 1.4; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.payout-summary-head .tag { flex: 0 1 auto; overflow-wrap: anywhere; }
.payout-amounts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #e3f1e8;
  border-radius: 9px;
  background: #f5fbf7;
}
.payout-money span, .payout-money strong, .payout-money small { display: block; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.payout-money span { color: #718a7c; font-size: 11px; }
.payout-money strong { margin-top: 5px; color: #1b5039; font-size: clamp(18px, 2vw, 24px); font-variant-numeric: tabular-nums; line-height: 1.3; letter-spacing: -.025em; }
.payout-money small { margin-top: 4px; color: #8b9e92; line-height: 1.5; }
.payout-arrow { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid #d9eee1; border-radius: 50%; background: #fff; color: #64a987; font-size: 17px; }
.payout-summary-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 18px; margin-top: 16px; }
.payout-summary-meta > * { overflow-wrap: anywhere; }
.payout-summary-meta .kv { align-items: flex-start; flex-wrap: wrap; gap: 4px 10px; padding: 3px 0; }
.payout-summary-meta .kv > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.payout-summary-meta .kv strong { text-align: left; }

.payout-information { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; min-width: 0; }
.payout-info-head { align-items: baseline; padding-bottom: 14px; border-bottom: 1px solid #edf2ef; }
.payout-info-head h2 { color: #28483a; font-size: 15px; }
.payout-info-head small { overflow-wrap: anywhere; }
.payout-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; min-width: 0; }
.payout-info-field { min-width: 0; padding: 13px 0; border-bottom: 1px solid #f0f4f1; }
.payout-field-label, .payout-field-value { display: block; min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: normal; }
.payout-field-label { color: #85988d; font-size: 11px; line-height: 1.5; }
.payout-field-value { margin-top: 4px; color: #365246; font-size: 12px; font-weight: 600; line-height: 1.6; }
.payout-order-info h2, .payout-records h2 { color: #28483a; }
.payout-order-info .kv, .payout-records .kv { align-items: flex-start; flex-wrap: wrap; gap: 4px 12px; }
.payout-order-info .kv > *, .payout-records .kv > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.payout-order-info .kv strong, .payout-records .kv strong { text-align: left; }
.payout-order-info, .payout-records { min-width: 0; overflow-wrap: anywhere; }
.payout-records .tablewrap { max-width: 100%; }
.payout-detail button { max-width: 100%; min-height: 44px; white-space: normal; overflow-wrap: anywhere; }
.payout-detail button:focus-visible, .payout-detail a:focus-visible { outline: 2px solid var(--green-strong); outline-offset: 2px; }

@media (max-width: 760px) {
  .payout-detail { gap: 12px; }
  .payout-information { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .payout-info-grid { grid-template-columns: minmax(0, 1fr); }
  .payout-summary-meta { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .payout-progress { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 18px; }
  .payout-step { flex-direction: row; align-items: flex-start; gap: 12px; text-align: left; }
  .payout-step:not(:last-child)::after { top: 32px; bottom: -18px; left: 15px; width: 2px; height: auto; }
  .payout-step > div { padding: 1px 0 0; }
  .payout-amounts { grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 15px; }
  .payout-arrow { width: 28px; height: 28px; transform: rotate(90deg); }
  .payout-summary-head h2 { font-size: 16px; }
}

/* 费率模板页面；放在 design.css 之后，不影响其他页面。 */
.poafi-template-page { display: grid; gap: 17px; min-width: 0; }
.poafi-template-page .pt-intro { display: flex; align-items: center; gap: 12px; padding: 15px 17px; border: 1px solid #d9eee2; border-radius: 11px; background: #eef9f2; color: #517665; }
.poafi-template-page .pt-intro-icon { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; background: #dcf3e5; color: #218262; font-size: 19px; }
.poafi-template-page .pt-intro strong, .poafi-template-page .pt-intro span:not(.pt-intro-icon) { display: block; }
.poafi-template-page .pt-intro strong { color: #1e644d; font-size: 12px; }
.poafi-template-page .pt-intro span:not(.pt-intro-icon) { margin-top: 2px; font-size: 11px; }
.poafi-template-page .pt-list-card { min-width: 0; overflow: hidden; }
.poafi-template-page .pt-list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 21px 22px 0; }
.poafi-template-page .pt-list-head h2, .poafi-template-dialog h3 { margin: 0; }
.poafi-template-page .pt-list-head p { margin: 4px 0 0; color: #8b9d92; font-size: 11px; }
.poafi-template-page .pt-count { flex-shrink: 0; padding: 4px 9px; border-radius: 7px; background: #f1f8f4; color: #628877; font-size: 11px; }
.poafi-template-page .pt-filters { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(135px, 1fr) minmax(135px, 1fr) minmax(115px, .8fr) auto; align-items: end; gap: 12px; padding: 19px 22px 3px; }
.poafi-template-page .pt-filters label, .poafi-template-dialog .pt-basic-grid label, .poafi-template-dialog .pt-batch-grid label { display: grid; min-width: 0; gap: 6px; color: #61796c; font-size: 11px; }
.poafi-template-page .pt-filters input, .poafi-template-page .pt-filters select, .poafi-template-dialog .pt-basic-grid input, .poafi-template-dialog .pt-pair-search input { width: 100%; min-width: 0; }
.poafi-template-page .pt-filter-actions { display: flex; gap: 7px; }
.poafi-template-page .pt-filter-actions button { white-space: nowrap; }
.poafi-template-page .pt-filter-error { padding: 0 22px; color: #b65549; font-size: 11px; }
.poafi-template-page .pt-filter-error:empty { display: none; }
.poafi-template-page .pt-filter-note { margin: 7px 22px 16px; color: #98a99f; font-size: 10px; }
.poafi-template-page .pt-list-scroll { max-height: min(58vh, 600px); overflow: auto; border-top: 1px solid #edf3ef; }
.poafi-template-page .pt-list-table { width: 100%; white-space: normal; table-layout: fixed; }
.poafi-template-page .pt-list-table th { position: sticky; top: 0; z-index: 1; }
.poafi-template-page .pt-list-table th:nth-child(1) { width: 24%; }
.poafi-template-page .pt-list-table th:nth-child(2) { width: 19%; }
.poafi-template-page .pt-list-table th:nth-child(3) { width: 19%; }
.poafi-template-page .pt-list-table th:nth-child(4) { width: 10%; }
.poafi-template-page .pt-list-table th:nth-child(5) { width: 28%; }
.poafi-template-page .pt-list-table td { vertical-align: middle; overflow-wrap: anywhere; }
.poafi-template-page .pt-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.poafi-template-page .pt-name-icon { display: grid; place-items: center; flex: 0 0 35px; width: 35px; height: 35px; border-radius: 9px; background: #e6f7ed; color: #218567; font-size: 15px; }
.poafi-template-page .pt-name strong { display: block; color: #2d493b; font-weight: 700; }
.poafi-template-page .pt-name small, .poafi-template-page .pt-sub { display: block; margin-top: 3px; color: #96a69d; font-size: 10px; }
.poafi-template-page .pt-remark { color: #758b7f; }
.poafi-template-page .pt-actions { display: flex; flex-wrap: wrap; gap: 3px 6px; }
.poafi-template-page .pt-actions button { min-height: 30px; padding: 3px 5px; border: 0; background: transparent; color: #20775a; font-size: 11px; box-shadow: none; }
.poafi-template-page .pt-actions button:hover:not(:disabled) { background: #edf8f2; }
.poafi-template-page .pt-actions button.pt-danger { color: #b26559; }
.poafi-template-page .pt-actions button:disabled { color: #9caaa2; }
.poafi-template-page .pt-status, .poafi-template-dialog .pt-status, .poafi-template-dialog .pt-pair-status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 6px; background: #f1f5f2; color: #7c8e83; font-size: 10px; font-weight: 600; white-space: nowrap; }
.poafi-template-page .pt-status::before, .poafi-template-dialog .pt-status::before, .poafi-template-dialog .pt-pair-status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.poafi-template-page .pt-status.is-live, .poafi-template-dialog .pt-status.is-live, .poafi-template-dialog .pt-pair-status.is-on { background: #e9f8ef; color: #27825d; }
.poafi-template-page .pt-status.is-stopped, .poafi-template-dialog .pt-status.is-stopped { background: #f8f1ef; color: #a86b60; }
.poafi-template-page .pt-empty, .poafi-template-dialog .pt-empty { padding: 25px 12px; color: #95a69b; text-align: center; }

/* 明细弹窗有固定头尾，正文可滚动；交易对区域另作有界滚动，不采用分页。 */
.modal.poafi-template-dialog { display: flex; flex-direction: column; width: 830px; max-height: min(90vh, 850px); overflow: hidden; }
.poafi-template-dialog > .modalhead, .poafi-template-dialog > .modalfoot { flex: 0 0 auto; }
.poafi-template-dialog > .modalbody { flex: 1 1 auto; min-height: 0; overflow: auto; }
.poafi-template-dialog .pt-dialog-content { display: grid; gap: 17px; min-width: 0; }
.poafi-template-dialog .pt-notice { padding: 11px 13px; border: 1px solid #d8eee2; border-radius: 8px; background: #f1faf5; color: #648474; font-size: 11px; line-height: 1.7; }
.poafi-template-dialog .pt-section { min-width: 0; }
.poafi-template-dialog .pt-section > h3 { margin-bottom: 11px; }
.poafi-template-dialog .pt-basic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.poafi-template-dialog .pt-basic-grid label > span { display: inline; color: #c66e5e; }
.poafi-template-dialog .pt-batch { padding: 14px; border: 1px solid #e2f0e7; border-radius: 10px; background: #f7fcf9; }
.poafi-template-dialog .pt-batch p { margin: 4px 0 11px; color: #82978a; font-size: 11px; line-height: 1.5; }
.poafi-template-dialog .pt-batch-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.poafi-template-dialog .pt-batch-grid button { min-height: 40px; white-space: nowrap; }
.poafi-template-dialog .pt-number { position: relative; min-width: 0; }
.poafi-template-dialog .pt-number input { width: 100%; min-width: 0; min-height: 38px; padding-right: 29px; font-variant-numeric: tabular-nums; }
.poafi-template-dialog .pt-number > span { position: absolute; top: 50%; right: 11px; color: #91a49a; font-size: 12px; transform: translateY(-50%); pointer-events: none; }
.poafi-template-dialog .pt-inline-error { color: #b65549; font-size: 11px; }
.poafi-template-dialog .pt-inline-error:not(:empty) { margin-top: 9px; }
.poafi-template-dialog .pt-rate-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.poafi-template-dialog .pt-rate-toolbar > div > span { color: #98a89e; font-size: 10px; }
.poafi-template-dialog .pt-pair-search { display: block; width: min(240px, 48%); }
.poafi-template-dialog .pt-rate-hint { margin: 8px 0 11px; color: #83988c; font-size: 11px; line-height: 1.5; }
.poafi-template-dialog .pt-rates-scroll, .poafi-template-dialog .pt-authorization-scroll { max-height: min(31vh, 305px); overflow: auto; border: 1px solid #e8f0eb; border-radius: 9px; }
.poafi-template-dialog .pt-authorization-scroll .tablewrap { width: max-content; min-width: 100%; }
.poafi-template-dialog .pt-authorization-scroll table { white-space: normal; }
.poafi-template-dialog .pt-authorization-scroll td { white-space: normal; line-height: 1.75; }
.poafi-template-dialog .pt-rates { width: 100%; white-space: normal; table-layout: fixed; }
.poafi-template-dialog .pt-rates th { position: sticky; top: 0; z-index: 1; padding: 10px 12px; }
.poafi-template-dialog .pt-rates td { padding: 9px 12px; }
.poafi-template-dialog .pt-rates th:nth-child(1) { width: 22%; }
.poafi-template-dialog .pt-rates th:nth-child(2), .poafi-template-dialog .pt-rates th:nth-child(3) { width: 28%; }
.poafi-template-dialog .pt-rates th:nth-child(4) { width: 22%; }
.poafi-template-dialog .pt-rates [hidden], .poafi-template-dialog .pt-rates-scroll [hidden] { display: none !important; }
.poafi-template-dialog .pt-pair { color: #315a47; font-size: 12px; }
.poafi-template-dialog .pt-pair-sub { display: block; margin-top: 3px; color: #9aaba1; font-size: 10px; }
.poafi-template-dialog .pt-rate-count { padding-top: 7px; color: #9aaba1; font-size: 10px; text-align: right; }
.poafi-template-dialog .pt-switch-label { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; white-space: nowrap; }
.poafi-template-dialog .pt-switch-label input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
.poafi-template-dialog .pt-switch { position: relative; display: inline-block; width: 33px; height: 19px; flex: 0 0 33px; border-radius: 12px; background: #ccd9d1; transition: background-color .15s ease; }
.poafi-template-dialog .pt-switch::after { position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #59776b40; content: ""; transition: transform .15s ease; }
.poafi-template-dialog .pt-switch-label input:checked + .pt-switch { background: #3da879; }
.poafi-template-dialog .pt-switch-label input:checked + .pt-switch::after { transform: translateX(14px); }
.poafi-template-dialog .pt-switch-label input:focus-visible + .pt-switch { outline: 3px solid rgba(77, 174, 135, .35); outline-offset: 2px; }
.poafi-template-dialog .pt-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.poafi-template-dialog .pt-detail-head h3 { font-size: 16px; overflow-wrap: anywhere; }
.poafi-template-dialog .pt-detail-head p { margin: 4px 0 0; color: #91a198; font-size: 11px; }
.poafi-template-dialog .pt-detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 13px; border-radius: 9px; background: #f7fbf8; }
.poafi-template-dialog .pt-detail-meta span, .poafi-template-dialog .pt-detail-meta strong { display: block; overflow-wrap: anywhere; }
.poafi-template-dialog .pt-detail-meta span { margin-bottom: 3px; color: #90a298; font-size: 10px; }
.poafi-template-dialog .pt-detail-meta strong { color: #405d4e; font-size: 12px; font-weight: 600; }
.poafi-template-dialog .pt-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 1150px) {
  .poafi-template-page .pt-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .poafi-template-page .pt-filter-actions { grid-column: 1 / -1; }
  .poafi-template-page .pt-list-table th, .poafi-template-page .pt-list-table td { padding-left: 13px; padding-right: 13px; }
}
@media (max-width: 760px) {
  .poafi-template-page .pt-list-head { padding: 17px 16px 0; }
  .poafi-template-page .pt-filters { gap: 10px; padding: 15px 16px 3px; }
  .poafi-template-page .pt-filter-note { margin-left: 16px; margin-right: 16px; }
  .poafi-template-page .pt-filter-error { padding-left: 16px; padding-right: 16px; }
  .poafi-template-page .pt-list-scroll { max-height: 62vh; }
  .poafi-template-page .pt-list-table, .poafi-template-page .pt-list-table tbody, .poafi-template-page .pt-list-table tr, .poafi-template-page .pt-list-table td { display: block; width: 100%; }
  .poafi-template-page .pt-list-table thead { display: none; }
  .poafi-template-page .pt-list-table tr { padding: 12px 15px; border-bottom: 1px solid #edf3ef; }
  .poafi-template-page .pt-list-table tr:last-child { border-bottom: 0; }
  .poafi-template-page .pt-list-table td { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
  .poafi-template-page .pt-list-table td::before { flex: 0 0 62px; color: #93a49a; font-size: 11px; text-align: left; content: attr(data-label); }
  .poafi-template-page .pt-list-table td:first-child { align-items: center; padding-top: 1px; text-align: left; }
  .poafi-template-page .pt-list-table td:first-child::before { display: none; }
  .poafi-template-page .pt-list-table td.pt-empty::before { display: none; }
  .poafi-template-page .pt-list-table td.pt-empty { display: block; text-align: center; }
  .poafi-template-page .pt-list-table td .pt-sub { margin-left: auto; }
  .poafi-template-page .pt-actions { justify-content: flex-end; }
  .modal.poafi-template-dialog { max-height: calc(100vh - 24px); }
  .poafi-template-dialog .pt-basic-grid { grid-template-columns: 1fr; }
  .poafi-template-dialog .pt-batch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .poafi-template-dialog .pt-batch-grid button { grid-column: 1 / -1; }
  .poafi-template-dialog .pt-rates-scroll { max-height: min(40vh, 340px); }
  .poafi-template-dialog .pt-rates, .poafi-template-dialog .pt-rates tbody, .poafi-template-dialog .pt-rates tr, .poafi-template-dialog .pt-rates td { display: block; width: 100%; }
  .poafi-template-dialog .pt-rates thead { display: none; }
  .poafi-template-dialog .pt-rates tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px 10px; padding: 11px; border-bottom: 1px solid #edf3ef; }
  .poafi-template-dialog .pt-rates tr:last-child { border-bottom: 0; }
  .poafi-template-dialog .pt-rates td { padding: 0; border: 0; }
  .poafi-template-dialog .pt-rates td:first-child, .poafi-template-dialog .pt-rates td:last-child { grid-column: 1 / -1; }
  .poafi-template-dialog .pt-rates td:not(:first-child)::before { display: block; margin-bottom: 4px; color: #91a49a; font-size: 10px; content: attr(data-label); }
  .poafi-template-dialog .pt-rates td:last-child { display: flex; align-items: center; justify-content: space-between; }
  .poafi-template-dialog .pt-rates td:last-child::before { margin-bottom: 0; }
}
@media (max-width: 400px) {
  .poafi-template-page .pt-filters { grid-template-columns: 1fr; }
  .poafi-template-page .pt-filter-actions { grid-column: auto; }
  .poafi-template-dialog .pt-detail-meta { grid-template-columns: 1fr; }
  .poafi-template-dialog .pt-rate-toolbar { align-items: stretch; flex-direction: column; }
  .poafi-template-dialog .pt-pair-search { width: 100%; }
}

/* 机构服务费逐币种配置 */
/* 服务费管理 UI。追加到现有 design.css 后；所有样式限定在当前页面。 */
.poafi-fee-page { display: grid; gap: 15px; min-width: 0; }
.poafi-fee-page .pf-business-tabs { margin: 0 0 2px; }
.poafi-fee-page .pf-business-tabs button { flex-shrink: 0; }
.poafi-fee-page .pf-intro { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px 17px; border: 1px solid #d9eee2; border-radius: 11px; background: #eef9f2; color: #517665; }
.poafi-fee-page .pf-intro-icon { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; background: #dcf3e5; color: #218262; font-size: 21px; }
.poafi-fee-page .pf-intro strong, .poafi-fee-page .pf-intro div > span { display: block; }
.poafi-fee-page .pf-intro strong { color: #1e644d; font-size: 12px; }
.poafi-fee-page .pf-intro div > span { margin-top: 2px; font-size: 11px; line-height: 1.6; }
.poafi-fee-page .pf-notice { padding: 10px 14px; border: 1px solid #dbeee4; border-radius: 9px; background: #f5fbf7; color: #658275; font-size: 11px; line-height: 1.65; }
.poafi-fee-page .pf-notice.is-warning { border-color: #f3e7ce; background: #fffbf3; color: #977b50; }
.poafi-fee-page .pf-editor { min-width: 0; overflow: hidden; }
.poafi-fee-page .pf-editor-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 21px 22px 15px; }
.poafi-fee-page .pf-editor-head h2, .poafi-fee-page h3 { margin: 0; }
.poafi-fee-page .pf-editor-head p { margin: 4px 0 0; color: #8b9d92; font-size: 11px; line-height: 1.6; }
.poafi-fee-page .pf-count { flex-shrink: 0; padding: 4px 9px; border-radius: 7px; background: #f1f8f4; color: #628877; font-size: 11px; }
.poafi-fee-page .pf-scope { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(190px, 1fr) minmax(180px, 1fr); align-items: end; gap: 16px; padding: 0 22px 20px; border-bottom: 1px solid #edf3ef; }
.poafi-fee-page .pf-label, .poafi-fee-page .pf-scope-select, .poafi-fee-page .pf-batch-actions > label { display: block; color: #61796c; font-size: 11px; font-weight: 500; }
.poafi-fee-page .pf-owner-options { display: inline-flex; max-width: 100%; margin-top: 6px; padding: 3px; border: 1px solid #e4eee8; border-radius: 9px; background: #f7fbf8; }
.poafi-fee-page .pf-owner-options button { min-height: 33px; padding: 5px 13px; border: 1px solid transparent; background: transparent; color: #789084; font-size: 11px; white-space: nowrap; box-shadow: none; }
.poafi-fee-page .pf-owner-options button.is-selected { border-color: #d6e9dd; background: #fff; color: #176a50; box-shadow: 0 1px 3px rgba(25, 75, 53, .05); font-weight: 700; }
.poafi-fee-page .pf-scope-select { min-width: 0; }
.poafi-fee-page .pf-scope-select select { display: block; width: 100%; max-width: 100%; margin-top: 6px; }
.poafi-fee-page .pf-scope-note { min-width: 0; padding: 2px 0; }
.poafi-fee-page .pf-scope-note span, .poafi-fee-page .pf-scope-note strong, .poafi-fee-page .pf-scope-note small { display: block; overflow-wrap: anywhere; }
.poafi-fee-page .pf-scope-note span, .poafi-fee-page .pf-scope-note small { color: #92a49a; font-size: 10px; }
.poafi-fee-page .pf-scope-note strong { margin: 2px 0; color: #345849; font-size: 12px; }
.poafi-fee-page .pf-editor-body { display: grid; gap: 14px; min-width: 0; padding: 18px 22px 20px; }
.poafi-fee-page .pf-batch { display: flex; justify-content: space-between; align-items: end; gap: 18px; padding: 14px; border: 1px solid #e2f0e7; border-radius: 10px; background: #f7fcf9; }
.poafi-fee-page .pf-batch-copy { min-width: 0; }
.poafi-fee-page .pf-batch p { margin: 4px 0 0; color: #82978a; font-size: 11px; line-height: 1.55; }
.poafi-fee-page .pf-batch-actions { flex: 0 1 275px; min-width: 0; }
.poafi-fee-page .pf-batch-controls { display: flex; gap: 8px; margin-top: 5px; }
.poafi-fee-page .pf-batch-controls .pf-number { flex: 1 1 auto; }
.poafi-fee-page .pf-batch-controls button { flex: 0 0 auto; white-space: nowrap; }
.poafi-fee-page .pf-number { position: relative; min-width: 0; }
.poafi-fee-page .pf-number input { width: 100%; min-width: 0; min-height: 38px; padding-right: 31px; font-variant-numeric: tabular-nums; }
.poafi-fee-page .pf-number > span { position: absolute; top: 50%; right: 11px; color: #91a49a; font-size: 12px; transform: translateY(-50%); pointer-events: none; }
.poafi-fee-page .pf-detail-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.poafi-fee-page .pf-detail-head p { margin: 4px 0 0; color: #83988c; font-size: 11px; line-height: 1.55; }
.poafi-fee-page .pf-detail-head > span { flex-shrink: 0; color: #9aaba1; font-size: 10px; }
.poafi-fee-page .pf-column-head, .poafi-fee-page .pf-rate-row { display: grid; grid-template-columns: minmax(120px, .9fr) minmax(150px, 1.1fr) minmax(135px, 1fr) minmax(82px, .6fr); gap: 8px 14px; align-items: center; }
.poafi-fee-page .pf-column-head { margin-bottom: -14px; padding: 11px 14px; border: 1px solid #e8f0eb; border-bottom: 0; border-radius: 9px 9px 0 0; background: #f8fbf9; color: #758a7d; font-size: 11px; }
.poafi-fee-page .pf-rate-scroll { max-height: min(56vh, 520px); overflow-y: auto; overflow-x: hidden; border: 1px solid #e8f0eb; border-top: 0; border-radius: 0 0 9px 9px; overscroll-behavior: contain; }
.poafi-fee-page .pf-rate-row { padding: 12px 14px; border-bottom: 1px solid #edf3ef; }
.poafi-fee-page .pf-rate-row:last-child { border-bottom: 0; }
.poafi-fee-page .pf-coin { display: flex; align-items: center; gap: 9px; min-width: 0; }
.poafi-fee-page .pf-coin-icon { display: grid; place-items: center; flex: 0 0 33px; width: 33px; height: 33px; border-radius: 9px; background: #e6f7ed; color: #218567; font-size: 13px; font-weight: 700; }
.poafi-fee-page .pf-coin strong { display: block; color: #315a47; font-size: 12px; line-height: 1.4; }
.poafi-fee-page .pf-status { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; color: #85988d; font-size: 10px; line-height: 1.25; }
.poafi-fee-page .pf-status::before { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; content: ""; }
.poafi-fee-page .pf-status.is-live { color: #27825d; }
.poafi-fee-page .pf-status.is-stopped { color: #a86b60; }
.poafi-fee-page .pf-base { min-width: 0; color: #5c7367; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.poafi-fee-page .pf-mobile-label { display: none; }
.poafi-fee-page .pf-rate-field { min-width: 0; }
.poafi-fee-page .pf-rate-field > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.poafi-fee-page .pf-switch-label { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; cursor: pointer; white-space: nowrap; color: #61796c; font-size: 11px; }
.poafi-fee-page .pf-switch-label input { position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; opacity: 0; }
.poafi-fee-page .pf-switch { position: relative; display: inline-block; width: 33px; height: 19px; flex: 0 0 33px; border-radius: 12px; background: #ccd9d1; transition: background-color .15s ease; }
.poafi-fee-page .pf-switch::after { position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #59776b40; content: ""; transition: transform .15s ease; }
.poafi-fee-page .pf-switch-label input:checked + .pf-switch { background: #3da879; }
.poafi-fee-page .pf-switch-label input:checked + .pf-switch::after { transform: translateX(14px); }
.poafi-fee-page .pf-switch-label input:focus-visible + .pf-switch { outline: 3px solid rgba(77, 174, 135, .35); outline-offset: 2px; }
.poafi-fee-page .pf-switch-label input:disabled + .pf-switch, .poafi-fee-page .pf-switch-label input:disabled ~ span { opacity: .5; }
.poafi-fee-page .pf-rule-detail { grid-column: 1 / -1; margin-top: -3px; padding-left: 42px; color: #94a69b; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.poafi-fee-page .pf-rule-detail.is-legacy { color: #a57c50; }
.poafi-fee-page .pf-save-error { color: #b65549; font-size: 11px; line-height: 1.5; }
.poafi-fee-page .pf-save-error:empty { display: none; }
.poafi-fee-page .pf-editor-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 15px 22px; border-top: 1px solid #edf3ef; background: #fbfdfc; }
.poafi-fee-page .pf-editor-footer p { margin: 0; color: #92a49a; font-size: 10px; line-height: 1.65; }
.poafi-fee-page .pf-editor-footer strong { color: #648273; font-size: 11px; }
.poafi-fee-page .pf-editor-footer button { flex: 0 0 auto; }
.poafi-fee-page .pf-account { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; border: 1px solid #e4ece7; border-radius: 10px; background: #fff; }
.poafi-fee-page .pf-account strong, .poafi-fee-page .pf-account span { display: block; }
.poafi-fee-page .pf-account strong { color: #345849; font-size: 12px; }
.poafi-fee-page .pf-account span { margin-top: 2px; color: #91a299; font-size: 11px; }
.poafi-fee-page .pf-account button { flex-shrink: 0; }
@media (max-width: 900px) {
  .poafi-fee-page .pf-scope { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .poafi-fee-page .pf-scope-note { grid-column: 1 / -1; padding: 0; }
  .poafi-fee-page .pf-scope-note span, .poafi-fee-page .pf-scope-note strong, .poafi-fee-page .pf-scope-note small { display: inline; margin-right: 8px; }
}
@media (max-width: 760px) {
  .poafi-fee-page { gap: 12px; }
  .poafi-fee-page .pf-editor-head { padding: 17px 16px 14px; }
  .poafi-fee-page .pf-scope { gap: 12px; padding: 0 16px 16px; }
  .poafi-fee-page .pf-editor-body { gap: 12px; padding: 15px 16px 16px; }
  .poafi-fee-page .pf-batch { align-items: stretch; flex-direction: column; gap: 10px; }
  .poafi-fee-page .pf-batch-actions { flex: auto; }
  .poafi-fee-page .pf-column-head { display: none; }
  .poafi-fee-page .pf-rate-scroll { max-height: min(58vh, 500px); border-top: 1px solid #e8f0eb; border-radius: 9px; }
  .poafi-fee-page .pf-rate-row { grid-template-columns: minmax(0, 1fr) auto; gap: 9px 12px; padding: 12px; }
  .poafi-fee-page .pf-coin { grid-column: 1; }
  .poafi-fee-page .pf-base { grid-column: 1 / -1; grid-row: 2; }
  .poafi-fee-page .pf-mobile-label { display: inline; margin-right: 8px; color: #97a89e; }
  .poafi-fee-page .pf-rate-field { grid-column: 1; grid-row: 3; }
  .poafi-fee-page .pf-rate-field > label { position: static; display: block; width: auto; height: auto; margin-bottom: 4px; clip: auto; overflow: visible; color: #91a49a; font-size: 10px; }
  .poafi-fee-page .pf-enabled { grid-column: 2; grid-row: 3; align-self: end; }
  .poafi-fee-page .pf-rule-detail { grid-column: 1 / -1; margin: -3px 0 0; padding: 0; }
  .poafi-fee-page .pf-editor-footer { padding: 13px 16px; }
}
@media (max-width: 420px) {
  .poafi-fee-page .pf-scope { grid-template-columns: minmax(0, 1fr); }
  .poafi-fee-page .pf-scope-note { grid-column: auto; }
  .poafi-fee-page .pf-detail-head > span { display: none; }
  .poafi-fee-page .pf-account { align-items: flex-start; flex-direction: column; gap: 6px; }
  .poafi-fee-page .pf-editor-footer { align-items: stretch; flex-direction: column; }
  .poafi-fee-page .pf-editor-footer button { width: 100%; }
}
