*{box-sizing:border-box} :root{--ink:#262522;--paper:#f4f0e8;--cream:#fffdf8;--line:#d8d0c5;--lime:#d9f99d;--orange:#ff8a5b;--mint:#d9efe3;--muted:#746f68} body{margin:0;background:var(--paper);color:var(--ink);font-family:"Yu Gothic UI","Yu Gothic",Meiryo,sans-serif}.shell{min-height:100vh;display:grid;grid-template-columns:220px 1fr}.rail{position:sticky;top:0;height:100vh;background:#24231f;color:#fff;padding:34px 24px;display:flex;flex-direction:column}.mark{width:64px;height:64px;border-radius:50%;background:var(--lime);color:#24231f;display:grid;place-items:center;font:900 23px/1 Arial}.mark span{font-size:14px;margin:0 2px}.rail-name{font-size:18px;font-weight:800;line-height:1.5;margin:18px 0 34px}.rail nav{display:grid;gap:8px}.nav{width:100%;text-align:left;border:0;background:transparent;color:#aaa69f;border-radius:12px;padding:13px 14px;font-weight:700;cursor:pointer}.nav.active{background:#fff;color:#24231f}.rail-note{margin-top:auto;color:#9f9b94;font-size:12px;line-height:1.8}main{width:min(1180px,calc(100vw - 220px));padding:58px 54px 80px}.hero{display:flex;justify-content:space-between;gap:30px;align-items:flex-end;margin-bottom:34px}.eyebrow{font:800 11px/1.2 Arial;letter-spacing:.18em;color:#817b73;margin-bottom:12px}.hero h1{font-size:46px;line-height:1.12;letter-spacing:-.045em;margin:0}.hero h1 em{font-style:normal;background:linear-gradient(transparent 60%,var(--lime) 60%)}.hero p{max-width:650px;color:var(--muted);line-height:1.8;margin:18px 0 0}.month-pill{background:#24231f;color:#fff;border-radius:999px;padding:9px 11px 9px 18px;display:flex;align-items:center;gap:14px;white-space:nowrap}.month-pill span{font-size:11px;font-weight:800}.month-pill input{background:#fff;border:0;border-radius:999px;padding:9px 12px;font-weight:800}.upload-card{background:var(--cream);border:1px solid var(--line);border-radius:28px;padding:14px}.drop{min-height:160px;border:1.5px dashed #aaa095;border-radius:20px;padding:30px;display:flex;align-items:center;justify-content:center;gap:20px;cursor:pointer;transition:.18s}.drop:hover,.drop.over{background:#fbf6e9;border-color:#24231f;transform:translateY(-1px)}.drop-icon{width:66px;height:78px;background:var(--orange);border-radius:10px 10px 18px 10px;display:grid;place-items:center;color:white;font:900 14px Arial;box-shadow:8px 8px 0 #24231f}.drop strong{font-size:18px}.drop span{display:block;color:var(--muted);font-size:12px;margin-top:8px}.status{font-size:12px;color:var(--muted);padding:12px 8px 2px}.status.good{color:#276749;font-weight:700}.status.bad{color:#b6472c;font-weight:700}.identity{display:grid;grid-template-columns:1.3fr 1fr 1fr .7fr;gap:14px;margin:18px 0 28px}.identity label{background:rgba(255,255,255,.55);border-bottom:1px solid #aaa095;padding:10px 4px}.identity label span{display:block;font-size:10px;font-weight:800;color:#807a72;text-transform:uppercase;letter-spacing:.08em}.identity input,.identity select{width:100%;border:0;background:transparent;padding:9px 0 2px;font-size:15px;font-weight:700;outline:none}.numbers{display:grid;grid-template-columns:1fr auto 1fr auto 1fr auto 1fr auto;gap:13px;align-items:center;margin-bottom:28px}.numbers article{min-height:122px;background:var(--cream);border:1px solid var(--line);border-radius:22px;padding:18px}.numbers article.accent{background:var(--mint)}.numbers small{font:800 9px Arial;letter-spacing:.15em;color:#8a837b}.numbers article span{display:block;color:#69645e;font-size:12px;margin:8px 0}.numbers article b{font-size:26px;letter-spacing:-.03em}.numbers>i{font-style:normal;font-weight:300;font-size:24px;color:#928a82}.badge{padding:10px 12px;border-radius:999px;font-size:11px;font-weight:900;white-space:nowrap;text-align:center}.badge.waiting{background:#ddd6cd}.badge.ok{background:var(--lime)}.badge.ng{background:#ffd2c2;color:#a63c20}.content-card{background:var(--cream);border:1px solid var(--line);border-radius:28px;padding:26px}.section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:18px}.section-head h2{margin:0;font-size:22px}.actions{display:flex;gap:8px}button.ghost,button.dark{border-radius:999px;padding:11px 16px;font-weight:800;cursor:pointer}.ghost{border:1px solid #aaa095;background:transparent}.dark{border:1px solid #24231f;background:#24231f;color:#fff}.table-wrap{overflow:auto;border-radius:16px;border:1px solid #e0d8ce}table{width:100%;border-collapse:collapse}th,td{padding:11px 12px;border-bottom:1px solid #e7e0d7;font-size:12px;text-align:left}th{font-size:10px;letter-spacing:.05em;color:#777068;background:#f5f0e7}td.money{text-align:right;font-variant-numeric:tabular-nums}.empty td{text-align:center;color:#9c958d;padding:35px}.sheet{margin-top:36px;background:#fff;min-height:297mm;padding:16mm 14mm;border:1px solid #d5cec5;box-shadow:0 18px 45px rgba(65,58,48,.08)}.sheet-kicker{text-align:center;font-size:10px;letter-spacing:.2em;color:#777}.sheet-title{text-align:center;font-size:22px;font-weight:800;margin:6px 0 24px}.sheet-top{display:grid;grid-template-columns:1fr 1.15fr;gap:24px;align-items:start}.sheet-meta{border-top:2px solid #333}.sheet-meta>div{display:flex;border-bottom:1px solid #aaa}.sheet-meta span{width:90px;background:#f2f2f2;padding:9px;font-weight:700;font-size:11px}.sheet-meta b{padding:9px;font-size:12px}.approval th{text-align:center;border:1px solid #777;background:#f3f3f3}.approval td{height:54px;border:1px solid #777}.confirm-row{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin:10px 0}.confirm-row span{font-size:11px}.stampbox{width:62px;height:42px;border:1px solid #777}.balance-table{margin-top:14px}.balance-table th,.balance-table td{border:1px solid #777;text-align:center}.balance-table td{font-size:15px;font-weight:800}.print-detail{margin-top:18px}.print-detail th,.print-detail td{border:1px solid #777}.print-detail td:last-child{text-align:right}.total{display:flex;justify-content:flex-end;margin-top:10px}.total span,.total b{border:1px solid #777;padding:10px 18px}.total b{border-left:0;min-width:150px;text-align:right}.filename{font-size:10px;color:#777;margin-top:14px}@media(max-width:900px){.shell{grid-template-columns:1fr}.rail{position:static;height:auto;padding:18px 20px;flex-direction:row;align-items:center;gap:14px}.mark{width:45px;height:45px}.rail-name{margin:0;font-size:13px}.rail nav,.rail-note{display:none}main{width:100%;padding:32px 18px}.hero{align-items:flex-start;flex-direction:column}.hero h1{font-size:36px}.numbers{grid-template-columns:1fr 1fr}.numbers>i{display:none}.identity{grid-template-columns:1fr}.section-head{align-items:flex-start;flex-direction:column}.sheet{padding:7mm}.sheet-top{grid-template-columns:1fr}.approval{margin-top:10px}}@media print{body{background:#fff}.rail,.no-print{display:none!important}.shell{display:block}main{width:auto;padding:0}.sheet{display:block;margin:0;border:0;box-shadow:none;padding:8mm;min-height:auto}@page{size:A4 portrait;margin:6mm}}

.print-detail .charge-row td{font-weight:700;background:#f7f3e8;}
@media print{.print-detail .charge-row td{background:#f4f4f4 !important;-webkit-print-color-adjust:exact;print-color-adjust:exact;}}

.personal-stamp-preview{background:rgba(255,255,255,.55);border-bottom:1px solid #aaa095;padding:8px 4px;display:grid;grid-template-columns:auto 52px;grid-template-rows:auto auto;align-items:center;gap:2px 10px}.personal-stamp-preview>span{font-size:10px;font-weight:800;color:#807a72;letter-spacing:.08em}.personal-stamp-preview small{font-size:9px;color:#817b73}.personal-stamp-preview small.stamp-missing{color:#b6472c;font-weight:800}.mini-stamp{grid-column:2;grid-row:1/3;width:52px;height:52px;display:grid;place-items:center}.mini-stamp img{display:block;max-width:48px;max-height:48px;object-fit:contain}.stampbox{display:grid;place-items:center;overflow:hidden}.stampbox img{display:block;max-width:39px;max-height:39px;object-fit:contain}@media print{.stampbox img{max-width:39px;max-height:39px}}

.history-panel{margin-top:18px}
.history-empty{padding:28px;text-align:center;color:#777}
#historyTable button{padding:7px 10px}
.ghost.danger{color:#a12626;border-color:#d8b1b1}

/* Ver1.1: personal stamp size normalization */
.stamp-box img, #stampPreview, .approval-stamp img {
  width: 48px !important;
  height: 48px !important;
  object-fit: contain !important;
}
@media print {
  .approval-stamp img, #pStampImg {
    width: 42px !important;
    height: 42px !important;
    object-fit: contain !important;
  }
}

.quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:18px 0}
.quick-card{display:flex;align-items:center;gap:14px;text-align:left;background:#fff;border:1px solid #ddd6c8;border-radius:18px;padding:18px;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.04)}
.quick-card:hover{transform:translateY(-1px);box-shadow:0 8px 24px rgba(0,0,0,.07)}
.quick-card b{display:block;font-size:17px}.quick-card small{display:block;color:#777;margin-top:4px}
.quick-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:#e7ff64;font-weight:900;font-size:18px}
.receipt-panel{margin-top:18px}
.receipt-employee-mobile{display:none;margin:0 0 14px;padding:14px;border:2px solid #24231f;border-radius:14px;background:#f4fbe7}.receipt-employee-mobile span{display:block;margin-bottom:7px;font-size:13px;font-weight:900}.receipt-employee-mobile select{width:100%;padding:12px;border:1px solid #aaa095;border-radius:10px;background:#fff;font:inherit;font-size:16px;font-weight:800}.receipt-employee-mobile small{display:block;margin-top:7px;color:#68635c;font-size:11px}
.receipt-source-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.receipt-drop{display:grid;place-items:center;gap:6px;min-height:130px;border:2px dashed #b9b09f;border-radius:18px;background:#faf8f2;cursor:pointer;text-align:center;padding:20px}
.receipt-drop strong{font-size:18px}.receipt-drop span{font-size:13px;color:#777}
.camera-source{background:#f4fbe7;border-color:#a9bb7b}.gallery-source{background:#f2f7ff;border-color:#9bb5d7}.receipt-photo-tip{margin:10px 4px 0;color:#777;font-size:12px;line-height:1.7}
.receipt-preview-wrap{display:grid;grid-template-columns:minmax(220px,360px) 1fr;gap:22px;margin-top:18px}
#receiptPreview{width:100%;max-height:520px;object-fit:contain;background:#f1efe9;border-radius:14px}
.receipt-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.receipt-fields label{display:grid;gap:6px;font-size:12px;font-weight:700}
.receipt-fields input,.receipt-fields select,.receipt-fields textarea{width:100%;padding:12px;border:1px solid #ccc4b6;border-radius:10px;background:white;font:inherit;font-size:15px}
.invoice-check{align-self:end;padding:11px;border-radius:10px;font-weight:800}.invoice-check.ok{background:#e9f7e8}.invoice-check.warn{background:#fff3d6}
.big-action{grid-column:1/-1;padding:14px;font-size:16px}
.receipt-ocr-status{grid-column:1/-1;padding:12px;border-radius:10px;background:#f2efe8;font-size:12px;font-weight:800}.receipt-ocr-status.loading{background:#e9f3ff;color:#175ca8}.receipt-ocr-status.ok{background:#e9f7e8;color:#276749}.receipt-ocr-status.warn{background:#fff3d6;color:#8a5b00}
.ocr-needs-check{padding:8px;border:2px solid #e5a323;border-radius:12px;background:#fff8dd}.ocr-needs-check::after{content:'読み取り不良：手入力してください';color:#a15c00;font-size:10px;font-weight:800}
.category-field{grid-column:1/-1;border:1px solid #d7cfc1;border-radius:12px;padding:12px}.category-field legend{padding:0 6px;font-size:12px;font-weight:800}.category-checks{display:grid;grid-template-columns:1fr 1fr;gap:8px}.category-checks label{display:flex;align-items:center;gap:7px;padding:9px;border:1px solid #ddd6c8;border-radius:9px;background:#fff}.category-checks input{width:19px;height:19px;padding:0;accent-color:#2563eb}.other-categories{grid-column:1/-1;border:1px solid #d7cfc1;border-radius:10px;background:#faf8f2}.other-categories summary{cursor:pointer;padding:11px 13px;font-size:12px;font-weight:800;color:#52504b}.other-category-checks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0 10px 10px}.entertainment-fields{grid-column:1/-1;display:grid;grid-template-columns:160px 1fr;gap:12px;padding:14px;border-radius:12px;background:#fff7e2}.entertainment-fields[hidden]{display:none}.receipt-note{grid-column:1/-1}.receipt-history-head{display:flex;align-items:center;justify-content:space-between;margin-top:22px}.receipt-history-head h3{margin:0}.receipt-list{margin-top:8px}.receipt-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 0;border-top:1px solid #eee8dd}.receipt-row small{display:block;color:#777;margin-top:3px}.receipt-row-actions{display:flex;align-items:center;gap:8px}.receipt-row-actions a{text-decoration:none;padding:7px 10px;border-radius:999px;font-size:12px}
.receipt-export-bar{display:grid;grid-template-columns:180px minmax(180px,1fr) auto;gap:10px;align-items:end;margin-top:12px;padding:14px;border:1px solid #ded7ca;border-radius:14px;background:#f7f4ed}.receipt-export-bar label{display:grid;gap:5px;font-size:11px;font-weight:800}.receipt-export-bar input,.receipt-export-bar select{width:100%;padding:10px;border:1px solid #cfc6b8;border-radius:9px;background:#fff;font:inherit}.receipt-export-bar button{min-height:40px}
@media(max-width:720px){.receipt-employee-mobile{display:block}.quick-actions,.receipt-source-actions,.receipt-preview-wrap,.receipt-fields{grid-template-columns:1fr}.quick-card{padding:16px}.receipt-drop{min-height:104px}.big-action{grid-column:auto}}
@media(max-width:720px){.category-field,.receipt-ocr-status,.receipt-note,.entertainment-fields{grid-column:auto}.category-checks{grid-template-columns:1fr 1fr}.other-category-checks{grid-template-columns:1fr 1fr}.entertainment-fields{grid-template-columns:1fr}.receipt-row{align-items:flex-start;flex-direction:column}.receipt-row-actions{width:100%;justify-content:flex-end}}
@media(max-width:720px){.receipt-export-bar{grid-template-columns:1fr}.receipt-export-bar button{width:100%}}

.personal-review{margin:18px 0 6px;padding:18px;border:1px solid #ded7ca;border-radius:18px;background:#fff}.review-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.review-summary>div{padding:13px;border-radius:13px;background:#f6f3ed}.review-summary span{display:block;font-size:12px;color:#777}.review-summary strong{display:block;margin-top:5px;font-size:20px}.review-pay{background:#eff8cf!important}.review-confirm{display:flex;align-items:center;gap:10px;margin-top:16px;font-weight:800;cursor:pointer}.review-confirm input,.personal-check{width:20px;height:20px;accent-color:#1f1f1f}.review-help{margin:8px 0 0;color:#777;font-size:12px}.personal-cell{text-align:center}.personal-row{opacity:.55;background:#f2f0ec!important;text-decoration:line-through}.personal-row .personal-cell{text-decoration:none;opacity:1}.charge-label{font-size:11px;color:#777}button:disabled{opacity:.4;cursor:not-allowed}@media(max-width:720px){.review-summary{grid-template-columns:1fr}.personal-head{min-width:70px}}@media print{.personal-review{display:none!important}.personal-row{opacity:1;text-decoration:none}.personal-row .personal-check{display:none}}

.originator-cell{position:relative;text-align:center;vertical-align:middle}.originator-cell img{width:44px;height:44px;object-fit:contain;display:block;margin:2px auto}.originator-cell small{display:none}.print-personal{background:#f0f0f0!important;color:#666}.print-personal td{font-style:normal}.print-detail th:last-child,.print-detail td:last-child{min-width:112px;font-size:10px}@media print{.originator-cell img{width:40px!important;height:40px!important}.print-personal{background:#eee!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* Ver1.6 */
.balance-table th{font-size:9px;padding:8px 5px}.balance-table td{font-size:13px;padding:10px 5px}
#pPersonal{color:#b4232d;background:#fff4f4}
.originator-cell img{width:48px!important;height:48px!important;object-fit:contain}
.print-personal td{background:#f1f1f1!important;color:#555}
.print-personal td:last-child{font-weight:800;color:#b4232d}
@media print{
  .balance-table th{font-size:8px}.balance-table td{font-size:11px}
  .originator-cell img{width:44px!important;height:44px!important}
  #pPersonal{background:#fff4f4!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* Ver6.3 Suica精算書：帳票罫線をPDFでも明瞭にする */
#settlement .sheet-meta>div{border-bottom:1.4px solid #555!important}
#settlement .approval,#settlement .approval th,#settlement .approval td,
#settlement .balance-table,#settlement .balance-table th,#settlement .balance-table td,
#settlement .print-detail,#settlement .print-detail th,#settlement .print-detail td{
  border-color:#666!important;
}
#settlement .approval,#settlement .balance-table,#settlement .print-detail{
  border-collapse:collapse!important;
}
#settlement .approval th,#settlement .approval td,
#settlement .balance-table th,#settlement .balance-table td,
#settlement .print-detail th,#settlement .print-detail td{
  border-width:1.15px!important;
  border-style:solid!important;
}
@media print{
  #settlement .sheet-meta>div{border-bottom:1.5px solid #333!important}
  #settlement .approval,#settlement .approval th,#settlement .approval td,
  #settlement .balance-table,#settlement .balance-table th,#settlement .balance-table td,
  #settlement .print-detail,#settlement .print-detail th,#settlement .print-detail td{
    border-color:#333!important;
  }
  #settlement .approval th,#settlement .approval td,
  #settlement .balance-table th,#settlement .balance-table td,
  #settlement .print-detail th,#settlement .print-detail td{
    border-width:1.25px!important;
  }
}

/* Ver6.3 Suica精算書：印刷時の罫線をさらに明瞭化 */
@media print{
#settlement .sheet-meta>div{border-bottom:2px solid #111!important}
#settlement .approval,#settlement .balance-table,#settlement .print-detail{border-collapse:collapse!important;border:1.8px solid #111!important}
#settlement .approval th,#settlement .approval td,#settlement .balance-table th,#settlement .balance-table td,#settlement .print-detail th,#settlement .print-detail td{border:1.6px solid #111!important}
#settlement .approval th,#settlement .balance-table th,#settlement .print-detail th{font-weight:800!important}
}
