:root {
  color-scheme: light;
  --bg: #f3f0e9;
  --panel: #fffdf9;
  --line: #d4ccbd;
  --muted: #766f63;
  --text: #25282e;
  --blue: #9a6a1b;
  --green: #238565;
  --red: #c64a51;
  --amber: #9a6a1b;
}
body { font-family: "IBM Plex Sans", "Microsoft YaHei UI", sans-serif; }
.login { background: radial-gradient(circle at 50% 15%, #fffdf7 0, #f2efe7 58%, #e6dfd0 100%); }
.login-card { background: var(--panel); border-radius: 5px; border-top: 4px solid var(--blue); box-shadow: 0 24px 65px #55472a2d; }
.brand span { border-radius: 3px; background: var(--blue); color: #fff; }
input, select, textarea { background: #fbfaf6; border-radius: 3px; }
button { border-radius: 3px; }
aside { background: #ebe6dc; }
nav button { color: #655f55; }
nav button.active { background: #fffaf0; color: #704b12; border-left-color: var(--blue); }
.ghost, .secondary { color: #554f46; }
.stats article, .panel { border-radius: 4px; }
.warning { border-color: #c9ad74; background: #fbf5e8; }
.tag { background: #e8e0d2; color: #594d39; }
#toast { background: #238565; }
#toast.error { background: #a7353f; }

/* Business-first admin layout; no trading or monetary values are recomputed. */
body { line-height: 1.5; font-size: 14px; }
.app { grid-template-columns: 208px minmax(0,1fr); }
main { padding: 28px; max-width: 1800px; width: 100%; }
aside { padding: 24px 12px; background: #eeebe4; }
aside .brand { padding: 0 8px 32px; }
nav { gap: 8px; }
nav button { padding: 12px 14px; border-left: 3px solid transparent; border-radius: 6px; }
header { border-bottom: 1px solid var(--line); padding-bottom: 20px; gap: 16px; }
header h1 { font-size: 25px; letter-spacing: .02em; }
header p { font-size: 13px; }
label { color: #56534c; margin: 12px 0; font-size: 13px; }
input,select,textarea { color: var(--text); background: #fffefa; border: 1px solid var(--line); min-height: 38px; padding: 8px 10px; max-width: 100%; }
input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible,summary:focus-visible { outline: 2px solid #ae8840; outline-offset: 2px; }
button { padding: 9px 14px; }
button:disabled { opacity: .4; cursor: default; }
.panel { padding: 20px; border-radius: 8px; margin-bottom: 18px; box-shadow: 0 2px 5px #443a2410; min-width: 0; }
.panel h2 { font-size: 16px; margin-bottom: 12px; }
.hint { font-size: 12px; line-height: 1.7; margin: 8px 0 14px; max-width: 900px; }
.grid2 { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
.stats { grid-template-columns: repeat(5,minmax(0,1fr)); }
.stats article { padding: 18px; border-radius: 8px; }
.stats span { font-size: 12px; margin-bottom: 6px; }
.stats strong { font-size: 26px; }
.section-tabs { display: flex; gap: 6px; padding-bottom: 16px; }
.section-tabs button { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.section-tabs button.active { background: #8f6b27; border-color: #8f6b27; color: white; }
.form-fold { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 16px; min-width: 0; }
.form-fold > summary { padding: 14px 18px; font-weight: 600; color: #805c20; cursor: pointer; }
.form-fold form { border: 0; box-shadow: none; margin: 0; border-top: 1px solid var(--line); }
.form-fold form > h2 { display: none; }
#accounts .form-fold form { max-width: 760px; }
.workflow-grid { grid-template-columns: minmax(0,760px) minmax(220px,1fr); }
.help-fold { padding: 16px; background: #f7f0df; border: 1px solid #d8c79d; border-radius: 8px; font-size: 13px; }
.help-fold summary { cursor: pointer; color: #805c20; font-weight: 600; }
.help-fold h2 { display: none; }
#risk-form,#cash-movement-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 18px; }
#risk-form > h2,#cash-movement-form > h2,#risk-form > button,#cash-movement-form > button,#cash-movement-form > p { grid-column: 1 / -1; }
form > button { justify-self: start; margin-top: 8px; }
#risk-form > label,#cash-movement-form > label { align-content: start; }
.table-scroll { max-height: 590px; }
.table-scroll th { position: sticky; top: 0; z-index: 1; }
fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 10px; }
legend { color: var(--muted); font-size: 13px; }
#group-members { max-height: 260px; overflow-y: auto; }
label.check { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px; border-bottom: 1px solid #e9e5dc; }
input[type=checkbox] { width: 17px; height: 17px; min-height: 0; flex: 0 0 17px; accent-color: #946e27; }
.check small { display: block; color: var(--muted); }
.table-scroll { overflow: auto; max-width: 100%; border: 1px solid #e5dfd3; border-radius: 5px; scrollbar-gutter: stable; }
.table-scroll table { width: max-content; min-width: 100%; table-layout: auto; font-size: 13px; }
th,td { border-bottom: 1px solid #e8e2d8; padding: 11px 12px; color: var(--text); vertical-align: middle; white-space: nowrap; overflow-wrap: normal; min-width: 84px; }
th { background: #f3f0e8; color: #766e5f; font-size: 12px; white-space: nowrap; }
th[data-column="时间"],td[data-column="时间"] { min-width: 154px; }
th[data-column="用户/账户"],td[data-column="用户/账户"],th[data-column="用户 / 账户"],td[data-column="用户 / 账户"] { min-width: 230px; }
th[data-column="参数"],td[data-column="参数"] { min-width: 190px; }
th[data-column="原因"],td[data-column="原因"] { width: 300px; min-width: 240px; max-width: 340px; white-space: normal; line-height: 1.6; overflow-wrap: break-word; }
th[data-column="操作"],td[data-column="操作"] { min-width: 110px; }
th[data-column="任务"],td[data-column="任务"],th[data-column="订单"],td[data-column="订单"] { min-width: 100px; }
td[data-column="方向"],td[data-column="手数"],td[data-column="成交价"],td[data-column="状态"] { text-align: right; }
tbody tr:hover { background: #faf7ef; }
td button { font-size: 12px; padding: 6px 10px; white-space: nowrap; }
td select { min-width: 124px; font-size: 12px; }
td code { color: #756b58; font-family: ui-monospace,monospace; font-size: 11px; display: block; word-break: break-all; }
.identifier { min-width: 72px; max-width: 220px; }
.identifier summary { color: #927444; cursor: pointer; font-size: 11px; white-space: nowrap; }
.identifier[open] { min-width: 170px; }
pre { max-width: 440px; max-height: 320px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: #f4f1ea; padding: 12px; font-size: 12px; }
.member-name { display: block; margin-bottom: 5px; }
.list-toolbar { display: flex; align-items: center; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.list-toolbar input { width: 250px; max-width: 100%; font-size: 12px; }
.list-toolbar span { margin-left: auto; font-size: 12px; color: var(--muted); }
.list-toolbar button { background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 12px; padding: 6px 9px; }
.tag.approved,.tag.succeeded,.tag.filled { background: #e1efe6; color: #26714e; }
.tag.pending,.tag.close_only { background: #f5eacb; color: #8c661d; }
.tag.rejected,.tag.failed,.tag.partially_failed,.tag.frozen { background: #f8e3e1; color: #a24440; }
.positive { color: #267b5c; }.negative { color: #ba4647; }
.empty { padding: 24px; background: #faf8f3; border: 1px dashed var(--line); border-radius: 6px; margin: 12px 0; font-size: 13px; }
.brand span img,.site-logo-preview img{width:100%;height:100%;object-fit:contain}.site-logo-preview{display:flex;align-items:center;gap:14px;padding:14px;border:1px solid var(--line);background:#faf8f3;border-radius:6px}.site-logo-preview>span{width:54px;height:54px;display:grid;place-items:center;flex:0 0 54px;background:#946e27;color:#fff;font-weight:700;border-radius:6px;overflow:hidden}.site-logo-preview small{display:block;color:var(--muted);margin-top:4px}
[hidden] { display: none !important; }
@media(max-width:1100px){.app{grid-template-columns:176px minmax(0,1fr)}main{padding:20px}.workflow-grid{grid-template-columns:1fr}.stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){aside .brand b,nav button{font-size:13px}nav button:before{content:none}.aside-foot small{display:block}.grid2{grid-template-columns:1fr}main{overflow:visible}.app{grid-template-columns:160px minmax(0,1fr)}}
@media(max-width:650px){.app{display:block}aside{position:relative;height:auto;border-right:0;border-bottom:1px solid var(--line);padding:12px}aside .brand{padding:0 0 10px}nav{display:flex;overflow:auto}nav button{flex:0 0 auto}.aside-foot{display:none}header{align-items:flex-start}header h1{font-size:21px}main{padding:14px}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}#risk-form,#cash-movement-form{display:block}.list-toolbar input{width:100%}.list-toolbar span{margin-left:0}.panel-head{gap:8px;flex-wrap:wrap}}
