:root{font-family:'Malgun Gothic','맑은 고딕',Arial,sans-serif;color:#19314f;--nav:#203961;--nav2:#2b4977;--muted:#6b7c91;--zoom:1;--rowheight:34px}
*{box-sizing:border-box}body{margin:0;background:#e8edf3;font-size:12px}.app{display:flex;flex-direction:column;height:100vh;min-height:570px;background:#f8fafc}
.filebar{display:flex;align-items:center;gap:11px;padding:8px 15px;background:#fff;border-bottom:1px solid #dbe3ed;min-height:55px}.filebar b{font-size:16px;color:#203961;display:block}.filebar span{color:#8190a0;font-size:11px}.file-icon{background:#20835e;color:#fff;font-weight:900;border-radius:7px;width:32px;height:34px;display:grid;place-items:center;font-size:19px}.filebar .chip{padding:6px 9px;font-size:11px;border:1px solid #ead49d;border-radius:6px;background:#fff5d6;color:#7d571b;font-weight:bold}.file-right{margin-left:auto;display:flex;gap:9px}.plain{background:#f1f4f8;color:#304a70;border:1px solid #dbe4f0;border-radius:6px;padding:7px 10px;cursor:pointer}
.sheetnav{display:flex;gap:2px;overflow:auto;scrollbar-width:thin;background:#192f52;padding:4px 13px 0;flex-shrink:0}.sheetnav button{border:0;background:transparent;color:#c7d4e7;min-width:max-content;padding:10px 13px;font-weight:bold;cursor:pointer;border-radius:6px 6px 0 0}.sheetnav button.active{background:#fff;color:#1e3b67}.sheetnav button:hover:not(.active){background:#324b72;color:#fff}
.ribbon{display:flex;gap:11px;align-items:center;background:#fff;padding:11px 13px 12px;border-bottom:1px solid #dae3eb;min-height:88px}.ribbon-title{flex:0 0 265px;max-width:285px;padding:12px 14px;background:#213a65;border-radius:3px;color:white;text-align:center}.main-title{font-size:19px;font-weight:800;letter-spacing:.1px}.mini{font-size:10px;color:#cbd8ed;padding-top:3px}.ribbon-actions{display:flex;align-content:start;align-items:center;flex-wrap:wrap;gap:5px}.ribbon-actions button{max-width:142px;border:0;border-radius:4px;padding:8px 10px;color:white;font-size:11px;font-weight:700;line-height:1.25;cursor:pointer;white-space:normal;text-align:center;box-shadow:inset 0 -2px rgba(0,0,0,.12)}.ribbon-actions button:hover{filter:brightness(1.11)}.btn-orange{background:#e88718}.btn-purple{background:#63458d}.btn-red{background:#c94132}.btn-blue{background:#3564aa}.btn-green{background:#168b66}.btn-indigo{background:#264b7a}.btn-teal{background:#167a8a}
.subtools{padding:9px 13px;display:flex;align-items:center;gap:9px;flex-shrink:0;min-height:48px;background:#edf3f8;border-bottom:1px solid #d9e2ee}.subtools label{font-weight:bold;white-space:nowrap}.subtools input{min-width:160px;width:270px;max-width:34vw;padding:7px 9px;border:1px solid #b6c5d9;border-radius:4px;background:white}.subtools button{padding:7px 9px;border:1px solid #bacbe0;border-radius:4px;background:#fff;color:#2e5074;cursor:pointer}.subhint{color:#687e96;font-size:11px}.subright{margin-left:auto;display:flex;align-items:center;gap:12px;white-space:nowrap}.subright select{padding:6px;border:1px solid #bbc8d8;color:#294567;background:white;border-radius:4px}
.worksheet-wrap{flex:1;min-height:0;padding:0;background:#fff}.grid-scroll{overflow:auto;width:100%;height:100%;scrollbar-color:#b0c0d4 #edf2f8}.grid{border-collapse:separate;border-spacing:0;table-layout:fixed;width:max-content;min-width:100%;font-size:calc(11px * var(--zoom));white-space:nowrap}.grid th,.grid td{border-right:1px solid #b6c5d6;border-bottom:1px solid #d2dde9;overflow:hidden;text-overflow:ellipsis;padding:5px 7px;height:var(--rowheight);max-width:380px}.grid thead th{position:sticky;z-index:2}.grid .letters th{top:0;background:#e8edf5;color:#516780;text-align:center;height:23px;padding:3px 5px;font-size:10px;border-bottom:1px solid #c8d2df}.grid .groups th{top:23px;background:#d8e7f4;color:#29446b;height:23px;font-size:10px;text-align:center}.grid .headers th{top:46px;background:#203961;color:#fff;font-weight:700;height:46px;padding:5px 9px;font-size:11px;white-space:normal;line-height:1.3;text-align:center;border-bottom:2px solid #18304c}.grid .rownum{background:#eff3f8!important;color:#718398!important;text-align:center!important;width:46px!important;min-width:46px!important;max-width:46px!important;position:sticky;left:0;z-index:4}.grid thead .rownum{z-index:8!important}.grid .id-col{position:sticky;left:46px;z-index:1;background:#fafcfe}.grid tbody tr:nth-child(even) td{background:#f6f9fd}.grid tbody tr:nth-child(even) .id-col{background:#f6f9fd}.grid tbody td{text-align:left;cursor:cell}.grid tbody tr:hover td{background:#ebf3ff!important}.grid tbody td.sel{box-shadow:inset 0 0 0 2px #0f8c5e;background:#e6f9ed!important}.grid .numeric{text-align:right}.grid .state-complete{color:#178259;font-weight:bold}.grid .state-warn{color:#b35b1c;font-weight:bold}.grid .check{color:#16815b;text-align:center;font-size:16px;font-weight:bold}.grid .grp-plan{background:#f6d9c3!important;color:#503c29!important}.grid .grp-performance{background:#ebc9e6!important;color:#613f5e!important}.grid .grp-stock{background:#ffe1a1!important;color:#655323!important}.grid .grp-mix{background:#d9edda!important;color:#355b3b!important}
.formula-bar{background:#fff;display:flex;align-items:center;gap:8px;min-height:38px;border-top:1px solid #d4dfea;padding:5px 13px}.formula-bar .fx-address{padding:5px 9px;border:1px solid #ced8e4;border-radius:3px;min-width:65px;text-align:center;font-weight:bold}.fx-sign{font-style:italic;color:#6d82a0;font-size:15px;padding:0 5px}.formula-bar input{flex:1;border:0;border-left:1px solid #d6e0eb;padding:5px 9px;color:#365071;background:#fff;outline:0;min-width:0}.read-only{color:#8a6a40;background:#fbf4e6;padding:5px 8px;border-radius:4px;white-space:nowrap}.footer{height:28px;display:flex;align-items:center;gap:8px;padding:5px 13px;background:#e8eef5;border-top:1px solid #cad6e6;color:#526981;font-size:11px}.green-dot{width:7px;height:7px;border-radius:50%;background:#269d72}.footer-right{margin-left:auto}.toast{position:fixed;right:20px;bottom:55px;max-width:360px;background:#253f60;color:#fff;padding:13px 17px;border-radius:7px;box-shadow:0 8px 20px #0002;z-index:30;line-height:1.7}
body.compact{--rowheight:25px}.compact .grid td{padding-top:2px;padding-bottom:2px}.compact .ribbon{min-height:70px;padding-top:5px;padding-bottom:5px}.compact .ribbon-title{padding:8px}
@media(max-width:900px){.ribbon{align-items:flex-start;flex-direction:column}.ribbon-title{flex:unset;width:100%;max-width:unset}.filebar .chip{display:none}.subhint{display:none}.footer-right{display:none}.read-only{display:none}}
@media print{.filebar,.sheetnav,.ribbon-actions,.subtools,.formula-bar,.footer{display:none!important}.app{height:auto}.worksheet-wrap,.grid-scroll{overflow:visible;height:auto}.grid th{position:static!important}}
