:root{--bg:#f4f5f7;--card:#fff;--text:#17191c;--muted:#71757d;--line:#e3e6ea;--black:#17191c;--gold:#ad8b5d;--green:#248458;--red:#c84a4a}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans KR",sans-serif}a{text-decoration:none;color:inherit}
.topbar{min-height:68px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:28px;padding:10px 28px;position:sticky;top:0;z-index:5}.brand{display:flex;align-items:center;gap:10px;font-size:18px;font-weight:900}.brand-logo{display:block;height:28px;width:auto}.brand span{font-size:12px;color:var(--gold)}.topbar nav{display:flex;gap:17px;font-size:14px;font-weight:700}.account{margin-left:auto;display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted)}
.inline-form{display:inline;margin:0}.link-btn{border:1px solid var(--line);background:#fff;border-radius:8px;padding:7px 9px;cursor:pointer;color:var(--muted)}
.container{max-width:1180px;margin:auto;padding:28px}.container.no-user{max-width:none;padding:0}.hero{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:22px}.hero h1{margin:0 0 6px;font-size:27px}.hero p{margin:0;color:var(--muted)}
.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px}.stats .card span{display:block;color:var(--muted);font-size:13px;margin-bottom:10px}.stats .card strong{font-size:27px}
.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.section-head h2{font-size:18px;margin:0}.section-head a{font-size:13px;color:var(--muted)}
.btn{display:inline-block;border:0;border-radius:9px;padding:10px 14px;background:var(--black);color:#fff;font-weight:800;cursor:pointer}.btn.gold{background:var(--gold)}.btn.success{background:var(--green)}.btn.danger{background:var(--red)}.btn.light{background:#fff;color:var(--text);border:1px solid var(--line)}.btn.small{padding:7px 10px;font-size:12px}.btn.full{width:100%;padding:13px;margin-top:18px}
label{display:block;font-size:13px;font-weight:800;margin:16px 0 7px}input,select,textarea{width:100%;padding:11px 12px;border:1px solid #d9dde2;border-radius:9px;background:#fff;font:inherit}textarea{resize:vertical}.form-card{max-width:720px}.two{display:grid;grid-template-columns:1fr 1fr;gap:14px}.check{display:flex;align-items:center;gap:8px}.check input{width:auto}
.notice{background:#f8f5ef;border:1px solid #eadfce;border-radius:9px;padding:13px 14px;color:#6b5b45;font-size:13px;line-height:1.6;margin:16px 0}.flash{padding:12px 14px;border-radius:9px;margin-bottom:16px}.flash.success{background:#e9f6ee;color:#1d744a}.flash.error{background:#fdecec;color:#a93535}
.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:14px}th,td{text-align:left;padding:12px 10px;border-bottom:1px solid var(--line);white-space:nowrap}th{font-size:12px;color:var(--muted);background:#fafafa}.badge{font-size:12px;font-weight:800;padding:5px 8px;border-radius:999px}.badge.pending{background:#fff3dc;color:#94631d}.badge.approved{background:#e8f5ed;color:#1c7549}.badge.rejected{background:#fce9e9;color:#ad3838}.badge.cancelled{background:#ededee;color:#666}.process-form{display:flex;gap:6px;align-items:center}.process-form input{width:130px;padding:7px 9px}.empty{text-align:center;color:var(--muted);padding:30px}
.login-wrap{min-height:100vh;display:grid;place-items:center;padding:24px}.login-card{width:min(430px,100%);background:#fff;border:1px solid var(--line);border-radius:18px;padding:32px;box-shadow:0 12px 35px rgba(0,0,0,.06)}.login-logo{display:block;max-width:230px;height:auto}.sub{color:var(--muted);margin:12px 0 24px}
@media(max-width:900px){.stats{grid-template-columns:repeat(2,1fr)}.topbar nav{display:none}.container{padding:18px 14px}.account span{display:none}}
@media(max-width:620px){.topbar{padding:8px 14px}.brand-logo{height:24px}.brand span{display:none}.stats{grid-template-columns:1fr 1fr;gap:10px}.two{grid-template-columns:1fr}.hero{align-items:flex-start;flex-direction:column}.card{padding:15px}.process-form{min-width:320px}.login-logo{max-width:190px}}


/* Korean-style monthly calendar */
.calendar-card{margin-bottom:20px;padding:0;overflow:hidden}.calendar-head{display:flex;justify-content:space-between;align-items:center;padding:18px 20px 10px}.calendar-title-wrap{display:flex;align-items:center;gap:12px}.calendar-head h2{margin:0;font-size:23px;letter-spacing:-.5px}.calendar-today{font-size:12px;border:1px solid var(--line);border-radius:7px;padding:6px 9px;background:#fff}.calendar-controls{display:flex;gap:7px;align-items:center}.calendar-nav{width:34px;height:34px;border:1px solid var(--line);border-radius:8px;display:grid;place-items:center;background:#fff;font-size:24px;line-height:1}.calendar-legend{display:flex;gap:16px;padding:0 20px 13px;font-size:12px;color:var(--muted)}.calendar-legend span{display:flex;align-items:center;gap:6px}.legend-dot{width:8px;height:8px;border-radius:50%;display:inline-block}.legend-dot.schedule{background:#b08a52}.legend-dot.leave{background:#33815d}.legend-dot.holiday{background:#d64b4b}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.calendar-weekdays{border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:#fafafa}.calendar-weekdays>div{text-align:center;padding:9px 4px;font-size:12px;font-weight:800;color:#61656d}.calendar-weekdays .sun{color:#d14b4b}.calendar-weekdays .sat{color:#3972b8}.calendar-day{min-height:125px;padding:7px 7px 8px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:#fff;overflow:hidden}.calendar-day:nth-child(7n){border-right:0}.calendar-day.other-month{background:#fafafa;color:#b8bbc0}.calendar-day.today{box-shadow:inset 0 0 0 2px #17191c}.day-top{display:flex;justify-content:space-between;align-items:center;min-height:24px}.day-number{font-size:13px;font-weight:800}.calendar-day.sun .day-number{color:#d14b4b}.calendar-day.sat .day-number{color:#3972b8}.day-add{font-size:16px;color:#9b9fa6;width:21px;height:21px;border-radius:6px;display:grid;place-items:center}.day-add:hover{background:#f1f2f4;color:#111}.holiday-name{color:#d14b4b;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:4px}.day-events{display:flex;flex-direction:column;gap:3px}.calendar-event{display:block;border-radius:4px;padding:3px 5px;font-size:10.5px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.calendar-event.schedule{background:#f3ede5;color:#6c5537}.calendar-event.category-meeting{background:#eceff4;color:#3f4b5d}.calendar-event.category-deadline{background:#fdecec;color:#a83c3c}.calendar-event.category-event{background:#f4ecf6;color:#70477c}.calendar-event.category-other{background:#eeeeef;color:#575b61}.calendar-event.leave{background:#e9f5ee;color:#24734e}.more-events{font-size:10px;color:var(--muted);padding-left:4px}.actions{display:flex;gap:6px;align-items:center}.actions form{margin:0}.form-actions{display:flex;gap:8px;margin-top:18px}
@media(max-width:760px){.calendar-head{align-items:flex-start;gap:10px}.calendar-legend{overflow:auto}.calendar-day{min-height:100px;padding:5px}.calendar-event{font-size:9px;padding:2px 3px}.holiday-name{font-size:8.5px}.day-add{display:none}.calendar-head .btn{display:none}}

.notification-card{margin-bottom:20px}
.notification-status-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-bottom:16px;border-bottom:1px solid var(--line)}
.notification-label{font-size:12px;color:var(--muted);margin-bottom:5px}
.push-actions{display:flex;gap:8px;flex-wrap:wrap}
.push-message{min-height:20px;margin:13px 0 0;font-size:13px;color:var(--green)}
.push-message.error{color:var(--red)}
.ios-guide{margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}
.ios-guide h3{font-size:15px;margin:0 0 8px}
.ios-guide p{font-size:13px;color:var(--muted);line-height:1.7;margin:0}
.notification-check{margin-top:16px}
@media(max-width:620px){.notification-status-row{align-items:flex-start}.push-actions .btn{width:100%;text-align:center}}

/* v6: 로그인 전 달력 / 직원 달력 / 시스템 설정 */
.login-layout{
  width:min(1120px,100%);
  display:grid;
  grid-template-columns:minmax(340px,430px) minmax(0,1fr);
  gap:22px;
  align-items:stretch;
}
.login-wrap{padding:24px}
.login-card{width:100%;align-self:stretch}
.login-calendar-panel{min-width:0}
.public-calendar-card{
  height:100%;
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:24px;
  box-shadow:0 12px 35px rgba(0,0,0,.04);
}
.public-calendar-days .public-day{min-height:78px}
.public-calendar-note{
  margin-top:12px;
  color:var(--muted);
  font-size:12px;
  line-height:1.6;
}
.employee-calendar-section{margin-bottom:20px}
.employee-calendar-section .calendar-card{margin:0}
.section-kicker{font-size:12px;font-weight:800;color:var(--gold);margin:0 0 8px}
.leave-period-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:#fff8ed;
  border:1px solid #ead6b8;
  border-radius:12px;
  padding:13px 15px;
  margin-bottom:16px;
  font-size:13px;
}
.leave-period-banner b{color:#76562d}
.leave-period-banner span{font-weight:800}
.leave-period-toggle{margin-top:0}
.push-server-status{
  margin-top:18px;
  border:1px solid var(--line);
  border-radius:10px;
  padding:13px 14px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  font-size:13px;
}
.push-log-box{margin-top:18px;border-top:1px solid var(--line);padding-top:16px}
.push-log-box h3{font-size:14px;margin:0 0 10px}
.push-log-row{display:flex;align-items:flex-start;gap:10px;padding:9px 0;border-bottom:1px solid var(--line)}
.push-log-row>div{min-width:0}
.push-log-row b{display:block;font-size:12px}
.push-log-row small{display:block;margin-top:3px;color:var(--muted);font-size:11px;white-space:normal;word-break:break-word}

@media(max-width:900px){
  .login-layout{grid-template-columns:1fr;max-width:720px}
  .login-card{max-width:none}
  .public-calendar-days .public-day{min-height:72px}
}
@media(max-width:620px){
  .login-wrap{display:block;padding:12px}
  .login-layout{display:flex;flex-direction:column;gap:12px;width:100%}
  .login-card,.public-calendar-card{border-radius:14px;padding:17px}
  .public-calendar-card{overflow:hidden}
  .public-calendar-days .public-day{min-height:62px;padding:5px}
  .public-calendar-days .holiday-name{font-size:9px;line-height:1.15;white-space:normal}
  .public-calendar-days .day-number{font-size:12px}
  .employee-calendar-section .calendar-card{padding:12px}
  .employee-calendar-section .calendar-day{min-height:70px}
  .leave-period-banner{align-items:flex-start;flex-direction:column;gap:4px}
}

/* v7 직원별 연차 신청 가능기간 */
.settings-help{margin:5px 0 0;color:var(--muted);font-size:13px}
.employee-period-table input[type="date"]{min-width:155px;padding:8px 9px}
.period-switch{display:flex;align-items:center;gap:8px;margin:0;font-weight:700;font-size:12px;white-space:nowrap}
.period-switch input{width:auto;margin:0}
.settings-bottom-actions{display:flex;justify-content:flex-end;margin-top:16px}
@media(max-width:620px){
  .employee-period-table{min-width:760px}
  .settings-bottom-actions .btn{width:100%}
}

/* v8 담당자 권한 */
.manager-menu{color:#8c6838!important}
.manager-quick-card{margin-bottom:20px;border-color:#e7d8c1;background:#fffcf7}
.manager-actions{display:flex;gap:8px;flex-wrap:wrap}
.permission-table input[type="checkbox"]{width:auto;margin:0}
.permission-check{display:flex;align-items:center;gap:7px;margin:0;font-size:12px;white-space:nowrap}
.permission-check span{font-weight:700}
@media(max-width:620px){
  .permission-table{min-width:700px}
  .manager-actions .btn{flex:1 1 calc(50% - 8px);text-align:center}
}

/* v9 dashboard + accounting */
.container{max-width:1440px}
.accounting-menu{color:#916731!important;font-weight:900!important}
.home-split-dashboard{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(330px,.8fr);gap:16px;align-items:start;margin-bottom:20px}
.home-split-dashboard .calendar-card{margin:0}.home-report-pane{position:sticky;top:84px}.accounting-report-widget{padding:18px}.accounting-report-head{margin-bottom:12px}.report-kpi-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.report-kpi{border:1px solid var(--line);border-radius:10px;padding:11px;background:#fafafa}.report-kpi span,.report-kpi b,.report-kpi small{display:block}.report-kpi span{font-size:11px;color:var(--muted)}.report-kpi b{font-size:16px;margin-top:4px}.report-kpi small{font-size:10px;color:var(--muted);margin-top:3px}.report-kpi.sales{border-left:3px solid #2b805a}.report-kpi.purchase{border-left:3px solid #bc6f55}.report-kpi.difference{border-left:3px solid #ad8b5d}.report-kpi.pending{border-left:3px solid #c89731}.report-mini-section{margin-top:15px}.report-mini-section h3{font-size:12px;margin:0 0 6px;color:var(--muted)}.report-row{display:flex;justify-content:space-between;gap:10px;padding:6px 0;border-bottom:1px solid #eee;font-size:11px}.report-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.report-row b{white-space:nowrap}.report-row small{color:var(--muted)}.report-empty{font-size:11px;color:var(--muted);padding:10px 0}.report-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:14px}
.accounting-hero{align-items:center}.accounting-actions{display:flex;gap:8px}.month-switcher{display:flex;justify-content:center;align-items:center;gap:20px;margin:-4px 0 18px}.month-switcher a{padding:7px 10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--muted);font-size:12px}.accounting-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:16px}.accounting-kpi{background:#fff;border:1px solid var(--line);border-radius:14px;padding:17px}.accounting-kpi span,.accounting-kpi strong,.accounting-kpi small{display:block}.accounting-kpi span{font-size:12px;color:var(--muted)}.accounting-kpi strong{font-size:21px;margin-top:7px}.accounting-kpi small{font-size:11px;color:var(--muted);margin-top:5px}.accounting-grid{display:grid;gap:16px;margin-bottom:16px}.accounting-grid.two-col{grid-template-columns:1.3fr .7fr}.sales-bars{display:flex;flex-direction:column;gap:7px;max-height:330px;overflow:auto}.sales-bar-row{display:grid;grid-template-columns:48px 1fr 95px;gap:8px;align-items:center;font-size:11px}.sales-bar-track{height:10px;background:#f1f1f1;border-radius:999px;overflow:hidden}.sales-bar-fill{height:100%;background:#ad8b5d;border-radius:999px}.sales-bar-row b{text-align:right}.rank-list>div{display:flex;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid var(--line);font-size:12px}.rank-list small{color:var(--muted)}.shortcut-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.shortcut-grid a{padding:12px;border:1px solid var(--line);border-radius:9px;background:#fafafa}.shortcut-grid b,.shortcut-grid span{display:block}.shortcut-grid b{font-size:12px}.shortcut-grid span{font-size:10px;color:var(--muted);margin-top:3px}
.quick-sales-card{padding:0;overflow:hidden}.quick-date-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:15px 17px;border-bottom:1px solid var(--line)}.quick-date-row label{margin:0}.quick-date-row input,.quick-date-row select{width:auto;min-width:130px}.quick-sales-table{min-width:1160px}.quick-sales-table th,.quick-sales-table td{padding:6px 5px}.quick-sales-table input,.quick-sales-table select{padding:8px 6px;font-size:12px}.quick-sales-table .qty-input{width:65px}.quick-sales-table .price-input,.quick-sales-table .amount-input{width:100px}.quick-sales-footer{display:flex;justify-content:flex-end;align-items:center;gap:20px;padding:14px 17px;background:#fafafa;border-top:1px solid var(--line)}.quick-sales-footer strong{font-size:18px}
.filter-card{margin-bottom:14px;padding:14px 16px}.accounting-filter{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.accounting-filter input{width:100px}.accounting-filter select{width:auto;min-width:120px}.filter-summary{font-size:12px;color:var(--muted);margin-top:9px}.accounting-table .row-actions{display:flex;gap:4px}.accounting-table .row-actions form{margin:0}.three{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.form-actions{display:flex;gap:8px;margin-top:18px}.product-add-card{margin-bottom:14px}.product-add-form{display:grid;grid-template-columns:2fr 1fr 1fr 90px auto;gap:8px}.product-table input[name="name"]{min-width:260px}
@media(max-width:1050px){.home-split-dashboard{grid-template-columns:1fr}.home-report-pane{position:static}.accounting-grid.two-col{grid-template-columns:1fr}.accounting-kpis{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.container{padding:12px}.home-split-dashboard{gap:10px}.home-split-dashboard .calendar-card{padding:11px}.report-kpi b{font-size:14px}.accounting-kpis{grid-template-columns:1fr 1fr;gap:8px}.accounting-kpi{padding:12px}.accounting-kpi strong{font-size:16px}.accounting-actions{width:100%}.accounting-actions .btn{flex:1;text-align:center}.quick-date-row{align-items:flex-start}.quick-sales-footer{position:sticky;bottom:0;z-index:2;justify-content:space-between}.three{grid-template-columns:1fr}.product-add-form{grid-template-columns:1fr}.shortcut-grid{grid-template-columns:1fr 1fr}}

/* v10 거래처관리 */
.vendor-add-card{margin-bottom:14px}
.vendor-add-form{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr 1.2fr 1.4fr auto;gap:8px}
.vendor-add-form input{min-width:0}
.vendor-table{min-width:1200px}
.vendor-table input{min-width:120px;padding:7px 8px;font-size:12px}
.vendor-table input[name="name"]{min-width:180px}
.field-link{float:right;font-size:11px;color:var(--gold);font-weight:700}
#vendorDirect{margin-top:7px}
@media(max-width:900px){.vendor-add-form{grid-template-columns:1fr 1fr 1fr}}
@media(max-width:620px){.vendor-add-form{grid-template-columns:1fr}}

/* v11 daily accounting report */
.today-report-widget .report-kpi-grid{margin-bottom:2px}
.mini-title-row{display:flex;justify-content:space-between;align-items:center;gap:8px}
.mini-title-row h3{margin:0!important}
.mini-title-row>span{font-size:9px;color:var(--muted);white-space:nowrap}
.mini-legend{display:inline-block;width:7px;height:7px;border-radius:2px;margin:0 3px 0 6px}
.mini-legend.sales{background:#2b805a}.mini-legend.purchase{background:#bc6f55}
.mini-daily-chart{height:112px;display:grid;grid-template-columns:repeat(7,1fr);gap:4px;align-items:end;margin-top:8px;border-bottom:1px solid var(--line)}
.mini-day-column{height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:3px}
.mini-bars{height:86px;width:100%;display:flex;gap:2px;align-items:flex-end;justify-content:center}
.mini-bar{display:block;width:8px;min-height:2px;border-radius:2px 2px 0 0}
.mini-bar.sales{background:#2b805a}.mini-bar.purchase{background:#bc6f55}
.mini-day-column>span{font-size:8.5px;color:var(--muted);padding-bottom:3px}

.daily-report-chart-card{margin-bottom:16px}
.daily-graph-legend{display:flex;gap:12px;font-size:11px;color:var(--muted)}
.daily-graph-legend span{display:flex;align-items:center;gap:5px}
.daily-graph-legend i{width:9px;height:9px;border-radius:2px;display:inline-block}
.daily-graph-legend i.sales{background:#2b805a}.daily-graph-legend i.purchase{background:#bc6f55}
.daily-month-chart{height:260px;display:flex;gap:5px;align-items:flex-end;overflow-x:auto;padding:14px 4px 4px;border-bottom:1px solid var(--line)}
.daily-chart-column{min-width:27px;flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:5px}
.daily-chart-bars{height:220px;width:100%;display:flex;align-items:flex-end;justify-content:center;gap:2px}
.daily-chart-bar{width:8px;min-height:1px;border-radius:3px 3px 0 0;transition:.15s}
.daily-chart-column:hover .daily-chart-bar{filter:brightness(.88)}
.daily-chart-bar.sales{background:#2b805a}.daily-chart-bar.purchase{background:#bc6f55}
.daily-chart-column>b{font-size:9px;color:var(--muted);font-weight:700}
.daily-accounting-table{min-width:680px}
.daily-accounting-table .money{text-align:right;font-variant-numeric:tabular-nums}
.daily-accounting-table .sales-money{color:#216e4d}.daily-accounting-table .purchase-money{color:#a25742}
.daily-accounting-table .today-row{background:#fff8eb}
.excel-import-card{margin:16px 0}
.excel-import-form{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.excel-import-form input[type="file"]{max-width:360px}
.excel-import-form .check{margin:0;display:flex;align-items:center;gap:6px;font-size:12px}
.recent-imports{display:flex;flex-direction:column;gap:4px;margin-top:12px;font-size:11px;color:var(--muted)}
.recent-imports>b{color:var(--text)}
.day-detail-grid{grid-template-columns:1fr 1fr}
@media(max-width:1050px){.day-detail-grid{grid-template-columns:1fr}}
@media(max-width:620px){
  .daily-month-chart{height:210px}.daily-chart-bars{height:170px}.daily-chart-column{min-width:23px}
  .excel-import-form{align-items:stretch;flex-direction:column}.excel-import-form input[type="file"]{max-width:none;width:100%}
}

/* v12 달력 거래처별 매출 */
.calendar-sales-box{display:block;margin:3px 0 4px;padding:4px 5px;border:1px solid #dce9e2;border-radius:6px;background:#f4faf6;color:#24382f;text-decoration:none}
.calendar-sales-box:hover{background:#ecf6f0;border-color:#c7ddcf}
.calendar-sales-total,.calendar-sales-customer{display:flex;justify-content:space-between;gap:5px;align-items:center;line-height:1.25}
.calendar-sales-total{font-size:9.5px;margin-bottom:2px}
.calendar-sales-total span{font-weight:800;color:#267150}
.calendar-sales-total b{font-size:9.5px;color:#1f5f43;white-space:nowrap}
.calendar-sales-customer{font-size:8.5px;color:#59675f}
.calendar-sales-customer span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:62%}
.calendar-sales-customer b{font-size:8.5px;font-weight:700;white-space:nowrap}
.calendar-sales-more{font-size:8px;color:#748078;margin-top:2px}
.quick-sales-table{min-width:1320px}
.quick-sales-table .customer-input{min-width:120px}
@media(max-width:620px){
  .calendar-sales-box{padding:3px 4px}
  .calendar-sales-customer{display:none}
  .calendar-sales-more{display:none}
  .calendar-sales-total span,.calendar-sales-total b{font-size:8px}
}

/* v13 final dashboard */
.calendar-day{min-height:205px}
.sales-matrix-box{padding:5px 6px}
.calendar-sales-total{font-size:9px;border-bottom:1px solid #dce9e2;padding-bottom:3px;margin-bottom:4px}
.calendar-sales-total span,.calendar-sales-total b{font-size:9px}
.calendar-sales-matrix{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.calendar-sales-col{min-width:0;border-right:1px solid #e4eee8;padding-right:4px}
.calendar-sales-col:last-child{border-right:0;padding-right:0}
.calendar-sales-col>div{display:flex;justify-content:space-between;gap:3px;font-size:7.8px;line-height:1.45}
.calendar-sales-col span{color:#66736c;white-space:nowrap}.calendar-sales-col b{font-size:7.8px;white-space:nowrap;color:#2f3e36}
.calendar-sales-col.qty span,.calendar-sales-col.qty b{color:#775f3f}
.sales-total-hero{border:1px solid #d8e7de;border-left:4px solid #2b805a;border-radius:11px;background:#f5faf7;padding:14px;margin-bottom:14px}
.sales-total-hero span,.sales-total-hero strong{display:block}.sales-total-hero span{font-size:11px;color:#617067}.sales-total-hero strong{font-size:24px;margin-top:5px;color:#205e43}
.report-section-title{font-size:11px;font-weight:800;color:#72777d;margin:13px 0 6px}
.delivery-report-grid,.product-qty-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.delivery-report-grid>div,.product-qty-grid>div{border:1px solid var(--line);border-radius:9px;background:#fafafa;padding:9px 10px}
.delivery-report-grid span,.delivery-report-grid b,.product-qty-grid span,.product-qty-grid b{display:block}
.delivery-report-grid span,.product-qty-grid span{font-size:10px;color:var(--muted)}.delivery-report-grid b{font-size:13px;margin-top:3px}.product-qty-grid b{font-size:15px;margin-top:3px;color:#765d3e}
.sales-only-chart .mini-day-column small{font-size:7px;color:#878b90;white-space:nowrap;max-width:44px;overflow:hidden;text-overflow:ellipsis}
.sales-only-chart .mini-bars{height:90px}.sales-only-chart .mini-bar.single{width:13px}
.report-legacy-note{font-size:9px;color:#999;background:#fafafa;border-radius:7px;padding:7px 8px;margin-top:10px}
@media(max-width:760px){.home-calendar-pane{overflow-x:auto}.home-calendar-pane .calendar-card{min-width:860px}.calendar-day{min-height:195px}}

/* v14 배송처별 제품수량 + 7일 배송분할 그래프 */
.delivery-detail-stack{display:flex;flex-direction:column;gap:8px}
.delivery-detail-card{border:1px solid var(--line);border-radius:10px;padding:9px 10px;background:#fcfcfc}
.delivery-detail-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}
.delivery-detail-head strong{font-size:11px}
.delivery-detail-head b{font-size:13px;white-space:nowrap}
.delivery-product-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}
.delivery-product-grid>div{background:#f7f7f7;border-radius:7px;padding:6px 5px;text-align:center}
.delivery-product-grid span,.delivery-product-grid b{display:block}
.delivery-product-grid span{font-size:8.5px;color:var(--muted)}
.delivery-product-grid b{font-size:11px;margin-top:2px}
.delivery-general{border-left:3px solid #7a8b83}
.delivery-rocket{border-left:3px solid #a56554}
.delivery-n{border-left:3px solid #4d8062}
.delivery-star{border-left:3px solid #a88752}

.split-legend{font-size:8px!important;display:flex;align-items:center;gap:3px!important}
.split-legend i{display:inline-block;width:7px;height:7px;border-radius:2px;margin-left:4px}
.legend-general,.split-bar.general{background:#7a8b83}
.legend-rocket,.split-bar.rocket{background:#a56554}
.legend-n,.split-bar.n{background:#4d8062}
.legend-star,.split-bar.star{background:#a88752}

.split-week-chart{height:135px;display:grid;grid-template-columns:repeat(7,1fr);gap:4px;align-items:end;border-bottom:1px solid var(--line);margin-top:7px}
.split-day{height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:2px;min-width:0}
.split-bars{height:98px;width:100%;display:flex;align-items:flex-end;justify-content:center;gap:2px}
.split-bar{display:block;width:6px;min-height:1px;border-radius:2px 2px 0 0}
.split-day>span{font-size:8px;color:var(--muted)}
.split-day>small{font-size:6.8px;color:#90959a;white-space:nowrap;max-width:45px;overflow:hidden;text-overflow:ellipsis;padding-bottom:2px}
.qty-chart{height:120px}
.qty-chart .split-bars{height:84px}

@media(max-width:620px){
  .delivery-product-grid{grid-template-columns:repeat(4,1fr)}
  .delivery-product-grid span{font-size:8px}
  .delivery-product-grid b{font-size:10px}
  .split-week-chart{height:125px}
  .split-bars{height:90px}
  .split-bar{width:5px}
}

/* v15.4 calendar readability */
.sales-matrix-box{padding:5px 6px;overflow:hidden}
.calendar-sales-total{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:4px;
  align-items:center;
}
.calendar-sales-total b{
  min-width:0;
  text-align:right;
  overflow:hidden;
  text-overflow:ellipsis;
  font-variant-numeric:tabular-nums;
}
.calendar-sales-matrix{
  grid-template-columns:minmax(0,1.45fr) minmax(32px,.55fr);
  gap:4px;
}
.calendar-sales-col{
  overflow:hidden;
  padding-right:4px;
}
.calendar-sales-col>div{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:3px;
  align-items:center;
  line-height:1.5;
}
.calendar-sales-col>div span{
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.calendar-sales-col>div b{
  min-width:0;
  text-align:right;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  font-variant-numeric:tabular-nums;
}
.calendar-sales-col.qty{
  padding-left:2px;
}
.calendar-sales-col.qty>div{
  grid-template-columns:auto auto;
}
.calendar-sales-col.qty span,
.calendar-sales-col.qty b{
  font-size:7.6px;
}
@media(min-width:1200px){
  .calendar-sales-col>div,
  .calendar-sales-col>div b{
    font-size:8px;
  }
}

/* v15.5 home sales report date navigation */
.report-date-nav{
  display:grid;
  grid-template-columns:32px minmax(0,1fr) 32px auto;
  gap:6px;
  align-items:center;
  margin:-2px 0 12px;
}
.report-date-arrow,
.report-today-btn{
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  color:var(--text);
  text-decoration:none;
  font-size:15px;
  font-weight:800;
}
.report-date-arrow.disabled{
  color:#c8c8c8;
  background:#fafafa;
  cursor:not-allowed;
}
.report-today-btn{
  padding:0 9px;
  font-size:10px;
  color:#8a6841;
  white-space:nowrap;
}
.report-date-form{margin:0}
.report-date-form input[type="date"]{
  width:100%;
  height:32px;
  margin:0;
  padding:5px 8px;
  border-radius:8px;
  font-size:11px;
  text-align:center;
  background:#fff;
}
@media(max-width:620px){
  .report-date-nav{grid-template-columns:30px minmax(0,1fr) 30px auto}
  .report-date-arrow,.report-today-btn,.report-date-form input[type="date"]{height:30px}
}

/* v15.6 달력 총매출은 원 단위 전체 숫자 표시 */
.calendar-sales-total{
  grid-template-columns:auto 1fr;
}
.calendar-sales-total b{
  font-size:8.6px;
  letter-spacing:-0.2px;
  text-overflow:clip;
}

/* v15.7 itemized daily sales */
.day-sales-detail-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(300px,.85fr);gap:16px;align-items:start}
.day-sales-main{display:flex;flex-direction:column;gap:14px}.legacy-detail-card{margin:0}
.item-sales-table{min-width:620px}.item-sales-table th:nth-child(1){width:52%}.item-sales-table th:nth-child(2){width:16%}.item-sales-table th:nth-child(3){width:12%}.item-sales-table th:nth-child(4){width:20%}
.item-sales-table .number-cell{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.detail-fulfillment{display:inline-block;padding:3px 6px;border:1px solid var(--line);border-radius:6px;background:#fafafa;font-size:10px;white-space:nowrap}
.day-purchase-side{position:sticky;top:76px}.detail-source-note{margin-top:12px;font-size:10px;color:#858585;text-align:right}
@media(max-width:1050px){.day-sales-detail-layout{grid-template-columns:1fr}.day-purchase-side{position:static}}

/* v15.8 monthly itemized sales table */
.monthly-detail-card{overflow:hidden}
.monthly-detail-wrap{
  overflow-x:auto;
  border:1px solid var(--line);
  border-radius:10px;
}
.monthly-qty-table{
  width:100%;
  min-width:1480px;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
}
.monthly-qty-table th,
.monthly-qty-table td{
  border-right:1px solid #dfe3e6;
  border-bottom:1px solid #e5e8ea;
  padding:9px 7px;
  text-align:center;
  vertical-align:middle;
  font-size:11px;
  background:#fff;
}
.monthly-qty-table th:last-child,
.monthly-qty-table td:last-child{border-right:0}
.monthly-qty-table thead th{
  font-weight:800;
  color:#3c4146;
  background:#f8f9fa;
}
.monthly-qty-table .monthly-group-header th{
  border-bottom:1px solid #cfd5da;
}
.monthly-qty-table .shipping-group{
  font-size:12px;
  letter-spacing:-.2px;
}
.monthly-qty-table .general-group{
  background:#f3f8f5;
  color:#2e684e;
}
.monthly-qty-table .warehouse-group{
  background:#f8f5ef;
  color:#80633c;
}
.monthly-qty-table .monthly-item-header th{
  font-size:10px;
  padding-top:7px;
  padding-bottom:7px;
}
.monthly-qty-table .monthly-item-header small{
  font-size:8px;
  color:#8d9399;
  white-space:nowrap;
}
.monthly-qty-table .group-right{
  border-right:2px solid #bfc6cb!important;
}
.monthly-qty-table .group-left{
  border-left:1px solid #bfc6cb!important;
}
.monthly-qty-table .date-cell{
  text-align:left;
  padding-left:10px;
  white-space:nowrap;
}
.monthly-qty-table .weekday-cell{
  font-weight:700;
}
.monthly-qty-table .qty-cell{
  font-variant-numeric:tabular-nums;
  font-weight:700;
  color:#315d49;
}
.monthly-qty-table .warehouse-cell{
  color:#775f3f;
  background:#fffdfa;
}
.monthly-qty-table .money{
  text-align:right;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
  padding-right:10px;
}
.monthly-qty-table .detail-link-cell{
  white-space:nowrap;
}
.monthly-qty-table .today-row td{
  background:#fff7e8;
}
.monthly-qty-table .today-row .warehouse-cell{
  background:#fff4df;
}
.monthly-table-note{
  margin-top:9px;
  font-size:10px;
  color:#777f86;
  line-height:1.5;
}
@media(max-width:760px){
  .monthly-qty-table{min-width:1420px}
  .monthly-qty-table th,
  .monthly-qty-table td{padding:8px 6px}
}

/* v15.9 월 일자별 표 가로폭 압축 - PC에서 가로스크롤 없이 표시 */
.monthly-detail-wrap{
  overflow-x:hidden;
}
.monthly-qty-table{
  width:100%;
  min-width:0 !important;
  table-layout:fixed;
}
.monthly-qty-table col.col-date{width:8%}
.monthly-qty-table col.col-weekday{width:4%}
.monthly-qty-table col.col-qty{width:4.5%}
.monthly-qty-table col.col-sales{width:10%}
.monthly-qty-table col.col-purchase{width:8%}
.monthly-qty-table col.col-difference{width:11%}
.monthly-qty-table col.col-detail{width:5%}

.monthly-qty-table th,
.monthly-qty-table td{
  padding:7px 3px;
  font-size:10px;
  line-height:1.2;
  overflow:hidden;
  text-overflow:ellipsis;
}
.monthly-qty-table .monthly-group-header th{
  padding-top:8px;
  padding-bottom:8px;
  font-size:10.5px;
}
.monthly-qty-table .monthly-item-header th{
  padding:6px 2px;
  font-size:9px;
}
.monthly-qty-table .monthly-item-header small{
  font-size:7px;
}
.monthly-qty-table .date-cell{
  padding-left:5px;
  font-size:9px;
}
.monthly-qty-table .weekday-cell{
  padding-left:1px;
  padding-right:1px;
  font-size:9px;
}
.monthly-qty-table .qty-cell{
  padding-left:1px;
  padding-right:1px;
  font-size:9px;
}
.monthly-qty-table .money{
  padding-left:3px;
  padding-right:5px;
  font-size:9px;
}
.monthly-qty-table .detail-link-cell{
  padding-left:2px;
  padding-right:2px;
}
.monthly-qty-table .detail-link-cell .btn{
  padding:5px 6px;
  font-size:8.5px;
}

/* 넓은 모니터에서는 아주 약간 여유 있게 */
@media(min-width:1500px){
  .monthly-qty-table th,
  .monthly-qty-table td{font-size:10.5px}
  .monthly-qty-table .qty-cell,
  .monthly-qty-table .weekday-cell,
  .monthly-qty-table .date-cell,
  .monthly-qty-table .money{font-size:9.5px}
}

/* 모바일/태블릿은 정보가 많아 최소폭을 유지하고 표만 좌우 스크롤 */
@media(max-width:900px){
  .monthly-detail-wrap{overflow-x:auto}
  .monthly-qty-table{min-width:1080px !important}
}

/* v16 monthly footer totals + home monthly product totals */
.monthly-qty-table tfoot th{
  border-right:1px solid #cfd5da;
  border-top:2px solid #9da8b0;
  border-bottom:0;
  background:#f2f4f5;
  padding:9px 3px;
  font-size:9px;
  font-weight:900;
  text-align:center;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.monthly-qty-table tfoot .total-label{
  text-align:left;
  padding-left:6px;
  font-size:10px;
}
.monthly-qty-table tfoot .total-qty-label{
  color:#555f66;
  font-size:8.5px;
}
.monthly-qty-table tfoot .money{
  text-align:right;
  padding-right:5px;
}
.monthly-qty-table tfoot .total-sales{color:#287554}
.monthly-qty-table tfoot .total-purchases{color:#a05e48}
.monthly-qty-table tfoot .total-difference{color:#111}

.month-product-title{
  margin-top:0;
}
.monthly-product-total-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:6px;
  margin-bottom:10px;
}
.monthly-product-total-grid>div{
  border:1px solid #e1e4e6;
  border-radius:9px;
  background:#fafafa;
  padding:8px 5px;
  text-align:center;
}
.monthly-product-total-grid span,
.monthly-product-total-grid b{
  display:block;
}
.monthly-product-total-grid span{
  font-size:9px;
  color:#777f85;
}
.monthly-product-total-grid b{
  margin-top:3px;
  font-size:13px;
  color:#765d3e;
  font-variant-numeric:tabular-nums;
}
@media(max-width:620px){
  .monthly-product-total-grid{gap:4px}
  .monthly-product-total-grid>div{padding:6px 3px}
  .monthly-product-total-grid b{font-size:11px}
}

/* v16.3 historical 3ml */
.monthly-qty-table .historical-3ml{
  background:#f8f5ff;
  color:#6a5684;
}

/* v16.6 월 일자별 표: 영업일만 표시 + 주간 굵은 구분선 */
.monthly-qty-table tbody tr.week-end-row td{
  border-bottom:3px solid #8f989f !important;
}
.monthly-qty-table tbody tr.week-end-row td:first-child{
  border-bottom-left-radius:0;
}
.monthly-qty-table tbody tr.week-end-row td:last-child{
  border-bottom-right-radius:0;
}

/* v16.7 품목 월 상세 */
.product-detail-link{color:inherit;text-decoration:underline;text-decoration-color:#c8b79d;text-underline-offset:3px}.product-detail-link:hover{color:#8b693e}.product-month-kpis{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}.product-fulfillment-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.product-fulfillment-grid>div{border:1px solid var(--line);border-radius:9px;padding:10px;background:#fafafa}.product-fulfillment-grid span,.product-fulfillment-grid b,.product-fulfillment-grid small{display:block}.product-fulfillment-grid span{font-size:10px;color:var(--muted)}.product-fulfillment-grid b{font-size:14px;margin-top:3px}.product-fulfillment-grid small{font-size:9px;color:#777;margin-top:2px}.product-month-table .number-cell{text-align:right;white-space:nowrap}.product-month-table tfoot th{border-top:2px solid #aab1b7;background:#f5f6f7}@media(max-width:700px){.product-month-kpis{grid-template-columns:1fr}.product-fulfillment-grid{grid-template-columns:1fr 1fr}}

.qty-missing-note{display:block;margin-top:3px;font-size:7px;color:#b35d45;white-space:nowrap}

/* v16.13 월간 베스트 판매상품 */
.monthly-top-products-card{margin-bottom:16px}
.top-product-highlight{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:12px;align-items:center;padding:14px 16px;margin-bottom:12px;border:1px solid #e4dbc9;border-radius:12px;background:#fbf8f2}
.top-product-rank{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#b6905c;color:#fff;font-size:16px;font-weight:900}
.top-product-main span,.top-product-main strong,.top-product-main small{display:block}
.top-product-main span{font-size:9px;color:#8d765a}
.top-product-main strong{margin-top:2px;font-size:15px}
.top-product-main small{margin-top:4px;font-size:9px;color:#777}
.top-product-number{text-align:right;white-space:nowrap}
.top-product-number strong,.top-product-number span{display:block}
.top-product-number strong{font-size:19px;color:#725634}
.top-product-number span{margin-top:2px;font-size:10px;color:#777}
.top-products-table{min-width:860px}
.top-products-table .rank-cell{width:50px;text-align:center}
.top-products-table .number-cell{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.rank-badge{width:24px;height:24px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-weight:900;font-size:10px}
.rank-1{background:#b6905c;color:#fff}.rank-2{background:#d8dadd;color:#50545a}.rank-3{background:#d9b28b;color:#5f422c}
.top-products-table .top-one-row td{background:#fcfaf5}
@media(max-width:700px){.top-product-highlight{grid-template-columns:36px minmax(0,1fr)}.top-product-number{grid-column:2;text-align:left}}
