/* 薪资账单中心 ASP 版 · 全站样式（橙色 + 淡蓝主题，替代老版 css.css） */
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.6 -apple-system, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
       color: #1f2937; background: #e8f1fb; }
a { color: #ea580c; text-decoration: none; }
.mono { font-family: Consolas, "Courier New", monospace; }
.small { font-size: 12px; color: #6b7280; }
.pos { color: #059669; } .neg { color: #dc2626; }
.link { color: #ea580c; cursor: pointer; } .link:hover { text-decoration: underline; }

/* 登录页 */
body.login { min-height: 100vh; background: #1e2b75 center/cover no-repeat; }
.mask { min-height: 100vh; background: linear-gradient(rgba(30,27,75,.55), rgba(30,27,75,.62));
        display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 12px; }
.mask .brand img { width: 56px; height: 56px; border-radius: 22%; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.mask h1 { color: #fff; font-size: 22px; margin: 10px 0 2px; text-align: center; }
.mask .sub { color: #fed7aa; font-size: 13px; margin: 0 0 14px; text-align: center; }
.tabs { display: flex; background: #fff; border-radius: 12px 12px 0 0; overflow: hidden; }
.tabs b, .tabs a { flex: 1; text-align: center; padding: 12px 0; font-size: 13px; font-weight: 600; }
.tabs b { color: #ea580c; background: #fff7ed; border-bottom: 2px solid #f97316; }
.tabs a { color: #6b7280; background: #f8fafc; }
.box { width: 100%; max-width: 380px; }
.card { background: #eff6ff; padding: 16px; display: block; border: 0; }
.card + .card { margin-top: 10px; border-radius: 0 0 12px 12px; }
.card label { display: block; font-size: 12px; color: #4b5563; margin-bottom: 10px; }
.card input { width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 14px; }
.card button, button { background: #f97316; color: #fff; border: 0; padding: 10px 16px; border-radius: 8px; font-size: 14px; cursor: pointer; }
button.gray { background: #374151; }
button.green { background: #059669; }
button.red { background: #dc2626; }
button:hover { filter: brightness(.95); }
.err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; padding: 8px 10px; border-radius: 8px; font-size: 12px; }
.foot { color: #94a3b8; font-size: 12px; text-align: center; padding: 18px 0; }

/* 应用内页 */
.viewbar { background: rgba(15,23,42,.92); color: #fff; font-size: 12px; padding: 9px 16px; }
.nav { background: #f97316; color: #fff; padding: 10px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
       box-shadow: 0 2px 8px rgba(0,0,0,.08); position: sticky; top: 0; z-index: 40; }
.nav .brand { font-weight: 700; font-size: 16px; margin-right: 8px; }
.nav a { color: #fff; background: rgba(255,255,255,.16); padding: 6px 10px; border-radius: 6px; font-size: 13px; }
.nav a.on { background: #fff; color: #c2410c; font-weight: 600; }
.nav a.out, .nav a.back { margin-left: auto; }
.nav a.back { background: #fff; color: #c2410c; font-weight: 600; }
.nav .who { font-size: 13px; opacity: .95; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 16px; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; }
.bar h2 { font-size: 18px; margin: 0; }
.ops { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { background: #f97316; color: #fff; padding: 8px 14px; border-radius: 8px; font-size: 13px; display: inline-block; }
.btn.green { background: #059669; } .btn.gray { background: #374151; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.cards .card { background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); border-left: 4px solid #f97316; }
.cards .card span { display: block; font-size: 12px; color: #6b7280; }
.cards .card b { font-size: 20px; }
.filters, .head4, .grid4, .grid6 { display: flex; flex-wrap: wrap; gap: 10px; align-items: end;
        background: #fff; padding: 12px; border-radius: 10px; margin-bottom: 12px; }
.head4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid6 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.filters label, .head4 label, .grid4 label, .grid6 label, .setup label { display: block; font-size: 12px; color: #4b5563; }
.filters input, .head4 input, .grid4 input, .grid6 input, .grid6 select, .setup input, .setup select {
        width: 100%; margin-top: 4px; padding: 7px 9px; border: 1px solid #e5e7eb; border-radius: 7px; font-size: 13px; }
.chk { display: flex; align-items: center; gap: 6px; }
.chk input { width: auto; margin: 0; }
.paste { width: 100%; height: 220px; padding: 10px; border: 1px solid #e5e7eb; border-radius: 10px;
         font: 12px/1.5 Consolas, monospace; }
.actions { margin: 12px 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* 表格 */
.tblbox { overflow-x: auto; background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
table.grid { border-collapse: separate; border-spacing: 0; width: 100%; }
table.grid th, table.grid td { border-bottom: 1px solid #eef2f7; border-right: 1px solid #eef2f7; padding: 8px 10px; font-size: 13px; white-space: nowrap; }
table.grid thead th { background: #f8fafc; color: #64748b; font-size: 12px; position: sticky; top: 0; z-index: 5; }
table.grid td.num, table.grid th.num { text-align: right; }
table.grid td.ops2, table.grid th.ops2 { text-align: right; }
table.grid tbody tr:hover td { background: #fff7ed; }
tr.row { cursor: pointer; }
.frz { position: sticky; left: 0; background: #fff; z-index: 4; min-width: 220px; box-shadow: 1px 0 0 #e2e8f0; }
thead .frz { background: #f8fafc; z-index: 6; }
.m { font-weight: 700; } .s { font-size: 12px; color: #6b7280; }
.hint { font-size: 11px; color: #fb923c; }
.pill { background: #e0f2fe; color: #0369a1; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.tag { padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.tag.on { background: #dcfce7; color: #15803d; } .tag.off { background: #e5e7eb; color: #6b7280; }
.chip { background: #ffedd5; color: #c2410c; font-size: 11px; padding: 2px 6px; border-radius: 6px; }
.lockchip { background: #f1f5f9; color: #64748b; font-size: 12px; padding: 6px 10px; border-radius: 8px; }
.mini { font-size: 12px; padding: 4px 8px; border-radius: 6px; background: #fff7ed; color: #c2410c; border: 0; cursor: pointer; }
.mini.red { background: #fef2f2; color: #b91c1c; }
.pager { display: flex; gap: 8px; align-items: center; padding: 10px 4px; font-size: 13px; }
.pager a { background: #fff; padding: 5px 10px; border-radius: 6px; }
.empty { text-align: center; color: #9ca3af; padding: 32px; background: #fff; border-radius: 12px; }
.danger { background: #fff; border-radius: 12px; padding: 12px; margin-top: 14px; border-left: 4px solid #dc2626; }
.panel { background: #fff; border-radius: 12px; padding: 14px; margin: 12px 0; }
.panel h3 { margin: 0 0 8px; font-size: 15px; }
.links { list-style: none; padding: 0; margin: 0; }
.links li { padding: 5px 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-top: 12px; }

/* 55 列明细弹层 */
.pop { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.6); z-index: 60;
       align-items: center; justify-content: center; padding: 12px; }
.popbox { background: #fff; border-radius: 12px; width: 96vw; height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
.pophead { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #eef2f7; }
.pophead b { font-size: 15px; }
.close { background: transparent; color: #9ca3af; font-size: 22px; padding: 0 6px; }
.poptbl { overflow: auto; flex: 1; }
table.detail td, table.detail th { border: 1px solid #e2e8f0; text-align: center; min-width: 104px; font-size: 12px; }
table.detail thead tr:first-child th { position: sticky; top: 0; height: 34px; font-weight: 700; z-index: 8; }
table.detail thead tr:nth-child(2) th { position: sticky; top: 34px; height: 30px; background: #f9fafb; color: #4b5563; z-index: 7; }
table.detail .corner { position: sticky; top: 0; left: 0; z-index: 9; background: #eef2f7; min-width: 132px; }
table.detail td.frz { position: sticky; left: 0; background: #fff; z-index: 6; min-width: 132px; }
.popfoot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: #f8fafc; border-top: 1px solid #eef2f7; }

/* 分组带色 */
fieldset.band { border: 0; border-top: 4px solid #ddd; margin: 0 0 12px; padding: 10px 12px 0; background: #fff; border-radius: 0 0 10px 10px; }
fieldset.band legend { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 6px; color: #1f2937; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.fields label { font-size: 11px; color: #6b7280; }
.fields input { width: 100%; margin-top: 3px; padding: 6px 8px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 13px; }

/* 图表 */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.chart { background: #fff; border-radius: 12px; padding: 12px; }
.chart h3 { margin: 0 0 6px; font-size: 14px; color: #374151; }
.chart div { height: 260px; width: 100%; }

/* 安装页 */
body.setup { max-width: 640px; margin: 40px auto; padding: 0 16px; }
.setup h1 { font-size: 20px; }
.setup form { background: #fff; padding: 16px; border-radius: 12px; }
.setup label { display: block; margin-bottom: 12px; font-size: 13px; color: #4b5563; }
.setup input { width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px; }
.tip { background: #f0fdf4; border: 1px solid #bbf7d0; padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.ok { color: #15803d; font-weight: 600; }

@media (max-width: 640px) {
  .nav { gap: 6px; padding: 8px 10px; } .nav .brand { font-size: 14px; }
  .wrap { padding: 10px; }
  .popbox { width: 100vw; height: 100vh; border-radius: 0; }
}
