/* Shared by the ledger in OA and the standalone local account picker. */
.sp-pay-status,.sp-evidence { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.sp-pay-status { margin:13px 0; color:#405673; }
.sp-pay-status b { color:#153d74; }
.sp-payment .sp-form { margin-bottom:16px; }
.sp-evidence { justify-content:flex-end; }
.sp-file { position:relative; display:inline-block; color:#1857a5; border:1px solid #a9c2e1; padding:3px 10px; border-radius:5px; cursor:pointer; }
.sp-file:focus-within { outline:2px solid #1668dc; }
.sp-file input { position:absolute; opacity:0; inset:0; width:100%; cursor:pointer; }
.sp-contracts { display:flex; gap:6px; flex-wrap:wrap; margin:0 0 12px; }
.sp-contracts a { padding:6px 12px; border:1px solid #c7d6e8; border-radius:7px; background:white; color:#264b78; font-size:13px; }
.sp-contracts a[aria-current="page"] { color:white; background:#1558b4; border-color:#1558b4; font-weight:600; }
.sp-contracts a:hover { text-decoration:underline; }
.sp-form input[name="reference"] { max-width:280px; }
.sp-wrap, .sp-picker {
  --sp-navy: var(--navy, #0b1c3d);
  --sp-blue: var(--accent, #1668dc);
  --sp-soft: var(--accent-soft, #e8f1fe);
  --sp-ink: var(--text, #1a2233);
  --sp-muted: #53647d;
  --sp-line: #dce4ef;
  --sp-paper: #fff;
  --sp-wash: #f5f8fc;
  --sp-radius: 12px;
  font-family: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--sp-ink);
}
.sp-wrap *, .sp-picker * { box-sizing: border-box; }
.sp-wrap { max-width: 1200px; min-width: 0; margin: 0 auto 40px; }
.sp-hero, .sp-panel { border: 1px solid var(--sp-line); border-radius: var(--sp-radius); }
.sp-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 24px 28px; color: #fff; border-color: #183764;
  background: linear-gradient(110deg, var(--sp-navy) 0%, #153c74 68%, #20548c 100%);
}
.sp-hero h1 { margin: 5px 0 6px; color: inherit; font-size: clamp(24px,3vw,34px); line-height: 1.18; letter-spacing: .025em; }
.sp-hero p { margin: 0; }
.sp-kicker { color: #d2e3fb; font-size: 13px; font-weight: 600; }
.sp-ident { display: flex; flex-wrap: wrap; gap: 3px 16px; color: #e6effb; font-size: 13px; }
.sp-ident span { white-space: nowrap; }
.sp-status { display: grid; justify-items: end; gap: 8px; white-space: nowrap; }
.sp-status strong { color: #edf4ff; font-size: 13px; }
.sp-status span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 5px; font-size: 12px; font-weight: 600; }
.sp-status span::before { content: ""; width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.sp-verified { color: #184782; background: #e4efff; }
.sp-pending { color: #774100; background: #ffedcc; }
.sp-meta, .sp-note { margin: 10px 0 14px; color: var(--sp-muted); font-size: 13px; line-height: 1.65; }
.sp-note:last-child { margin-bottom: 0; }
.sp-panel { margin: 0 0 16px; padding: 20px 24px; background: var(--sp-paper); box-shadow: 0 2px 6px rgb(11 28 61 / 4%); }
.sp-subhead h2 { margin: 0 0 15px; color: var(--sp-navy); font-size: 18px; line-height: 1.4; }
.sp-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.sp-metric { display: grid; align-content: center; gap: 7px; min-width: 0; padding: 17px 18px; border: 1px solid var(--sp-line); border-radius: 9px; background: var(--sp-wash); }
.sp-metric span { font-size: 13px; color: var(--sp-muted); }
.sp-metric strong { font: 650 clamp(21px,2.6vw,34px)/1.12 "Segoe UI","Microsoft YaHei UI",sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.035em; color: var(--sp-navy); overflow-wrap: anywhere; }
.sp-primary { border-color: #bed4f3; background: var(--sp-soft); }
.sp-primary span { color: #264f87; font-weight: 600; }
.sp-primary strong { color: #1257bb; }
.sp-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--sp-line); border-radius: 8px; }
.sp-table { width: 100%; min-width: 470px; border-spacing: 0; border-collapse: separate; }
.sp-table th, .sp-table td { padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--sp-paper); color: var(--text); text-align: right; font-size: 13px; vertical-align: middle; white-space: nowrap; }
.sp-table thead th { background: var(--thead); color: var(--muted); font-size: 12px; font-weight: 500; }
.sp-table th:first-child, .sp-table td:first-child { text-align: left; }
.sp-table tbody th { font-weight: 500; }
.sp-table tbody tr:last-child > * { border-bottom: 0; }
.sp-table tbody tr:hover > * { background: #f3f7fd; }
.sp-table .sp-total > * { color: #174b94; background: #f1f6ff; font-weight: 650; }
.sp-form { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; margin: 18px 0 4px; }
.sp-form label { display: grid; gap: 5px; font-size: 13px; font-weight: 550; color: #374b65; }
.sp-form input, .sp-form select { margin: 0; padding: 8px 10px; width: 100%; max-width: 185px; min-height: 40px; background: #fff; color: var(--sp-ink); border: 1px solid #aebed2; border-radius: 6px; font-family: inherit; font-variant-numeric: tabular-nums; }
.sp-form input:disabled { color: #7e899a; background: #f2f4f7; }
.sp-form .sp-button { padding: 8px 18px; min-height: 40px; border: 1px solid var(--sp-blue); border-radius: 7px; background: var(--sp-blue); color: #fff; font-weight: 600; cursor: pointer; }
.sp-form .sp-button:hover { background: #1156b8; }
.sp-form .sp-button:disabled { opacity: .65; cursor: wait; }
.sp-form .sp-error { width: 100%; color: #a52625; margin: 0; }
.sp-error:empty { display: none; }
.sp-details { margin-top: 16px; }
.sp-details summary { cursor: pointer; color: #164f9a; font-size: 14px; font-weight: 550; }
.sp-days { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit,minmax(90px,1fr)); gap: 7px; }
.sp-day { display: flex; flex-direction: column; padding: 8px 9px; min-height: 68px; border: 1px solid var(--sp-line); border-radius: 6px; font-size: 12px; }
.sp-day b { font-size: 14px; }
.sp-own { color: #204c84; background: #eaf2ff; border-left: 3px solid #4785d8; }
.sp-shared { color: #25497a; background: #f4f8ff; border: 1px dashed #8caed7; }
.sp-other { color: #465775; background: #edf1f7; }
.sp-idle { color: #5e6a78; background: #fafbfc; }
.sp-checks { margin: 0; padding-left: 1.3em; font-size: 14px; line-height: 1.85; }
.sp-wrap :focus-visible, .sp-picker :focus-visible { outline: 2px solid var(--sp-blue); outline-offset: 3px; }

.sp-picker { box-sizing: border-box; min-height: 100vh; margin: 0; display: grid; place-items: center; padding: 28px; background: #f1f4f9; }
.sp-picker main { width: min(100%,880px); display: grid; grid-template-columns: minmax(230px,.78fr) minmax(0,1.22fr); border: 1px solid var(--sp-line); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 12px 42px rgb(11 28 61 / 9%); }
.sp-picker header { display: flex; flex-direction: column; justify-content: space-between; align-items: start; gap: 42px; padding: 32px; background: linear-gradient(155deg,var(--sp-navy),#183f77); color: #fff; }
.sp-picker header img { width: 140px; height: auto; }
.sp-picker h1 { margin: 0 0 11px; font-size: 27px; line-height: 1.35; }
.sp-picker header p { color: #d8e6f9; margin: 0; font-size: 14px; line-height: 1.8; }
.sp-picker section { padding: 30px; align-self: center; min-width: 0; }
.sp-picker h2 { margin: 0 0 16px; color: var(--sp-navy); font-size: 19px; }
.sp-picker #list { display: grid; gap: 9px; }
.sp-picker button { position: relative; display: grid; gap: 4px; width: 100%; padding: 12px 34px 12px 14px; background: #fff; border: 1px solid var(--sp-line); border-radius: 8px; text-align: left; font: inherit; color: var(--sp-ink); cursor: pointer; }
.sp-picker button::after { content: ""; position: absolute; right: 16px; top: calc(50% - 4px); width: 7px; height: 7px; border-right: 2px solid #6791c7; border-top: 2px solid #6791c7; transform: rotate(45deg); }
.sp-picker button:hover, .sp-picker button:focus-visible { border-color: #6998d7; background: #f1f6ff; }
.sp-picker button strong { font-size: 15px; }
.sp-picker button small, .sp-picker #state { color: var(--sp-muted); font-size: 13px; }
.sp-picker #state { margin: 12px 0 0; }
.sp-picker #state:empty { display: none; }
@media(max-width:640px) {
  .sp-panel, .sp-hero { padding: 15px; }
  .sp-hero { gap: 8px; }
  .sp-hero h1 { font-size: 24px; }
  .sp-status strong, .sp-ident { font-size: 12px; }
  .sp-ident { gap: 2px 9px; }
  .sp-metrics { grid-template-columns: 1fr 1fr; gap: 7px; }
  .sp-metric { padding: 10px 12px; gap: 4px; }
  .sp-primary { grid-column: 1/-1; grid-row: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .sp-primary strong { font-size: 26px; }
  .sp-metric span { font-size: 12px; }
  .sp-meta { font-size: 12px; }
  .sp-table { min-width: 480px; }
  .sp-table th, .sp-table td { padding: 9px 10px; }
  .sp-table th:first-child { position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 var(--sp-line); white-space: normal; min-width: 95px; max-width: 125px; }
  .sp-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .sp-form input, .sp-form select { max-width: 100%; min-width: 0; }
  .sp-button, .sp-error { grid-column: 1/-1; }
  .sp-picker { padding: 14px; }
  .sp-picker main { grid-template-columns: 1fr; }
  .sp-picker header { padding: 20px; gap: 18px; }
  .sp-picker header img { width: 110px; }
  .sp-picker h1 { font-size: 23px; margin-bottom: 5px; }
  .sp-picker section { padding: 18px 20px 22px; }
}
