/* PCA会計DX の見た目にそろえる（ピンク〜赤茶の背景・白いパネル・灰色の立体ボタン・別ウィンドウ風の処理画面） */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: "Meiryo UI", "Meiryo", "Yu Gothic UI", sans-serif; font-size: 13px; color: #222; background: #f0f0f0; display: flex; flex-direction: column; min-height: 100vh; }
a { color: #1a4f8b; }
.titlebar { height: 28px; display: flex; align-items: center; padding: 0 8px; background: #fff; border-bottom: 1px solid #ddd; font-size: 12px; white-space: nowrap; overflow: hidden; }
.titlebar .logo { width: 16px; height: 16px; background: #d81e2c; color: #fff; font: bold 10px/16px Arial; text-align: center; margin-right: 6px; flex: none; }
.titlebar .who { margin-left: auto; color: #555; }
.toolbar { display: flex; align-items: flex-end; gap: 2px; padding: 3px 6px; background: linear-gradient(#fdfdfd, #e9e9e9); border-bottom: 1px solid #c8c8c8; overflow-x: auto; }
.tool { min-width: 58px; text-align: center; font-size: 11px; padding: 2px 4px; border: 1px solid transparent; color: #222; text-decoration: none; }
.tool:hover { border-color: #9cc3e6; background: #e5f1fb; }
.tool .ic { font-size: 18px; line-height: 22px; display: block; }
.toolbar .sep { width: 1px; height: 36px; background: #c8c8c8; margin: 0 4px; }
.brand { margin-left: auto; border: 1px solid #999; border-radius: 4px; padding: 2px 10px; font-size: 18px; background: #fff; white-space: nowrap; }
.brand b { color: #d81e2c; font-family: "Arial Black", Arial; }
.canvas { flex: 1; padding: 14px 18px 30px; background: linear-gradient(160deg, #fbf3f1 0%, #f0cfc7 45%, #d9988a 100%); }
.flash { background: #fffbe6; border: 1px solid #e0c060; padding: 6px 10px; margin-bottom: 10px; max-width: 900px; }
.err { background: #fde8e8; border: 1px solid #d77; padding: 6px 10px; margin-bottom: 8px; color: #8a1c1c; }

/* メニュー */
.menuwrap { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 0; }
.panel { background: #fff; border: 1px solid #e3e3e3; box-shadow: 8px 8px 0 rgba(160, 70, 60, .35); padding: 12px 14px 14px; width: 230px; }
.panel h2 { margin: 0 0 12px; font-size: 15px; font-weight: normal; text-align: center; padding: 8px 0; border-top: 2px solid #f0d0ca; border-bottom: 2px solid #f0d0ca; }
.cat { display: flex; align-items: center; gap: 8px; height: 34px; margin-bottom: 10px; padding: 0 6px; border: 1px solid #b9b9b9; background: linear-gradient(#fff, #e3e3e3); cursor: pointer; font-size: 14px; user-select: none; }
.cat .ic { width: 26px; text-align: center; font-size: 18px; }
.cat .chev { margin-left: auto; }
.cat:hover { background: linear-gradient(#fff6f4, #f3dcd6); }
.cat.on { background: linear-gradient(#f6b8a8, #e58f7c); border-color: #b0594a; }
.arrow { width: 0; height: 0; margin: 18px 10px 0 16px; border-top: 22px solid transparent; border-bottom: 22px solid transparent; border-left: 34px solid #f7e2dd; filter: drop-shadow(3px 3px 0 rgba(160,70,60,.45)); }
.panel.sub { width: 290px; }
.item { display: block; height: 34px; line-height: 32px; margin-bottom: 10px; padding: 0 8px; color: #fff; font-size: 14px; text-decoration: none; border: 1px solid #3a3a3a; background: linear-gradient(#7a7a7a, #555 55%, #4a4a4a); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.item:hover { background: linear-gradient(#a05a50, #7d3d35); border-color: #5a2a24; }
.item.off { background: #ddd; color: #999; border-color: #bbb; cursor: default; box-shadow: none; }
.item small { font-size: 11px; color: inherit; opacity: .8; }

/* 処理ウィンドウ */
.win { background: #f4f4f4; border: 1px solid #9a9a9a; box-shadow: 0 6px 18px rgba(0,0,0,.25); max-width: 1400px; }
.win .wt { background: linear-gradient(#fff, #f6e4e0); padding: 6px 10px; font-size: 13px; border-bottom: 1px solid #ccc; display: flex; align-items: center; gap: 8px; }
.win .wt .x { margin-left: auto; text-decoration: none; color: #333; font-size: 16px; }
.win .wb { padding: 10px 12px; }
.win .status { border-top: 1px solid #ccc; padding: 4px 10px; font-size: 12px; background: #eee; }
.cond { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 10px; }
.cond label { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #bbb; background: #fff; padding: 2px 6px; }
select, input[type=text], input[type=date], input[type=password], input:not([type]) { font: inherit; padding: 2px 4px; border: 1px solid #aaa; }
.btn { font: inherit; padding: 3px 14px; border: 1px solid #888; background: linear-gradient(#fff, #e2e2e2); cursor: pointer; color: #222; text-decoration: none; display: inline-block; }
.btn:hover { background: linear-gradient(#fff, #d4e6f7); }
.btn.primary { border-color: #2a5d9b; }
.btn.danger { color: #a01818; }

/* 表（PCAの帳票＝濃い青の見出し） */
.tablewrap { overflow-x: auto; background: #fff; border: 1px solid #999; }
table.grid { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
table.grid th { background: #3c6fa3; color: #fff; font-weight: normal; padding: 3px 6px; border: 1px solid #2c5884; white-space: nowrap; }
table.grid td { padding: 2px 6px; border: 1px solid #d5d5d5; white-space: nowrap; }
table.grid tr:nth-child(even) td { background: #f3f7fb; }
table.grid td.n { text-align: right; }
table.grid tr.sum td { background: #e8eef5; font-weight: bold; }
table.grid tr.grand td { background: #3c6fa3; color: #fff; font-weight: bold; }
table.grid tr.v1 td { border-top: 2px solid #8aa; }
table.grid td.wrap { white-space: normal; min-width: 180px; }
.neg { color: #b01c1c; }

/* 伝票入力 */
table.slip input { width: 100%; border: 1px solid #ccc; padding: 2px 3px; }
table.slip td { padding: 1px 2px; }
table.slip input.amt { text-align: right; }
table.slip td.ln { color: #777; text-align: center; width: 28px; }
.totals { display: flex; gap: 20px; margin: 8px 0; font-variant-numeric: tabular-nums; }
.totals b { font-size: 15px; }
.totals .bad { color: #b01c1c; }

/* ログイン */
.login { max-width: 360px; margin: 40px auto; }
.login .wb { display: grid; gap: 10px; }
.login input { width: 100%; padding: 6px; }

/* 給与（PCA給与DXの緑がかった背景） */
body.pay .canvas { background: linear-gradient(160deg, #f3f5ee 0%, #d6dec6 45%, #a9b78f 100%); }
body.pay .panel { box-shadow: 8px 8px 0 rgba(95, 115, 60, .35); }
body.pay .panel h2 { border-color: #d5dfc2; }
body.pay .arrow { border-left-color: #eef2e4; filter: drop-shadow(3px 3px 0 rgba(95,115,60,.45)); }
body.pay .cat:hover { background: linear-gradient(#f8fbf2, #dfe8cf); }
body.pay .cat.on { background: linear-gradient(#c9d9a6, #9fb878); border-color: #6c8443; }
body.pay .item:hover { background: linear-gradient(#6e8a4a, #4f6a31); border-color: #3c5222; }
body.pay .win .wt { background: linear-gradient(#fff, #e6eed8); }
body.pay table.grid th { background: #5d7a3c; border-color: #4a6330; }
body.pay table.grid tr.grand td { background: #5d7a3c; }
body.pay table.grid tr:nth-child(even) td { background: #f4f7ee; }
.titlebar .logo.pay { background: #4f8a2a; }
.brand b.g { color: #3f8f1f; }
.ok { color: #2f7d1a; font-weight: bold; }
.ng { color: #b01c1c; font-weight: bold; }
.payslip { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.payslip .box { background: #fff; border: 1px solid #9aa88a; }
.payslip .box h3 { margin: 0; padding: 4px 8px; font-size: 13px; background: #5d7a3c; color: #fff; }
.payslip .box table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.payslip .box td { padding: 3px 8px; border-bottom: 1px solid #e3e8dc; }
.payslip .box td.n { text-align: right; }
.payslip .box tr.t td { font-weight: bold; background: #eef3e6; }

@media (max-width: 760px) {
  .canvas { padding: 10px 10px 30px; }
  .arrow { display: none; }
  .panel, .panel.sub { width: 100%; }
  .menuwrap { gap: 18px; }
}
