.staff-body{background:var(--canvas)}
.staff-app{max-width:1000px;margin:auto;padding:20px 22px 70px}
.staff-top{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:22px;flex-wrap:wrap}
.staff-brand{display:flex;align-items:center;gap:12px;color:inherit;text-decoration:none}
.staff-brand h1{font-size:24px}
.staff-user{display:flex;align-items:center;gap:9px;background:#fff;border:1px solid var(--line);border-radius:999px;padding:5px 7px 5px 5px}
.staff-user-text{display:grid;line-height:1.2}
.staff-user-text strong{font-size:14px}
.staff-user-text small{font-size:12px;color:var(--muted)}
.avatar{width:34px;height:34px;border-radius:50%;background:#182b64;color:#fff;display:grid;place-items:center;font-weight:750;font-size:14px;flex:none}
.avatar.large{width:54px;height:54px;font-size:19px;border-radius:16px}
.secondary.small{padding:5px 9px;min-height:30px;font-size:12px}
.primary.compact{width:auto;margin:0;padding:10px 18px;min-height:42px;font-size:15px}

.login-wrap{display:grid;grid-template-columns:minmax(0,1fr);place-items:center;min-height:calc(100vh - 150px);padding:10px 0 30px}
.login-card{width:min(100%,430px);background:#fff;border:1px solid var(--line);border-radius:22px;padding:28px 24px 22px;box-shadow:0 18px 50px #1a2d5c12}
.login-head{text-align:center;margin-bottom:20px}
.login-head .eyebrow{color:#4864a8;letter-spacing:.14em;font-size:11px}
.login-head h2{font-size:28px;margin:5px 0 6px}
.login-head p:last-child{font-size:14px;color:var(--muted);line-height:1.6}
.lock{display:block;width:52px;height:52px;margin:0 auto 13px;border-radius:16px;background:linear-gradient(140deg,#182b64,#2c53c4);position:relative;box-shadow:0 8px 20px #1b3c8a33}
.lock:before{content:"";position:absolute;left:15px;top:12px;width:22px;height:17px;border:2px solid #d9e4ff;border-bottom:0;border-radius:11px 11px 0 0}
.lock:after{content:"";position:absolute;left:12px;top:23px;width:28px;height:20px;background:#d9e4ff;border-radius:5px}
.sfield{display:grid;gap:6px;margin-bottom:13px}
.sfield>span{font-size:13px;color:#3d4f70;font-weight:650}
.sfield input,.sfield select,.sfield textarea{width:100%;border:1px solid #cbd6ed;border-radius:9px;background:#fff;color:var(--ink);padding:10px 11px;font-size:15px;min-height:44px;min-width:0}
.sfield textarea{resize:vertical;line-height:1.6}
.sfield input:focus,.sfield select:focus,.sfield textarea:focus{outline:3px solid #c7d3ff;outline-offset:1px;border-color:#7c95e8}
.code-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.code-row button{white-space:nowrap;min-height:44px;padding-inline:12px}
.login-submit{width:100%;margin:6px 0 0;min-height:48px}
.login-foot{font-size:12px;color:var(--muted);text-align:center;line-height:1.6;margin-top:15px}
.form-error{color:#a31c35;font-size:13px;margin:2px 0 8px;line-height:1.5}

.profile-card{display:flex;align-items:center;gap:15px;background:linear-gradient(118deg,#132656 10%,#203d99 82%);color:#fff;border-radius:19px;padding:18px 19px;margin-bottom:18px}
.profile-main{flex:1;min-width:0}
.profile-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.profile-title h2{font-size:22px}
.profile-main p{font-size:13px;color:#dce5ff;margin-top:3px}
.profile-main .profile-session{color:#aebfe8;font-size:12px}
.badge{font-size:11px;background:#c4f598;color:#1d3d18;border-radius:999px;padding:3px 8px;font-weight:750}
.profile-side{text-align:right;border-left:1px solid #aabbff55;padding-left:16px;display:grid;gap:3px}
.profile-side span{font-size:12px;color:#c5d2f0}
.profile-side strong{font-size:20px}

.staff-tabs{display:flex;gap:6px;background:#e8edf6;padding:4px;border-radius:12px;margin-bottom:17px;max-width:460px}
.staff-tabs button{flex:1;border:0;background:transparent;border-radius:9px;padding:10px 4px;font-size:14px;font-weight:700;color:var(--muted)}
.staff-tabs button[aria-current=page]{background:#fff;color:#1b3fa6;box-shadow:0 1px 4px #1a36641a}

.section-bar{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:2px 0 13px}
.section-bar h2{font-size:23px}
.section-bar p{font-size:13px;color:var(--muted);margin-top:4px;line-height:1.5}
.search{display:block;margin-bottom:13px}
.search input{width:100%;border:1px solid #d7e0ef;border-radius:10px;padding:10px 12px;background:#fff;font-size:14px}

.record-grid{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}
.record-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:14px 15px;min-width:0;display:flex;flex-direction:column;gap:9px}
.record-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.record-head h3{font-size:17px;line-height:1.35}
.chip{display:inline-block;font-size:11px;background:#edf2fb;color:#31508f;border-radius:6px;padding:3px 7px;white-space:nowrap}
.chip.green{background:#e9f8e3;color:#2d5c22}
.chip.amber{background:#fff3d9;color:#7a5310}
.record-amount{font-size:22px;font-weight:780;color:#173ba6;line-height:1.2}
.record-amount small{font-size:12px;color:var(--muted);font-weight:600;margin-left:3px}
.record-meta{font-size:13px;color:var(--muted);line-height:1.6}
.record-notes{font-size:13px;color:#40506b;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}
.record-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:auto;padding-top:3px}
.link-button{border:0;background:transparent;color:#2149bb;font-size:13px;font-weight:700;padding:5px 0;text-align:left;text-decoration:underline;text-underline-offset:3px}
.record-empty{grid-column:1/-1;background:#fff;border:1px dashed #cbd6e8;border-radius:14px;padding:34px 18px;text-align:center;color:var(--muted);font-size:14px}

.staff-add{margin-bottom:15px;padding:16px}
.staff-add h3{font-size:17px;margin-bottom:12px}
.staff-add .grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.staff-grid .record-card{padding:13px 14px}
.staff-line{display:flex;justify-content:space-between;gap:10px;align-items:center}
.staff-line strong{font-size:16px}
.status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#3a9b4a;margin-right:5px}
.status-dot.off{background:#a9b3c6}
.muted{color:var(--muted)}

dialog{background:#fff;color:var(--ink);width:min(96vw,720px);max-height:92vh;overflow:auto;border:0;border-radius:18px;padding:16px 18px 14px;box-shadow:0 20px 70px #101d3f66}
dialog::backdrop{background:#0e1930b8}
.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.dialog-head h2{font-size:20px}
.form-body{padding:0;background:#fff}
.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:0 12px}
.tier-rows{display:grid;gap:7px;margin-bottom:8px}
.tier-row{display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:6px;align-items:center}
.tier-row input{min-height:38px;padding:7px 8px;font-size:13px}
.tier-row button{border:0;background:#f1e9ec;color:#982d40;border-radius:7px;min-height:38px;padding:0 9px;font-size:12px}
.current-file{font-size:12px;color:var(--muted);background:#f4f7fc;border-radius:8px;padding:8px 9px;margin:-3px 0 10px;overflow-wrap:anywhere}
.template-body{background:#f4f6fb;border-radius:10px;padding:12px}
.template-body pre{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-family:"SFMono-Regular",Consolas,"Microsoft YaHei",monospace;font-size:13px;line-height:1.7;color:#1f2d45}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:#17243a;color:#fff;padding:10px 16px;border-radius:10px;font-size:14px;z-index:20;box-shadow:0 8px 24px #0d193266;max-width:calc(100vw - 32px);text-align:center}

@media(min-width:720px){.staff-app{padding-top:30px}.login-wrap{min-height:calc(100vh - 190px)}}
@media(max-width:719px){
  .staff-app{padding:15px 13px 50px}
  .staff-top{margin-bottom:15px;gap:10px}
  .staff-brand h1{font-size:21px}
  .staff-user-text{display:none}
  .record-grid{grid-template-columns:1fr}
  .staff-add .grid-2,.grid-2{grid-template-columns:1fr}
  .profile-card{align-items:flex-start;padding:15px}
  .profile-side{display:none}
  .profile-title h2{font-size:20px}
  .staff-tabs{max-width:none}
  .section-bar h2{font-size:21px}
  .section-bar p{max-width:230px}
  .tier-row{grid-template-columns:1fr 1fr;grid-auto-rows:auto}
  .tier-row button{justify-self:start}
  dialog{padding:14px 14px 12px;max-height:94vh}
}
