*{box-sizing:border-box}
:root{font-family:Inter,Pretendard,"Noto Sans KR","Malgun Gothic",system-ui,sans-serif;color:#1e2421;background:#f4f6f5}
body{margin:0;min-height:100vh;background:radial-gradient(circle at top left,rgba(62,207,142,.09),transparent 32rem),#f4f6f5}
button,input,select{font:inherit}
button{cursor:pointer}
.page-shell{width:min(1880px,calc(100% - 22px));margin:0 auto;min-height:100vh;padding:18px 0 28px}
.card,.app-shell{background:#fff;border:1px solid #e0e6e2;border-radius:15px;box-shadow:0 12px 38px rgba(20,35,29,.065)}
.login-card{width:min(430px,100%);padding:34px;margin:10vh auto 0}
.brand{display:flex;align-items:center;gap:14px;margin-bottom:30px}
.brand-mark{width:48px;height:48px;border-radius:14px;background:#1f9d68;color:#fff;display:grid;place-items:center;font-size:24px;font-weight:800}
.brand h1{margin:0;font-size:25px}.brand p{margin:5px 0 0;color:#77817c;font-size:14px}
label{display:block;margin:12px 0 6px;font-size:12px;font-weight:800;color:#38413c}
.login-card input{width:100%;height:46px;padding:0 13px;border:1px solid #cbd4cf;border-radius:9px;outline:none;background:#fff}
input:focus,select:focus{border-color:#1f9d68;box-shadow:0 0 0 3px rgba(31,157,104,.09);outline:none}
#loginButton{width:100%;height:47px;margin-top:22px;border:0;border-radius:9px;background:#1f9d68;color:#fff;font-weight:800}
#loginButton:disabled{cursor:wait;opacity:.65}.message{min-height:22px;margin:12px 0 0;font-size:13px;color:#c33}
.hidden{display:none!important}

.app-shell{padding:18px}.app-header{display:flex;justify-content:space-between;align-items:center;gap:18px;padding-bottom:14px;border-bottom:1px solid #e6ebe8}
.app-header h1{margin:2px 0 0;font-size:24px}.eyebrow{margin:0;color:#15945f;font-weight:800;font-size:10px;letter-spacing:.11em}
.header-actions{display:flex;align-items:center;gap:12px}.user-summary{font-size:12px;color:#59645e;font-weight:700}
.secondary-button,.primary-button{height:36px;padding:0 13px;border-radius:8px;font-weight:800;font-size:12px}
.secondary-button{border:1px solid #cdd6d1;background:#fff;color:#2a322e}.primary-button{border:1px solid #168b5b;background:#1f9d68;color:#fff}

.top-tabs{display:flex;gap:0;margin-top:12px;border-bottom:1px solid #dfe5e2}.tab{border:0;background:transparent;padding:10px 16px;font-size:13px;font-weight:800;color:#87908b;border-bottom:2px solid transparent}
.tab.active{color:#168b5b;border-bottom-color:#1f9d68}.tab:disabled{cursor:default}

.filters{display:flex;align-items:end;flex-wrap:wrap;gap:8px;padding:12px 0}.filter-inline{display:flex;align-items:end;gap:8px}
.filter-group{min-width:88px}.filter-group.period-type{min-width:105px}.filter-group.date-field{min-width:135px}
.filter-group.search-field{min-width:155px;flex:1 1 165px}.filter-group.manager-field{min-width:110px}.filter-group.receivable-field{min-width:108px}
.filter-group label{margin:0 0 4px}.filter-group input,.filter-group select{width:100%;height:36px;border:1px solid #cdd6d1;border-radius:8px;padding:0 9px;background:#fff;font-size:12px}
.filter-buttons{display:flex;gap:6px}

.summary-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 11px;background:#f0f8f3;border:1px solid #cfe5d7;border-radius:8px;font-size:12px}
.summary-bar>div:first-child{display:flex;align-items:center;gap:7px}.summary-right{display:flex;gap:14px;color:#66716b}
.status-dot{width:8px;height:8px;border-radius:50%;background:#27ae72;box-shadow:0 0 0 3px rgba(39,174,114,.12)}

.table-card{margin-top:10px;border:1px solid #dfe5e2;border-radius:9px;background:#fff;overflow:hidden}
.table-wrap{width:100%;overflow:auto;max-height:calc(100vh - 245px)}
table{border-collapse:separate;border-spacing:0;min-width:3600px;width:100%;font-size:11px}
thead th{position:sticky;z-index:4;color:#2f3833;font-weight:800;white-space:nowrap}
.group-row th{top:0;height:29px;text-align:center;border-bottom:1px solid #bfcac4}
.group-basic{background:#cddbd3}.group-settlement{background:#bfe3cd}.group-note{background:#d4dbe1}
.group-transport{background:#bfd9ec}.group-tax{background:#ead2aa}.group-logistics{background:#c9dfb8}
#headerRow th{top:29px;height:34px;border-bottom:1px solid #c0cbc5}
#headerRow th:not(.transport-sub):not(.tax-sub):not(.logistics-sub):not(.calc){background:#eef2ef}
.transport-sub{background:#dcebf5}.tax-sub{background:#f3e5cc}.logistics-sub{background:#e0ecd6}
th.calc{background:#d5e8dc}
th,td{height:33px;padding:0 8px;border-right:1px solid #dfe6e2;border-bottom:1px solid #e2e8e5;text-align:left;white-space:nowrap}
th:last-child,td:last-child{border-right:0}td.num,th.num{text-align:right;font-variant-numeric:tabular-nums}
.sortable{cursor:pointer;user-select:none}.sortable:hover{filter:brightness(.96)}.sort-icon{display:inline-block;min-width:10px;margin-left:3px;color:#157c51;font-size:9px}
tbody tr:hover td{background:#dff1e6}
tbody tr.row-active td{background:#ccebd8!important}
td.negative{color:#b62f2f;font-weight:700}.positive-receivable{color:#9c4d00;font-weight:800;background:#fff1d9}
td.readonly{background:#eef2ef;color:#58635d}td.editable{cursor:text}
td.editable:hover{outline:1px solid #66af88;outline-offset:-1px}
td.cell-focused{outline:2px solid #168b5b!important;outline-offset:-2px;position:relative;z-index:2}
td.editing{padding:0!important;background:#fff!important;outline:2px solid #0f7f50!important;outline-offset:-2px}
.cell-editor{width:100%;height:32px;border:0!important;border-radius:0!important;padding:0 7px!important;background:#fff;outline:none!important;box-shadow:none!important;font-size:11px}
.cell-editor.numeric{text-align:right;font-variant-numeric:tabular-nums}
.empty-cell{text-align:center;color:#7a8580;padding:30px!important;height:auto}.error-cell{text-align:center;color:#b83232;padding:30px!important;height:auto}
.footnote{margin:8px 2px 0;font-size:11px;color:#69746e}

.toast{position:fixed;right:20px;bottom:20px;z-index:9999;min-width:180px;max-width:380px;padding:11px 14px;border-radius:9px;background:#26312c;color:#fff;font-size:12px;font-weight:700;box-shadow:0 8px 28px rgba(0,0,0,.18)}
.toast.success{background:#177d53}.toast.error{background:#b43a3a}

@media(max-width:900px){
  .page-shell{width:min(100% - 10px,1880px);padding:8px 0 16px}.app-shell{padding:12px}.app-header{align-items:flex-start}
  .header-actions{align-items:flex-end;flex-direction:column;gap:6px}.filter-group.search-field{min-width:calc(50% - 4px)}
  .filter-buttons{width:100%}.filter-buttons button{flex:1}.summary-right{gap:8px}.table-wrap{max-height:calc(100vh - 330px)}
}
