/* kupst-claim — 화면 규칙. 토큰·글꼴·터치 크기는 kupst-ui.css 가 준다. !important 없음. */

.wrap { max-width: 640px; margin: 0 auto; padding: 0 14px; }
.wrap.wide { max-width: 1180px; }
.top { background: var(--k-card); border-bottom: 1px solid var(--k-line); }
.top .wrap { display: flex; align-items: baseline; gap: 10px; padding: 12px 14px; }
.brand { font-weight: 700; color: var(--k-accent-deep); text-decoration: none; font-size: 17px; }
.org { color: var(--k-muted); font-size: 13px; }
.foot { color: var(--k-muted); font-size: 12px; padding: 24px 0 40px; }
main.wrap { padding-top: 14px; padding-bottom: 110px; }

.card { background: var(--k-card); border: 1px solid var(--k-line); border-radius: var(--k-radius); padding: 16px; margin: 0 0 14px; }
.card.danger { border-color: var(--k-danger); }
h1 { font-size: 20px; margin: 0 0 8px; }
h2 { font-size: 16px; margin: 0 0 10px; }
.meta { margin: 0 0 6px; }
.muted { color: var(--k-muted); }
.small { font-size: 13px; }
.big { font-size: 18px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.ok { color: var(--k-ok); }
.notice { background: var(--k-accent-weak); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 8px 0; }
.hint { display: block; color: var(--k-muted); font-size: 13px; margin-top: 4px; }
.req { color: var(--k-danger); font-size: 12px; font-weight: 400; }
.tag { display: inline-block; background: var(--k-accent-weak); color: var(--k-accent-deep); border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 600; vertical-align: middle; }
pre.detail { white-space: pre-wrap; font-size: 12px; color: var(--k-muted); }

.alert { border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert p { margin: 0 0 6px; }
.alert.danger { background: #fdecec; color: #8a1c1c; }
.alert.warn { background: #fff4e0; color: #7a4a00; }
.alert.ok { background: #e6f7ef; color: #0b5a3a; }

/* 폼 */
.apply label { display: block; margin: 0 0 12px; font-weight: 600; font-size: 14px; }
.apply label input, .apply label select, .apply label textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; font-weight: 400; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .row2, .row3 { grid-template-columns: 1fr; } }
.sub { margin-top: 8px; padding: 10px 12px; background: var(--k-bg); border-radius: 8px; }
.calc { margin: 4px 0 0; }
.amt input { text-align: right; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 8px; }
.seg.two { grid-template-columns: 1fr 1fr; }
.segi { position: relative; margin: 0; }
.segi input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segi span { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--k-line); border-radius: 8px; background: var(--k-card); font-weight: 600; cursor: pointer; }
.segi input:checked + span { border-color: var(--k-accent); background: var(--k-accent-weak); color: var(--k-accent-deep); }
.segi input:focus-visible + span { outline: 2px solid var(--k-accent); }

fieldset.rc { border: 1px solid var(--k-line); border-radius: 8px; padding: 8px 12px 10px; margin: 0 0 10px; }
fieldset.rc legend { font-weight: 600; padding: 0 4px; }
.rcrow { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 8px; align-items: end; padding: 8px 0; border-top: 1px dashed var(--k-line); }
.rcrow:first-child { border-top: 0; }
.rcrow label { margin: 0; font-size: 13px; }
.rcrow.lost { grid-template-columns: 1fr auto; }
.rcrow.saved { grid-template-columns: auto 1fr auto; align-items: center; }
.rcrow .file input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rcrow .file .fname { display: flex; align-items: center; min-height: 48px; padding: 0 12px; border: 1px dashed var(--k-accent); border-radius: 8px; color: var(--k-accent-deep); font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.rcrow .file .fname.has { border-style: solid; background: var(--k-accent-weak); }
.rcrow img.thumb { max-height: 48px; border-radius: 4px; }
@media (max-width: 520px) { .rcrow { grid-template-columns: 1fr 1fr; } .rcrow .file { grid-column: 1 / -1; } }
.rcbtns { display: flex; gap: 8px; margin-top: 6px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 8px 18px; border-radius: 8px; border: 1px solid var(--k-accent); background: var(--k-card); color: var(--k-accent-deep); font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--k-accent); color: #fff; }
.btn.ghost { border-color: var(--k-line); color: var(--k-text); }
.btn.danger { background: var(--k-danger); border-color: var(--k-danger); color: #fff; }
.btn.ghost.danger { background: var(--k-card); color: var(--k-danger); border-color: var(--k-danger); }
.btn.small { min-height: 36px; padding: 4px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
form.inline { display: inline; }
.chkline { display: flex; align-items: center; gap: 8px; }
.chkline input { width: 22px; height: 22px; }

.sticky { position: fixed; left: 0; right: 0; bottom: 0; background: var(--k-card); border-top: 1px solid var(--k-line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sticky .tot { font-size: 15px; }
.sticky .tot b { font-size: 20px; }
.echo { background: var(--k-accent-weak); border-radius: 8px; padding: 10px 12px; font-weight: 600; }

/* 완료·확인 */
.done { text-align: center; }
.done .ok { font-size: 44px; margin: 0; }
table.kv { width: 100%; border-collapse: collapse; font-size: 14px; }
table.kv th { text-align: left; color: var(--k-muted); font-weight: 500; width: 88px; padding: 6px 8px 6px 0; vertical-align: top; }
table.kv td { padding: 6px 0; border-bottom: 1px solid var(--k-line); }
table.kv tr.total td { font-size: 16px; }
ul.rlist { list-style: none; padding: 0; margin: 0; }
ul.rlist li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--k-line); }

/* 관리 */
.adminnav { font-size: 14px; margin: 0 0 12px; color: var(--k-muted); }
.tbl { overflow-x: auto; }
table.grid { border-collapse: collapse; width: 100%; font-size: 13px; }
table.grid th, table.grid td { border: 1px solid var(--k-line); padding: 6px 8px; vertical-align: middle; }
table.grid th { background: var(--k-bg); font-weight: 600; text-align: left; white-space: nowrap; }
table.grid td.n, table.grid th.n { text-align: right; white-space: nowrap; }
table.grid td.c { text-align: center; }
table.grid input[type="checkbox"] { width: 20px; height: 20px; }
input.link { width: 100%; box-sizing: border-box; min-height: 36px; padding: 6px 8px; font-size: 12px; }
select.small { min-height: 36px; padding: 4px 8px; font-size: 13px; }
.makebatch { margin-top: 12px; padding: 12px; background: var(--k-bg); border-radius: 8px; }
.makebatch label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.makebatch label input, .makebatch label select { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; font-weight: 400; }
.metaform label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.metaform label input, .metaform label select { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; font-weight: 400; }

/* 붙여 넣을 표 — 화면에서 doc 결의서와 비슷하게 보이도록. 🚨 복사되는 HTML 에는 이 클래스가 없다 (pastebox 바깥 규칙으로만 입힌다). */
.pastebox { overflow-x: auto; background: #fff; padding: 12px; border: 1px solid var(--k-line); border-radius: 8px; }
.pastebox table { border-collapse: collapse; width: 100%; font-size: 14px; table-layout: fixed; }
.pastebox th, .pastebox td { border: 1px solid #333; padding: 6px 8px; word-break: break-all; }
.pastebox th { background: #f3f3f3; font-weight: 600; text-align: center; }
.pastebox td:nth-child(1) { width: 18%; text-align: center; }
.pastebox td:nth-child(2) { width: 52%; }
.pastebox td:nth-child(3) { width: 18%; text-align: right; }
.pastebox td:nth-child(4) { width: 12%; text-align: center; }

.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.rgrid figure { margin: 0; }
.rgrid img { width: 100%; height: 180px; object-fit: cover; border: 1px solid var(--k-line); border-radius: 6px; }
.rgrid .pdfbox { display: flex; align-items: center; justify-content: center; height: 180px; border: 1px dashed var(--k-line); border-radius: 6px; text-align: center; }
.rgrid figcaption { font-size: 12px; margin-top: 4px; }

/* 영수증 미리보기 (2026-09-15) — 올린 그림이 그 자리에 보인다. 경로 화면 줄에는 금액칸이 없다. */
.rcrow .file { position: relative; display: block; }
.rcrow .file img.thumb { display: block; width: 100%; max-height: 220px; object-fit: contain; margin-top: 6px; border: 1px solid var(--k-line); border-radius: 6px; background: #fff; }
.rcrow.route { grid-template-columns: 1fr auto; }
.rcrow.route .file { grid-column: 1 / -1; }
.rcrow.route .rc-read { grid-column: 1; }
.rcrow .rc-read { display: block; min-height: 1em; }
.rcrow.saved img.thumb { max-height: 64px; width: auto; margin: 0; }

/* ④ 금액의 유류비 줄 — 입력이 아니라 계산 결과 (2026-09-15) */
.fuelline { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: baseline; padding: 10px 14px; margin: 0 0 12px; background: var(--k-bg); border-radius: 8px; font-size: 14px; font-weight: 600; }
.fuelline .val { font-size: 16px; }
.fuelline .hint { grid-column: 1 / -1; font-weight: 400; margin: 0; }
