/* 세 쇼케이스의 공통 조작 UI입니다. 제품 셀에는 이름을 명시한 클래스만 적용합니다. */
.workspace-demo {
    --ws-ink: #263139;
    --ws-muted: #647483;
    --ws-line: #dbe4eb;
    --ws-blue: #236eaa;
}
.workspace-demo .workspace-heading,
.workspace-demo .workspace-toolbar,
.workspace-demo .workspace-controls,
.workspace-demo .workspace-note {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}
.workspace-demo .workspace-heading,
.workspace-demo .workspace-toolbar,
.workspace-demo .workspace-note {
    justify-content: space-between;
}
#main.workspace-demo h2,
#main.workspace-demo h3 {
    margin: 0;
    word-break: keep-all;
}
.workspace-demo .workspace-heading p {
    margin: 6px 0 0;
    color: var(--ws-muted);
}
.workspace-demo .workspace-toolbar {
    margin: 16px 0 12px;
}
.workspace-demo .workspace-controls label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}
.workspace-demo select,
.workspace-demo .workspace-search {
    font: inherit;
    color: #334155;
    background: #fff;
    border: 1px solid #d6e0e8;
    border-radius: 5px;
    padding: 7px 10px;
    box-sizing: border-box;
    max-width: 100%;
}
#main.workspace-demo .btn {
    margin: 0;
}
body.demo-typography #main.workspace-demo .btn.workspace-primary {
    /* 쇼케이스의 주요 실행 버튼도 공통 데모 버튼과 같은 파란색을 사용합니다. */
    background: #337ab7;
    border-color: #337ab7;
    color: #fff !important;
}
.workspace-demo .workspace-note {
    margin-top: 12px;
    color: var(--ws-muted);
}
.workspace-demo .workspace-note p {
    margin: 0;
}
.workspace-demo .workspace-status {
    min-height: 21px;
    color: #346587;
}
.workspace-demo .workspace-left {
    text-align: left;
}
.workspace-demo .workspace-number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.workspace-demo .workspace-strong {
    text-align: left;
    font-weight: 600;
}
.workspace-demo .workspace-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 16px;
    line-height: 19px;
    font-weight: 600;
    background: #edf4fb;
    color: #2b6ca8;
}
.workspace-demo .workspace-badge--green {
    background: #edf7f2;
    color: #267452;
}
.workspace-demo .workspace-badge--amber {
    background: #fcf4e6;
    color: #94621c;
}
.workspace-demo .workspace-badge--gray {
    background: #edf0f3;
    color: #596877;
}
.workspace-demo .workspace-progress .aui-grid-percentage-bar {
    background: #3982ba;
}
.workspace-demo .workspace-complete .aui-grid-percentage-bar {
    background: #2b8b72;
}
/* 날짜별 상태는 셀과 헤더, 범례 및 내보내기에서 같은 색을 사용합니다. */
.resource-active {
    background: #deeee5;
    color: #235f46;
}
.resource-reserved {
    background: #e0edfa;
    color: #245d91;
}
.resource-maintenance {
    background: #fbead8;
    color: #905b20;
}
.resource-idle {
    background: #f0f2f5;
    color: #6a7683;
}
.resource-weekend {
    background: #f8eded;
    color: #a35959;
}
.resource-planner .resource-month {
    border: 1px solid #d7e2ec;
    border-radius: 5px;
    padding: 8px 14px;
    color: #385b76;
}
.resource-planner .resource-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.resource-planner .resource-legend > span {
    min-width: 44px;
    padding: 6px 10px;
    text-align: center;
    border-radius: 4px;
}
.resource-planner .resource-legend small {
    margin-left: 6px;
    color: var(--ws-muted);
}
.resource-planner #grid_wrap {
    width: 100%;
    height: 630px;
}
/* BOM은 트리의 계층을 색과 굵기로 구분하며 계산 필드와 편집 필드가 섞이지 않게 합니다. */
.bom-product-row {
    background: #eaf1f7;
    color: #2b4b65;
    font-weight: bold;
}
.bom-assembly-row {
    background: #f3f6f9;
    color: #526677;
    font-weight: bold;
}
.bom-edit {
    background: #f0f7fd;
    color: #246898;
    text-align: right;
}
.bom-review {
    background: #fcece3;
    color: #9c582c;
}
.bom-negotiate {
    background: #fcf6e5;
    color: #8c6a20;
}
.bom-workspace .bom-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #f4f7fa;
    border-left: 3px solid #3c7299;
    padding: 20px 24px;
    margin: 20px 0;
}
.bom-workspace .bom-summary span,
.bom-workspace .bom-summary small {
    color: #677b8c;
}
.bom-workspace .bom-summary h3 {
    margin: 6px 0 !important;
}
.bom-workspace .bom-total strong {
    display: block;
    color: #284f6c;
    font-size: 28px;
    font-variant-numeric: tabular-nums;
}
.bom-workspace .bom-total {
    text-align: right;
}
.bom-workspace #grid_wrap {
    width: 100%;
    height: 620px;
}
/* 3. 병합된 행 머리글과 분기 헤더를 가진 월별 비교표입니다. 색은 달성률에만 사용합니다. */
.energy-report .energy-masthead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    padding: 0 0 20px;
    border-bottom: 2px solid #29465b;
}
.energy-report .energy-period {
    color: #526d80;
    font-size: 13px;
    margin-bottom: 8px;
}
.energy-report .energy-total {
    text-align: right;
    color: #5c7180;
}
.energy-report .energy-total strong {
    display: block;
    color: #284c62;
    font-size: 30px;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}
.energy-report .energy-total small {
    display: block;
    margin-top: 4px;
}
.energy-report .energy-options {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin: 18px 0;
}
.energy-report .energy-views {
    display: inline-flex;
    border: 1px solid var(--ws-line);
    border-radius: 5px;
    padding: 3px;
    gap: 3px;
}
.energy-report .energy-views button {
    padding: 6px 11px;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
    color: #536574;
    border-radius: 3px;
}
.energy-report .energy-views button[aria-pressed="true"] {
    background: #294f67;
    color: #fff;
}
.energy-report .energy-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    color: #637481;
    margin: 0 0 10px;
}
.energy-report .energy-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 5px;
    border: 1px solid #d7e2e7;
}
.energy-report #grid_wrap {
    width: 100%;
    height: 590px;
}
.energy-region {
    background: #f0f5f8;
    color: #314f65;
    font-weight: bold;
}
.energy-site {
    background: #fafcfd;
    color: #29485e;
    text-align: left;
    font-weight: bold;
}
.energy-target-row {
    background: #f5f8fa;
    color: #657888;
}
.energy-rate-low {
    background: #fcf0dd;
    color: #87581b;
    font-weight: bold;
    text-align: right;
}
.energy-rate-mid {
    background: #edf4fb;
    color: #305d84;
    text-align: right;
}
.energy-rate-high {
    background: #def1ea;
    color: #246b55;
    font-weight: bold;
    text-align: right;
}
.energy-cumulative {
    background: #f1f5f8;
    color: #294b64;
    font-weight: bold;
    text-align: right;
}
@media (max-width: 820px) {
    .energy-report .energy-masthead {
        grid-template-columns: minmax(0, 1fr);
    }
    .energy-report .energy-total {
        text-align: left;
    }
}
@media (max-width: 480px) {
    .bom-workspace .bom-summary {
        padding: 16px;
    }
    .bom-workspace .bom-total {
        text-align: left;
    }
}
