*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:"Malgun Gothic","맑은 고딕","Apple SD Gothic Neo","Noto Sans KR",sans-serif;font-size:13px;color:#222;background:#eef1f5;min-height:100vh;display:flex;flex-direction:column}
a{color:#1a5fb4}
#demoBanner{background:#2b2f3a;color:#ffd75e;font-size:12px;text-align:center;padding:5px 10px}
#topHeader{background:#fff;border-bottom:1px solid #ddd}
.hdr{max-width:1280px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;padding:10px 16px}
.logo{display:flex;align-items:center;gap:8px;text-decoration:none;color:#333}
.logo .v{font-weight:900;color:#d7262e;font-size:24px;font-style:italic;letter-spacing:-2px}
.logo .t1{font-weight:700;font-size:17px;color:#333}
.logo .t2{font-weight:800;font-size:17px;color:#2a6fd6}
.logo .neo{background:#2a6fd6;color:#fff;border-radius:4px;font-size:11px;padding:2px 6px;font-weight:700}
.hdr-right{display:flex;align-items:center;gap:10px;font-size:12px;color:#555}
.hdr-right .shop{color:#1e88e5;font-weight:700}
.btn-sm{border:1px solid #aab;background:#f6f7fa;border-radius:3px;padding:3px 8px;font-size:12px;cursor:pointer}
#topNav{background:#4a4d55}
.navin{max-width:1280px;margin:0 auto;display:flex;flex-wrap:wrap}
.navin a{color:#eee;text-decoration:none;padding:9px 13px;font-size:13px;border-right:1px solid #5d6068}
.navin a:hover{background:#5d616b}
.navin a.on{background:#1e9be0;color:#fff;font-weight:700}
main{flex:1;width:100%;max-width:1280px;margin:0 auto;padding:14px 16px 30px}
#foot{background:#fff;border-top:1px solid #ddd;color:#777;font-size:12px;display:flex;gap:20px;justify-content:center;padding:12px}
.brand-sm{font-weight:700;color:#555}

/* main tiles */
.tiles{display:grid;grid-template-columns:repeat(5,1fr);border:1px solid #d9dce2;background:#f3f4f6}
.tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:18px 6px;border-right:1px solid #e1e3e8;border-bottom:1px solid #e1e3e8;text-decoration:none;color:#333;font-size:13px;background:#f3f4f6;min-height:118px}
.tile:hover{background:#e6f3fd}
.tile svg{width:52px;height:52px}
.tile .badge{background:#e53935;color:#fff;border-radius:9px;font-size:11px;padding:1px 7px;margin-top:-4px}
.dash{display:grid;grid-template-columns:1.1fr 1.4fr 1fr;gap:12px;margin-top:12px}
.box{background:#fff;border:1px solid #d9dce2;padding:12px}
.box h3{margin:0 0 8px;font-size:14px;color:#1d2b5a;display:flex;justify-content:space-between;align-items:center}
.box ul{margin:0;padding-left:16px;line-height:1.9}
.alert-item{display:flex;justify-content:space-between;align-items:center;padding:7px 0;border-bottom:1px dashed #e3e3e3}
.alert-item:last-child{border-bottom:none}
.alert-item b{color:#d32f2f}
.hello{background:linear-gradient(90deg,#1e88e5,#5e7ce2);color:#fff;padding:14px 16px;border-radius:4px;margin-bottom:12px;display:flex;justify-content:space-between;align-items:center}
.hello h2{margin:0;font-size:17px}

/* windows */
.win{background:#fbfbfd;border:2px solid #8f84bb;border-radius:4px;box-shadow:0 2px 6px rgba(0,0,0,.12);margin-bottom:14px}
.win-title{background:linear-gradient(#d8d0f0,#b5a8db);padding:5px 10px;display:flex;justify-content:space-between;align-items:center;font-weight:700;color:#2b2550}
.win-title h1{font-size:13px;margin:0}
.win-title .ctl{display:flex;gap:3px}
.win-title .ctl span{width:16px;height:14px;background:#6a5aa8;border-radius:2px;display:inline-block}
.win-title .ctl span:last-child{background:#5143a0}
.toolbar{display:flex;flex-wrap:wrap;gap:4px;padding:6px 8px;background:#f1f1f4;border-bottom:1px solid #cfcfe0}
.tb{display:inline-flex;align-items:center;gap:4px;border:1px solid #b9b9cc;background:linear-gradient(#fff,#e9e9f0);padding:4px 10px;border-radius:2px;font-size:12px;cursor:pointer;color:#222;text-decoration:none;font-family:inherit}
.tb:hover{background:#e3effd;border-color:#6aa0dc}
.tb.primary{background:linear-gradient(#4f9ff0,#2b7fd8);color:#fff;border-color:#2368b5;font-weight:700}
.tb.danger{color:#c62828}
.tb.right{margin-left:auto}
.tb i{display:inline-block;width:10px;height:10px;border-radius:2px;background:#5b8fd6}
.tb.primary i{background:#fff}
.win-body{padding:10px}
.tabs{display:flex;gap:2px;border-bottom:1px solid #b9b9cc;margin-bottom:8px}
.tabs button{border:1px solid #b9b9cc;border-bottom:none;background:#e8e8ef;padding:5px 12px;font-size:12px;cursor:pointer;font-family:inherit;border-radius:3px 3px 0 0}
.tabs button.on{background:#fff;font-weight:700;color:#1d2b5a;position:relative;top:1px}
.cols{display:grid;grid-template-columns:1.25fr 1fr;gap:10px}
fieldset{border:1px solid #cfd2dc;background:#fff;margin:0 0 8px;padding:8px 10px}
legend{font-weight:700;color:#1d2b5a;font-size:12px;padding:0 4px}
.fg{display:grid;grid-template-columns:86px 1fr 86px 1fr;gap:5px 8px;align-items:center}
.fg label,.lbl{font-weight:700;color:#1d2b5a;text-align:right;font-size:12px}
.fg .span3{grid-column:span 3}
input[type=text],input[type=number],input[type=date],input[type=tel],input[type=password],select,textarea{font-family:inherit;font-size:13px;border:1px solid #9aa3b5;padding:4px 6px;background:#fff;border-radius:2px;width:100%}
input:focus,select:focus,textarea:focus{outline:2px solid #8cc4ff;border-color:#2a7fd8}
input[readonly]{background:#f3f4f7}
textarea{resize:vertical;min-height:52px}
.inline{display:flex;gap:4px;align-items:center}
.inline input{flex:1}
.chk{display:inline-flex;align-items:center;gap:4px;font-size:12px;white-space:nowrap}
.hint{color:#666;font-size:12px}
.msg{padding:8px 10px;border-radius:3px;margin:6px 0;font-size:13px}
.msg.ok{background:#e8f5e9;border:1px solid #81c784;color:#1b5e20}
.msg.warn{background:#fff8e1;border:1px solid #ffca28;color:#7a5200}
.msg.err{background:#ffebee;border:1px solid #e57373;color:#b71c1c}
.msg.info{background:#e3f2fd;border:1px solid #64b5f6;color:#0d47a1}

/* grids */
table.grid{width:100%;border-collapse:collapse;background:#fff;font-size:12px}
table.grid th{background:#e4e7f0;color:#1d2b5a;border:1px solid #c5c9d6;padding:5px 6px;font-weight:700;white-space:nowrap}
table.grid td{border:1px solid #d6d9e2;padding:4px 6px;vertical-align:middle}
table.grid tr:hover td{background:#f2f8ff}
table.grid tr.sel td{background:#2f4f8f;color:#fff}
table.grid tr.sel td a{color:#fff}
table.grid td.num,table.grid th.num{text-align:right}
table.grid td.c,table.grid th.c{text-align:center}
table.grid input{padding:2px 4px;font-size:12px}
table.grid tfoot td{background:#f3f5fa;font-weight:700}
.red{color:#d32f2f}
.blue{color:#1565c0}
.green{color:#2e7d32}
.muted{color:#888}
.tag{display:inline-block;padding:1px 6px;border-radius:9px;font-size:11px;border:1px solid}
.tag.ing{color:#e65100;border-color:#ffb74d;background:#fff3e0}
.tag.done{color:#2e7d32;border-color:#81c784;background:#e8f5e9}
.tag.over{color:#c62828;border-color:#ef9a9a;background:#ffebee}
.tag.soon{color:#8d6e00;border-color:#ffd54f;background:#fffde7}
.tag.okk{color:#1565c0;border-color:#90caf9;background:#e3f2fd}
.tag.no{color:#777;border-color:#ccc;background:#f5f5f5}
.totals{display:flex;flex-wrap:wrap;gap:4px 22px;background:#e9f0fb;border:1px solid #b7c7e6;padding:8px 12px;margin-top:8px;font-size:13px}
.totals span b{color:#1d2b5a}
.totals span em{font-style:normal;color:#1565c0;text-decoration:underline;font-weight:700;margin-left:6px}
.totals span.mi em{color:#d32f2f}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px;margin:8px 0}
.card{background:#fff;border:1px solid #cfd6e6;border-radius:4px;padding:10px}
.card .k{font-size:12px;color:#556}
.card .v{font-size:18px;font-weight:800;color:#1d2b5a;margin-top:4px}
.card.red .v{color:#d32f2f}
.filters{display:flex;flex-wrap:wrap;gap:8px;align-items:center;background:#fff;border:1px solid #cfd2dc;padding:8px 10px;margin-bottom:8px}
.filters label{font-weight:700;color:#1d2b5a;font-size:12px}
.filters input,.filters select{width:auto}
.section-title{display:flex;align-items:center;gap:8px;margin:2px 0 10px}
.section-title h2{margin:0;font-size:15px;background:#1e9be0;color:#fff;padding:5px 14px;position:relative}
.section-title .crumb{color:#666;font-size:12px}

/* quick lookup */
.keypad{display:flex;gap:4px;flex-wrap:wrap}
.keypad button{width:44px;height:40px;background:linear-gradient(#8a5ab0,#6d3f96);color:#fff;font-size:18px;font-weight:700;border:1px solid #5a2f80;border-radius:2px;cursor:pointer}
.bigsearch{display:flex;gap:8px;align-items:center;margin-bottom:8px}
.bigsearch .lbl{font-size:16px}
.bigsearch input{font-size:24px;height:44px;width:200px}

/* login */
.login{max-width:560px;margin:30px auto;text-align:center;background:#fff;padding:30px 40px;border:1px solid #e3e6ec;border-radius:6px}
.login .sub{font-size:14px;color:#333}
.login h1{font-size:46px;color:#3d8fe0;margin:6px 0;font-weight:500}
.login .group{border:1px solid #cfd6e2;border-radius:5px;overflow:hidden;margin:16px 0 10px;text-align:left}
.login .group input{border:none;border-bottom:1px solid #e5e8ee;border-radius:0;font-size:15px;padding:14px}
.login .group input:last-child{border-bottom:none}
.login .go{width:100%;background:#4f94de;color:#fff;font-size:15px;border:none;border-radius:5px;padding:13px;cursor:pointer}
.login .demo{margin-top:14px;background:#f2f7fd;border:1px dashed #9cc0ea;padding:8px;font-size:12px;color:#355}

/* modal */
.modal-bg{position:fixed;inset:0;background:rgba(0,0,0,.35);display:flex;align-items:center;justify-content:center;z-index:50}
.modal{background:#fff;border:2px solid #8f84bb;border-radius:4px;min-width:380px;max-width:640px;width:90%;box-shadow:0 8px 30px rgba(0,0,0,.3)}
.modal .win-body{max-height:70vh;overflow:auto}
.modal .acts{display:flex;justify-content:flex-end;gap:6px;padding:8px 10px;border-top:1px solid #ddd;background:#f6f6f9}
#toast{position:fixed;right:20px;bottom:20px;z-index:60;display:flex;flex-direction:column;gap:6px}
#toast .t{background:#263238;color:#fff;padding:10px 14px;border-radius:4px;font-size:13px;box-shadow:0 3px 10px rgba(0,0,0,.25);max-width:420px}

/* doc (estimate print) */
.doc{background:#fff;border:1px solid #bbb;max-width:820px;margin:0 auto;padding:34px 40px;color:#111}
.doc h1{text-align:center;letter-spacing:18px;font-size:28px;margin:0 0 20px;border-bottom:3px double #333;padding-bottom:10px}
.doc table{width:100%;border-collapse:collapse;font-size:13px;margin-bottom:12px}
.doc th,.doc td{border:1px solid #555;padding:6px 8px}
.doc th{background:#f0f0f0}
.doc .num{text-align:right}
.doc .sum{font-size:16px;font-weight:800}
.doc .stamp{display:inline-block;border:2px solid #d32f2f;color:#d32f2f;border-radius:50%;width:54px;height:54px;line-height:50px;text-align:center;font-weight:800;transform:rotate(-12deg);margin-left:10px}
.chart{background:#fff;border:1px solid #cfd2dc;padding:10px;margin-top:10px}
.mini-list{max-height:260px;overflow:auto}
.sms-preview{background:#fffde7;border:1px solid #f0d96a;border-radius:10px;padding:10px 12px;white-space:pre-wrap;font-size:13px;min-height:60px}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width:900px){.tiles{grid-template-columns:repeat(3,1fr)}.dash,.cols,.two{grid-template-columns:1fr}.fg{grid-template-columns:80px 1fr}.fg .span3{grid-column:span 1}}
@media print{
  #demoBanner,#topHeader,#topNav,#foot,.noprint,.toolbar,#toast{display:none!important}
  body{background:#fff}
  main{padding:0;max-width:none}
  .doc{border:none;max-width:none;padding:0}
}
