/* MES 데이터표시: shared styles grouped by publishing role. */

/* resources/css/common.css */
@scope (html:has(meta[name="mes-style-surface"][content="app"], meta[name="mes-style-surface"][content="login"])) {
.mes-kpi-grid {
    display: grid;
    gap: 10px;
}

.kpi-grid {
    margin-top: -18px;
}

.mes-kpi-card {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
}

.mes-kpi-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
}

.mes-kpi-value {
    font-size: 27px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.mes-kpi-caption {
    font-size: 12px;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mes-panel {
    padding: 10px;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.mes-panel .ag-theme-alpine {
    flex: 1;
    min-height: 220px;
}

.mes-sub-title {
    font-size: 13px;
    font-weight: 900;
    color: var(--text-main);
}

.mes-sub-caption {
    font-size: 12px;
    color: var(--text-dim);
}
}

/* resources/css/common.css */
@scope (html:has(meta[name="mes-style-surface"][content="app"], meta[name="mes-style-surface"][content="login"])) {
.mes-source-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 900;
}

.mes-source-production {
    background: #dbeafe;
    color: #1d4ed8;
}

.mes-source-good {
    background: #dcfce7;
    color: #15803d;
}

/* Common KPI/status primitives */
.mes-status-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.mes-status-kpi-card {
    position: relative;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
}

.mes-status-kpi-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #64748b;
}

.mes-status-kpi-card.kpi-blue::before { background: #2563eb; }
.mes-status-kpi-card.kpi-green::before { background: #16a34a; }
.mes-status-kpi-card.kpi-red::before { background: #dc2626; }
.mes-status-kpi-card.kpi-yellow::before { background: #ca8a04; }
.mes-status-kpi-card.kpi-teal::before { background: #0f766e; }
.mes-status-kpi-card.kpi-purple::before { background: #7c3aed; }

.mes-status-legend {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-left: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}

.mes-status-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.mes-status-legend-item.active {
    color: #0f172a;
    font-weight: 900;
}

.mes-status-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
}

.mes-status-legend-dot.status-gray { background: #f8fafc; }
.mes-status-legend-dot.status-blue { background: #eff6ff; }
.mes-status-legend-dot.status-green { background: #f0fdf4; }
.mes-status-legend-dot.status-yellow { background: #fffbeb; }
.mes-status-legend-dot.status-red { background: #fef2f2; }
.mes-status-legend-dot.status-purple { background: #f5f3ff; }

.ag-theme-alpine .ag-row.mes-row-status-gray .ag-cell { background-color: #fbfcfe !important; }
.ag-theme-alpine .ag-row.mes-row-status-blue .ag-cell { background-color: #f8fbff !important; }
.ag-theme-alpine .ag-row.mes-row-status-green .ag-cell { background-color: #f8fff9 !important; }
.ag-theme-alpine .ag-row.mes-row-status-yellow .ag-cell { background-color: #fffdf5 !important; }
.ag-theme-alpine .ag-row.mes-row-status-red .ag-cell { background-color: #fffafa !important; }
.ag-theme-alpine .ag-row.mes-row-status-purple .ag-cell { background-color: #fbfaff !important; }
}

/* resources/css/aggrid-custom.css */
@scope (html:has(meta[name="mes-style-surface"][content="app"])) {
/* [추가] 필터 아이콘 */
.ag-theme-alpine .ag-icon-filter {
    color: #6b7280 !important;
    filter: none;
}

/* 1. 드롭다운 제거 */
.ag-theme-alpine .ag-filter-wrapper .ag-picker-field,
.ag-theme-alpine .ag-filter-wrapper .ag-filter-select,
.ag-theme-alpine .ag-picker-field.ag-disabled {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* 2. 필터 레이아웃 */
.ag-theme-alpine .ag-simple-filter-body-wrapper {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 3. 필터 input */
.ag-theme-alpine .ag-filter-filter {
    background-color: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #e5e7eb !important;

    margin: 10px !important;
    border-radius: 6px !important;
    padding: 8px !important;
    width: calc(100% - 20px) !important;

    box-sizing: border-box;
    display: block !important;
}

/* 4. 필터 팝업 */
.ag-theme-alpine .ag-filter-wrapper {
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    padding: 4px 0 !important;
    min-width: 180px !important;
}

/* 숨김 제거 */
.ag-theme-alpine .ag-filter-wrapper .ag-hidden {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: hidden !important;
}

.ag-theme-alpine .ag-filter-to.ag-hidden,
.ag-theme-alpine .ag-filter-filter-to.ag-hidden {
    display: none !important;
}

/* ================= GRID ================= */

.grid-panel {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    height: 95%;
}

.grid-header {
    padding: 10px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grid-title {
    font-weight: 700;
    color: #111827;
}

.main-title {
    font-weight: 700;
    color: #111827;
    font-size: x-large;
}

#mainGrid {
    height: 600px;
    width: 100%;
}

/* ================= AG GRID ================= */

.ag-theme-alpine {
    --ag-foreground-color: #111827;
    --ag-border-color: #e5e7eb;
    --ag-row-border-color: transparent;
    --ag-row-border-style: none;
    --ag-row-border-width: 0;

    --ag-selected-row-background-color: rgba(47, 111, 237, 0.15);
    --ag-row-hover-color: rgba(15, 0, 0, 0.03);

    --ag-font-size: 13px;
    --ag-row-height: 34px;
}

/* ROOT */
.ag-theme-alpine .ag-root-wrapper {
    border: 1px solid #ffffff !important;
    padding: 0px;
    background: #ffffff;
}

.ag-theme-alpine .ag-root-wrapper-body.ag-layout-normal.ag-focus-managed {
    border-bottom: 1px solid #e5e7eb !important;
}

/* VIEWPORT */
.ag-theme-alpine .ag-body-viewport,
.ag-theme-alpine .ag-center-cols-viewport {
    background: #ffffff;
}

/* ================= 🔥 ROW ================= */
.ag-theme-alpine .ag-row {
    height: 34px !important;
    background-color: #ffffff !important;
    border-top: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

.ag-theme-alpine .ag-row .ag-cell {
    min-height: 34px !important;
    pointer-events: auto;
}

.ag-theme-alpine .ag-row .ag-cell button,
.ag-theme-alpine .ag-row .ag-cell input,
.ag-theme-alpine .ag-row .ag-cell select,
.ag-theme-alpine .ag-row .ag-cell textarea,
.ag-theme-alpine .ag-row .ag-cell a,
.ag-theme-alpine .ag-row .ag-cell [role="button"] {
    pointer-events: auto;
}

.ag-theme-alpine .ag-row::before,
.ag-theme-alpine .ag-row::after,
.ag-theme-alpine .ag-center-cols-container::before,
.ag-theme-alpine .ag-center-cols-container::after,
.ag-theme-alpine .ag-center-cols-viewport::before,
.ag-theme-alpine .ag-center-cols-viewport::after {
    border: 0 !important;
    box-shadow: none !important;
    display: none !important;
    content: none !important;
}

/* ================= 🔥 HEADER ================= */
.ag-theme-alpine .ag-header,
.ag-theme-alpine .ag-header-row,
.ag-theme-alpine .ag-header-cell-moving {
    background-color: #ffffff !important;
    border-bottom: none !important;
    /* border-bottom: 2px solid #4786e4 !important;  */
}

/* 헤더 호버시 애니메이션 시작 */
.ag-theme-alpine .ag-header-cell-label {
    transition: all 0.2s ease; 
}
.ag-theme-alpine .ag-header-cell:hover .ag-header-cell-label {
    transform: scale(1.1);
    font-weight: 800;
}
/* 헤더 호버시 애니메이션 종료 */

/* ================= 🔥 HEADER TEXT ================= */
.ag-header-cell-label {
    justify-content: center;
    color: #444444 !important; /* 🔥 완전 검정 */
    font-weight: 800;          /* 🔥 더 두껍게 */
}

/* ================= HEADER CELL ================= */
.ag-theme-alpine .ag-header-cell {
    height: 40px !important;
    background-color: #f1f1f1;
    border-right: 1px solid #edf2f7 !important;
    border-bottom: none !important;
}

/* ================= 🔥 CELL ================= */
.ag-cell {
    display: flex;
    align-items: center;
    justify-content: center;

    border-right: 1px solid #edf2f7 !important;
    border-left: none !important;
    border-bottom: 1px solid #edf2f7 !important;
    color: #000000 !important; /* 🔥 완전 검정 */
}

/* ================= 선택 ================= */
.ag-row-selected {
    box-shadow: inset 4px 0 0 0 #2f6fed !important;
}

/* ================= 정렬 아이콘 ================= */
.ag-theme-alpine .ag-icon-asc,
.ag-theme-alpine .ag-icon-desc {
    color: #6b7280 !important;
}

/* ================= 데이터 없음 ================= */
.ag-overlay-no-rows-center {
    color: #9ca3af !important;
}

/* ================= 헤더 높이 ================= */
.ag-theme-alpine .ag-header {
    height: 40px !important;
    min-height: 40px !important;
    border: none !important;
    border-bottom: none !important;
}

.ag-theme-alpine .ag-header-row {
    height: 40px !important;
    border-bottom: none !important;
}

/* ================= 헤더 우측 영역 ================= */
.ag-header-viewport {
    background-color: #ffffff !important;
    border-bottom: none !important;
}

.ag-theme-alpine .ag-header-container,
.ag-theme-alpine .ag-pinned-left-header,
.ag-theme-alpine .ag-pinned-right-header {
    border-bottom: none !important;
}

.ag-theme-alpine .ag-header-row::after {
    display: none !important;
    content: none !important;
}

.ag-theme-alpine .ag-header,
.ag-theme-alpine .ag-header-viewport,
.ag-theme-alpine .ag-header-container,
.ag-theme-alpine .ag-header-row,
.ag-theme-alpine .ag-header-cell,
.ag-theme-alpine .ag-header-group-cell {
    border-bottom: 0 !important;
    box-shadow: none !important;
}

.ag-theme-alpine .ag-header::before,
.ag-theme-alpine .ag-header::after,
.ag-theme-alpine .ag-header-viewport::before,
.ag-theme-alpine .ag-header-viewport::after,
.ag-theme-alpine .ag-header-container::before,
.ag-theme-alpine .ag-header-container::after,
.ag-theme-alpine .ag-header-row::before,
.ag-theme-alpine .ag-header-row::after,
.ag-theme-alpine .ag-header-cell::before,
.ag-theme-alpine .ag-header-cell::after,
.ag-theme-alpine .ag-header-group-cell::before,
.ag-theme-alpine .ag-header-group-cell::after {
    border-bottom: 0 !important;
    box-shadow: none !important;
}

.ag-theme-alpine .ag-center-cols-container .ag-row:first-child .ag-cell {
    border-top: 0 !important;
}
.ag-theme-alpine .ag-center-cols-container .ag-row:first-child .ag-cell.ag-cell-focus {
    border-top: 1px solid #2f6fed !important;
}

.ag-theme-alpine .ag-floating-top,
.ag-theme-alpine .ag-floating-top-viewport,
.ag-theme-alpine .ag-floating-top-container,
.ag-theme-alpine .ag-pinned-top,
.ag-theme-alpine .ag-pinned-top-viewport,
.ag-theme-alpine .ag-pinned-top-container,
.ag-theme-alpine .ag-pinned-top-rows-container,
.ag-theme-alpine .ag-grid-pinned-top-rows {
    border-bottom: 0 !important;
    box-shadow: none !important;
}

.ag-theme-alpine .ag-floating-top::before,
.ag-theme-alpine .ag-floating-top::after,
.ag-theme-alpine .ag-floating-top-viewport::before,
.ag-theme-alpine .ag-floating-top-viewport::after,
.ag-theme-alpine .ag-floating-top-container::before,
.ag-theme-alpine .ag-floating-top-container::after,
.ag-theme-alpine .ag-pinned-top-rows-container::before,
.ag-theme-alpine .ag-pinned-top-rows-container::after,
.ag-theme-alpine .ag-grid-pinned-top-rows::before,
.ag-theme-alpine .ag-grid-pinned-top-rows::after {
    border: 0 !important;
    box-shadow: none !important;
    display: none !important;
    content: none !important;
}

.ag-theme-alpine .ag-root.ag-layout-normal {
    height: 93% !important;
}

.ag-row-drag {
    cursor: grab;
}
.ag-watermark {
    display: none !important;
}

/* Shared data-grid geometry; matches applyMesGridLayout. */
.ag-theme-alpine { --ag-row-height: 40px; --ag-header-height: 40px; --ag-cell-horizontal-padding: 12px; }
.ag-theme-alpine .ag-row { height: 40px !important; }
.ag-theme-alpine .ag-row .ag-cell { min-height: 40px !important; }
.ag-theme-alpine .ag-header-cell,
.ag-theme-alpine .ag-cell {
    box-sizing: border-box;
    padding: 0 12px;
    border-right: 1px solid #dbe2ea !important;
    border-bottom: 1px solid #dbe2ea !important;
    font-variant-numeric: tabular-nums;
}
.ag-theme-alpine .ag-cell.ag-cell-focus {
    border: 1px solid #2f6fed !important;
    outline: none !important;
    z-index: 1;
}
/* 선택 셀의 위쪽 파란 선과 바로 윗행의 구분선이 겹치지 않게 한다. */
.ag-theme-alpine .ag-row:has(+ .ag-row .ag-cell-focus) .ag-cell {
    border-bottom-color: transparent !important;
}
.ag-theme-alpine .ag-header { border-bottom: 1px solid #dbe2ea !important; }
.ag-theme-alpine .ag-header-cell:hover .ag-header-cell-label { transform: none; }
.ag-theme-alpine .ag-cell.mes-grid-align-left { justify-content: flex-start !important; text-align: left !important; }
.ag-theme-alpine .ag-cell.mes-grid-align-right { justify-content: flex-end !important; text-align: right !important; }
.ag-theme-alpine .ag-cell.mes-grid-align-center { justify-content: center !important; text-align: center !important; }
.ag-theme-alpine .ag-cell-value { width: 100%; text-align: inherit; }
.ag-theme-alpine .ag-cell:has(input[type="number"]) { justify-content: center !important; }
.ag-theme-alpine .ag-cell input[type="number"] { display: block; margin: 0 auto; max-width: 100%; text-align: right; box-sizing: border-box; }
.mes-data-grid { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.mes-data-grid th,
.mes-data-grid td { box-sizing: border-box; height: 40px; padding: 4px 12px; vertical-align: middle; text-align: left; border-right: 1px solid #dbe2ea; border-bottom: 1px solid #dbe2ea; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.mes-data-grid th { background: #f1f1f1; color: #111827; font-weight: 800; }

/* Headers are always centered, independently of data alignment. */
.ag-theme-alpine .ag-header-cell-label,
.ag-theme-alpine .ag-header-group-cell-label { justify-content: center !important; text-align: center !important; }
.mes-data-grid th { text-align: center; }
}

/* resources/css/grid-pagination.css */
@scope (html:has(meta[name="mes-style-surface"][content="app"])) {
.mes-pagination {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 8px;
    padding-left: 6px;
    margin-bottom: 30px;
    font-size: 12px;
}

.mes-pagination-size {
    position: absolute;
    left: 6px;
    top: 8px;
    display: flex;
    align-items: center;
}

.mes-pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    width: 100%;
    min-height: 28px;
}

.mes-pagination-size select {
    height: 28px;
    min-width: 86px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 0 28px 0 8px;
    cursor: pointer;
}

.mes-pagination button {
    min-width: 30px;
    height: 28px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    padding: 0 8px;
    cursor: pointer;
}

.mes-pagination button.active {
    border-color: #2563eb;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
}

.mes-pagination button:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.mes-pagination-summary {
    margin-right: 6px;
    color: #64748b;
    font-weight: 600;
}
}

/* resources/css/ten013-dashboard.css */
@scope (html:has(meta[name="mes-style-page"][content="메인페이지/TEN_013_통합대시보드"]) > body) {
.ten013-dashboard {
    height: calc(100vh - 89px);
    min-height: 680px;
    overflow: auto;
    padding: 10px;
    background: #edf2f5;
}

.dashboard-shell {
    --dash-green: #00a982;
    --dash-blue: #3183c5;
    --dash-ink: #092b43;
    --dash-muted: #708598;
    height: 100%;
    min-width: 980px;
    display: grid;
    grid-template-rows: 86px 98px minmax(270px, 1.35fr) minmax(220px, 1fr);
    gap: 10px;
    color: var(--dash-ink);
}

.progress-panel,
.kpi-card,
.dashboard-card {
    border: 1px solid #dbe4e9;
    border-radius: 12px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 7px 20px rgba(23, 54, 76, .045);
}

.progress-panel {
    display: grid;
    grid-template-columns: 270px minmax(300px, 1fr) 170px;
    align-items: center;
    gap: 18px;
    padding: 10px 18px;
    border-color: #b7e8dc;
    background: linear-gradient(100deg, #effbf7 0%, #f7fbfc 50%, #edf6ff 100%);
}

.progress-copy > span,
.eta-box > span,
.kpi-card > span {
    display: block;
    color: #566d7c;
    font-size: 13px;
    font-weight: 800;
}

.progress-value {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 1px;
}

.progress-value strong {
    color: #009b78;
    font-family: 'Orbitron', sans-serif;
    font-size: 26px;
    font-weight: 500;
    letter-spacing: .03em;
}

.progress-value span {
    color: #092b43;
    font-family: 'Orbitron', sans-serif;
    font-size: 17px;
}

.progress-copy small,
.progress-track-wrap small {
    color: #566d7c;
    font-size: 12px;
    font-weight: 700;
}

.progress-copy small b { color: #009b78; }

.progress-track {
    height: 12px;
    overflow: hidden;
    border: 1px solid #cbd9dd;
    border-radius: 999px;
    background: #dce7e9;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #20b98c, #00977b);
}

.progress-track-wrap small {
    display: block;
    margin-top: 6px;
    text-align: right;
}

.eta-box { text-align: right; }

.eta-box strong {
    display: block;
    color: #1675bd;
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    font-weight: 500;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.kpi-card {
    min-width: 0;
    padding: 13px 14px 10px;
}

.kpi-card div {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-top: 3px;
    white-space: nowrap;
}

.kpi-card strong {
    color: #0a2c44;
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    font-weight: 500;
}

.kpi-card small {
    flex: 0 0 auto;
    color: #6e8495;
    font-size: 11px;
    font-weight: 800;
}

.kpi-card p {
    margin: 1px 0 0;
    overflow: hidden;
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tone-positive { color: #20b98c; }
.tone-danger { color: #ff5267; }
.tone-neutral { color: #8296a5; }

.dashboard-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.52fr) minmax(380px, 1fr);
    gap: 10px;
}

.dashboard-grid-bottom { grid-template-columns: minmax(0, 1.52fr) minmax(380px, 1fr); }

.dashboard-card {
    min-height: 0;
    overflow: hidden;
    padding: 12px 14px;
}

.card-heading {
    min-height: 42px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.card-heading.compact { min-height: 50px; }

.eyebrow {
    display: block;
    color: var(--dash-green);
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
}

.card-heading h2 {
    margin: 3px 0 0;
    color: var(--dash-ink);
    font-size: 17px;
    font-weight: 900;
}

.card-heading a {
    margin-top: 3px;
    color: #1474b9;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.unit-label {
    color: #8093a2;
    font-size: 12px;
    font-weight: 800;
}

.equipment-summary {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 30px;
    margin: 4px 0 8px;
    padding: 0 10px;
    border-radius: 8px;
    background: #f1f5f7;
    color: #637888;
    font-size: 11px;
    font-weight: 700;
}

.equipment-summary b { color: #273f52; }

.status-dot {
    width: 7px;
    height: 7px;
    display: inline-block;
    flex: 0 0 auto;
    margin-right: 7px;
    border-radius: 50%;
    box-shadow: 0 0 7px currentColor;
}

.status-dot.running { color: #00a982; background: currentColor; }
.status-dot.waiting { color: #e4a21e; background: currentColor; }
.status-dot.alarm { color: #e74662; background: currentColor; }
.status-dot.stopped { color: #7f93a3; background: currentColor; }

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.equipment-item {
    min-width: 0;
    border: 1px solid #dae3e8;
    border-radius: 9px;
    padding: 8px 10px;
    background: #fff;
}

.equipment-item h3 {
    display: flex;
    align-items: center;
    margin: 0;
    overflow: hidden;
    color: #102f46;
    font-size: 13px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.equipment-item p {
    margin: 3px 0;
    overflow: hidden;
    color: #6a8090;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.equipment-item div {
    display: flex;
    justify-content: space-between;
    color: #617889;
    font-size: 11px;
    font-weight: 800;
}

.equipment-item div strong { color: #193a52; }

.output-card { display: flex; flex-direction: column; }

.chart-wrap {
    position: relative;
    min-height: 150px;
    flex: 1 1 auto;
}

.chart-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #536d7e;
    font-size: 10px;
    font-weight: 800;
}

.chart-footer strong {
    margin-left: auto;
    color: #173b54;
}

.legend-box {
    width: 8px;
    height: 8px;
    display: inline-block;
    margin-right: 4px;
    border-radius: 2px;
    background: var(--dash-blue);
}

.legend-line {
    width: 12px;
    display: inline-block;
    margin: 0 4px 3px 0;
    border-top: 1px dashed #dd791f;
}

.table-wrap { overflow-x: auto; }

.orders-card table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.orders-card th,
.orders-card td {
    overflow: hidden;
    border-bottom: 1px solid #dbe4e9;
    padding: 9px 8px;
    color: #27465b;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.orders-card th {
    padding-top: 5px;
    color: #8ba0ae;
    font-size: 11px;
    font-weight: 900;
}

.orders-card th:nth-child(1) { width: 21%; }
.orders-card th:nth-child(2) { width: 21%; }
.orders-card th:nth-child(3) { width: 14%; }
.orders-card th:nth-child(4) { width: 22%; }
.orders-card th:nth-child(5) { width: 12%; }
.orders-card th:nth-child(6) { width: 10%; }

.mono { font-family: 'Orbitron', sans-serif; font-size: 11px !important; }

.order-progress {
    display: flex;
    align-items: center;
    gap: 7px;
}

.order-progress > span {
    height: 5px;
    min-width: 35px;
    flex: 1;
    overflow: hidden;
    background: #dfe9ea;
}

.order-progress i {
    height: 100%;
    display: block;
    background: var(--dash-green);
}

.status-chip,
.alert-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e5f2ff;
    color: #1d78bd;
    padding: 4px 9px;
    font-size: 10px;
    font-weight: 900;
}

.alert-count {
    background: #ffe9ed;
    color: #ee5267;
}

.alert-list { margin-top: 4px; }

.alert-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    border-bottom: 1px solid #dbe4e9;
}

.alert-item:last-child { border-bottom: 0; }

.alert-level {
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 10px;
    font-weight: 900;
}

.alert-level.danger { background: #ffe8ec; color: #ee5267; }
.alert-level.warning { background: #fff1dd; color: #dd851c; }

.alert-item strong {
    display: block;
    overflow: hidden;
    color: #102f46;
    font-size: 12px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alert-item p {
    margin: 2px 0 0;
    overflow: hidden;
    color: #647c8d;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alert-item time {
    color: #8297a5;
    font-family: 'Orbitron', sans-serif;
    font-size: 10px;
}

@media (max-width: 1350px) {
    .dashboard-shell { grid-template-rows: 86px 98px minmax(300px, 1.35fr) minmax(220px, 1fr); }
    .dashboard-grid { grid-template-columns: minmax(0, 1.35fr) minmax(350px, 1fr); }
    .equipment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-height: 800px) {
    .ten013-dashboard { min-height: 700px; }
}
}

/* resources/css/monitor-machine-animation.css */
@scope (html:has(meta[name="mes-style-page"][content="생산관리/생산모니터링"], meta[name="mes-style-page"][content="설비관리/설비모니터링"]) > body) {
.step-machine-visual,
.facility-machine-visual {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: auto;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    background:
        radial-gradient(circle at 78% 36%, rgba(59,130,246,.24), transparent 30%),
        radial-gradient(circle at 50% 68%, rgba(14,165,233,.14), transparent 38%),
        linear-gradient(180deg, #f8fbff 0%, #eaf2fb 100%);
    z-index: 0;
    pointer-events: none;
}

.step-machine-visual {
    top: 116px;
}

.facility-machine-visual {
    top: 88px;
}

.mini-factory {
    position: absolute;
    left: 18px;
    right: 8px;
    bottom: 0;
    height: 156px;
}

.factory-building {
    position: absolute;
    left: 0;
    bottom: 15px;
    width: 31%;
    height: 60px;
    border: 3px solid #93c5fd;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 62%, #93c5fd 100%);
    box-shadow: 0 8px 14px rgba(37, 99, 235, .12);
}

.factory-building::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 18px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    box-shadow:
        22px 0 #ffffff,
        0 22px #ffffff,
        22px 22px #ffffff;
}

.factory-roof {
    display: none;
}

.factory-chimney {
    position: absolute;
    left: 8%;
    bottom: 75px;
    width: 28px;
    height: 44px;
    border-radius: 5px 5px 0 0;
    background: #475569;
}

.smoke {
    position: absolute;
    left: calc(8% + 5px);
    bottom: 120px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(100, 116, 139, .48);
    opacity: 0;
}

.smoke.s2 {
    left: calc(8% + 22px);
    animation-delay: .45s;
}

.smoke.s3 {
    left: calc(8% + 13px);
    animation-delay: .9s;
}

.factory-light {
    position: absolute;
    right: 8px;
    top: 30px;
    width: 92px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(250, 204, 21, .42), rgba(250, 204, 21, 0) 68%);
    opacity: .45;
}

.rail {
    position: absolute;
    left: 29%;
    right: 0;
    bottom: 23px;
    height: 20px;
    border-radius: 999px;
    background:
        repeating-linear-gradient(90deg, #334155 0 22px, #94a3b8 22px 34px),
        linear-gradient(180deg, #64748b, #334155);
    background-size: 68px 20px, 100% 100%;
    border: 1px solid rgba(15, 23, 42, .12);
    box-shadow: 0 8px 15px rgba(15, 23, 42, .12), inset 0 0 0 3px rgba(15, 23, 42, .14);
}

.rail-part {
    position: absolute;
    left: 29%;
    bottom: 47px;
    width: 42px;
    height: 30px;
    border: 3px solid #2563eb;
    border-radius: 7px;
    background: linear-gradient(135deg, #dbeafe, #ffffff);
    box-shadow: 0 10px 18px rgba(37, 99, 235, .18);
}

.rail-part::before {
    content: "";
    position: absolute;
    left: 7px;
    right: 7px;
    top: 7px;
    height: 4px;
    border-radius: 999px;
    background: #60a5fa;
}

.gear {
    position: absolute;
    right: 82px;
    bottom: 65px;
    width: 56px;
    height: 56px;
    border: 8px dashed #64748b;
    border-radius: 50%;
    background: rgba(255,255,255,.54);
}

.gear.g2 {
    right: 34px;
    bottom: 74px;
    width: 42px;
    height: 42px;
    border-width: 6px;
}

.factory-shadow {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 15px;
    background: repeating-linear-gradient(90deg, #cbd5e1 0 24px, #e2e8f0 24px 48px);
}

.process-step.running .smoke,
.facility-state-running .smoke {
    animation: smokeRise 2.4s linear infinite;
}

.process-step.running .rail,
.facility-state-running .rail {
    animation: railMove .8s linear infinite;
}

.process-step.running .rail-part,
.facility-state-running .rail-part {
    animation: partMove 1.7s linear infinite;
}

.process-step.running .gear,
.facility-state-running .gear {
    animation: gearSpin 1.05s linear infinite;
}

.process-step.running .factory-light,
.facility-state-running .factory-light {
    animation: lightPulse 1.2s ease-in-out infinite;
}

.process-step.paused .factory-light,
.facility-state-pause .factory-light {
    opacity: .42;
    animation: pauseGlow 1.8s ease-in-out infinite;
}

.process-step.done .factory-building {
    background: linear-gradient(180deg, #bbf7d0, #22c55e);
    border-color: #16a34a;
}

.process-step.done .step-machine-visual {
    background:
        radial-gradient(circle at 78% 36%, rgba(34,197,94,.28), transparent 30%),
        linear-gradient(180deg, #f0fdf4 0%, #bbf7d0 100%);
}

.process-step.done .factory-chimney {
    background: #14532d;
}

.process-step.done .rail {
    background:
        repeating-linear-gradient(90deg, #166534 0 22px, #86efac 22px 34px),
        linear-gradient(180deg, #22c55e, #166534);
}

.process-step.done .rail-part {
    border-color: #16a34a;
    background: linear-gradient(135deg, #dcfce7, #ffffff);
}

.process-step.done .rail-part::before {
    background: #22c55e;
}

.process-step.done .gear {
    border-color: #15803d;
}

.process-step.done .factory-light {
    background: radial-gradient(circle, rgba(34,197,94,.38), rgba(34,197,94,0) 68%);
    opacity: .55;
}

.process-step.partial .step-machine-visual {
    background:
        radial-gradient(circle at 78% 36%, rgba(134,239,172,.18), transparent 30%),
        linear-gradient(180deg, #f7fee7 0%, #dcfce7 100%);
}

.process-step.partial .factory-building {
    background: linear-gradient(180deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: #86efac;
}

.process-step.partial .factory-chimney {
    background: #3f6f4f;
}

.process-step.partial .rail {
    background:
        repeating-linear-gradient(90deg, #15803d 0 22px, #bbf7d0 22px 34px),
        linear-gradient(180deg, #86efac, #15803d);
}

.process-step.partial .rail-part {
    border-color: #22c55e;
    background: linear-gradient(135deg, #dcfce7, #ffffff);
}

.process-step.partial .rail-part::before {
    background: #86efac;
}

.process-step.partial .gear {
    border-color: #22c55e;
}

.process-step.partial .factory-light {
    background: radial-gradient(circle, rgba(134,239,172,.28), rgba(134,239,172,0) 68%);
}

.process-step.paused .step-machine-visual,
.facility-state-pause .facility-machine-visual {
    background:
        radial-gradient(circle at 78% 36%, rgba(245,158,11,.26), transparent 30%),
        linear-gradient(180deg, #fffdf5 0%, #fef3c7 100%);
}

.process-step.paused .factory-building {
    background: linear-gradient(180deg, #fef3c7 0%, #fde68a 68%, #fbbf24 100%);
    border-color: #fbbf24;
}

.facility-state-pause .factory-building {
    background: linear-gradient(180deg, #fef9c3 0%, #fde68a 100%);
    border-color: #facc15;
}

.facility-state-pause .factory-chimney {
    background: #8a6b2f;
}

.process-step.paused .rail {
    background:
        repeating-linear-gradient(90deg, #92400e 0 22px, #fcd34d 22px 34px),
        linear-gradient(180deg, #fbbf24, #92400e);
    animation: none;
}

.facility-state-pause .rail {
    background:
        repeating-linear-gradient(90deg, #a16207 0 22px, #fde68a 22px 34px),
        linear-gradient(180deg, #facc15, #a16207);
}

.process-step.paused .rail-part {
    border-color: #d97706;
    background: linear-gradient(135deg, #fef3c7, #ffffff);
}

.facility-state-pause .rail-part {
    border-color: #eab308;
    background: linear-gradient(135deg, #fef9c3, #ffffff);
}

.process-step.paused .rail-part::before {
    background: #f59e0b;
}

.facility-state-pause .rail-part::before {
    background: #facc15;
}

.process-step.paused .gear {
    border-color: #d97706;
    animation: none;
}

.facility-state-pause .gear {
    border-color: #ca8a04;
}

.facility-state-pause .factory-light {
    background: radial-gradient(circle, rgba(250,204,21,.28), rgba(250,204,21,0) 68%);
}

.process-step.waiting .step-machine-visual,
.process-step.planned .step-machine-visual,
.facility-state-waiting .facility-machine-visual {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.process-step.waiting .mini-factory,
.process-step.planned .mini-factory,
.facility-state-waiting .mini-factory {
    opacity: .58;
}

.process-step.waiting .rail,
.process-step.planned .rail,
.process-step.waiting .rail-part,
.process-step.planned .rail-part,
.process-step.waiting .gear,
.process-step.planned .gear,
.process-step.waiting .smoke,
.process-step.planned .smoke,
.process-step.waiting .factory-light,
.process-step.planned .factory-light,
.facility-state-waiting .rail,
.facility-state-waiting .rail-part,
.facility-state-waiting .gear,
.facility-state-waiting .smoke,
.facility-state-waiting .factory-light,
.facility-state-pause .rail,
.facility-state-pause .rail-part,
.facility-state-pause .gear {
    animation: none;
}

.process-step.waiting .smoke,
.process-step.planned .smoke,
.process-step.waiting .factory-light,
.process-step.planned .factory-light,
.facility-state-waiting .smoke,
.facility-state-waiting .factory-light {
    display: none;
}

@keyframes smokeRise {
    0% { transform: translateY(0) scale(.8); opacity: 0; }
    22% { opacity: .72; }
    100% { transform: translateY(-48px) scale(1.9); opacity: 0; }
}

@keyframes railMove {
    to { background-position: 68px 0, 0 0; }
}

@keyframes partMove {
    0% { transform: translateX(0); opacity: .25; }
    15% { opacity: 1; }
    100% { transform: translateX(140px); opacity: .35; }
}

@keyframes gearSpin {
    to { transform: rotate(360deg); }
}

@keyframes lightPulse {
    0%, 100% { opacity: .25; transform: scale(.92); }
    50% { opacity: .85; transform: scale(1.08); }
}

@keyframes pauseGlow {
    0%, 100% { opacity: .24; }
    50% { opacity: .55; }
}
}

/* resources/css/pages/관리자/사용자통계.css */
@scope (html:has(meta[name="mes-style-page"][content="관리자/사용자통계"]) > body) {
.user-stats-page {
    gap: 6px;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 6px;
}

.stats-panel {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    min-width: 0;
    height: 700px;
    overflow-y: auto;
}

.tenant-compare-layout {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 8px;
    margin-left: 172px;
    position: relative;
}

.score-guide-box {
    position: absolute;
    left: -172px;
    top: 0;
    width: 162px;
    height: 95px;
    padding: 7px 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #f8fbff;
    color: #334155;
}

.score-guide-title {
    font-size: 12px;
    font-weight: 900;
    color: #1e3a8a;
    margin-bottom: 4px;
}

.score-guide-line {
    font-size: 11px;
    font-weight: 800;
    line-height: 1.45;
}

.tenant-compare-column {
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 6px;
    min-width: 0;
    overflow: visible;
}

.tenant-column-title {
    font-size: 11px;
    font-weight: 900;
    color: #1e3a8a;
    margin-bottom: 4px;
}

.tenant-search-wrap {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 4px;
    min-width: 0;
}

.tenant-search-wrap .form-control {
    height: 28px;
    padding: 4px 7px;
    font-size: 12px;
    min-width: 0;
}

.tenant-search-wrap .btn {
    height: 28px;
    min-width: 0;
    width: 38px;
    padding: 4px 0;
    font-size: 12px;
    overflow: hidden;
}

.tenant-dropdown {
    position: absolute;
    left: 0;
    right: 42px;
    top: calc(100% + 4px);
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, .14);
    z-index: 50;
    display: none;
}

.tenant-option {
    padding: 9px 10px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}

.tenant-option:hover {
    background: #eff6ff;
}

.tenant-option-code {
    font-size: 12px;
    font-weight: 900;
    color: #1d4ed8;
}

.tenant-option-name {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}

.selected-tenant-box {
    min-height: 26px;
    margin-top: 4px;
    padding: 4px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
}

.stats-table-wrap {
    overflow-x: auto;
    height: 564px;
    overflow-y: auto;
}

.stats-compare-table {
    width: 100%;
    min-width: 980px;
    height: 540px;
    border-collapse: collapse;
    table-layout: fixed;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.stats-compare-table th,
.stats-compare-table td {
    height: 32px;
    padding: 5px 10px;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    font-size: 13px;
}

.stats-compare-table th {
    background: #f1f5f9;
    color: #334155;
    font-weight: 900;
    text-align: center;
}

.stats-compare-table td {
    text-align: right;
    font-weight: 900;
    color: #0f172a;
}

.stats-compare-table td:first-child {
    text-align: left;
    color: #1e293b;
    background: #fbfdff;
}

.stats-compare-table .tenant-head {
    background: #eaf3ff;
    color: #1e3a8a;
}

.score-text {
    display: inline-block;
    margin-left: 4px;
    color: #2563eb;
    font-weight: 900;
    cursor: help;
}

.score-tooltip {
    position: fixed;
    z-index: 9999;
    display: none;
    max-width: 300px;
    padding: 8px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    background: #0f172a;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .22);
    pointer-events: none;
}

.period-row td {
    height: 34px;
    padding-top: 8px;
    background: #fff !important;
    color: #1e3a8a !important;
    text-align: left !important;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0;
    border-right: 0;
    border-bottom: 1px solid #dbeafe;
}

.stats-empty-cell {
    color: #94a3b8 !important;
}

@media (max-width: 1400px) {
    .tenant-compare-layout {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .tenant-compare-layout {
        grid-template-columns: 1fr;
    }
}

/* Static styles migrated from the EJS markup. */
.mes-local-style-001 { width:170px; }
}

/* resources/css/pages/관리자/샘플데이터관리.css */
@scope (html:has(meta[name="mes-style-page"][content="관리자/샘플데이터관리"]) > body) {
.sample-data-page { padding-bottom: 84px; }
.sample-panel {
    margin: 14px 12px 0;
    padding: 24px;
    border: 1px solid #dbe5f2;
    border-radius: 16px;
    background: linear-gradient(145deg, #fff 0%, #f8fbff 100%);
    box-shadow: 0 12px 30px rgba(15, 42, 81, .06);
}
.sample-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
    padding: 18px 20px;
    border: 1px solid #cfe0ff;
    border-radius: 13px;
    background: #eff6ff;
}
.sample-intro-title { color: #12346b; font-size: 16px; font-weight: 900; }
.sample-intro-text { margin-top: 5px; color: #52647d; font-size: 13px; line-height: 1.55; }
.sample-badge {
    flex: none;
    padding: 8px 12px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #fff;
    border: 1px solid #bfdbfe;
    font-size: 12px;
    font-weight: 900;
}
.sample-form {
    display: grid;
    grid-template-columns: minmax(280px, 1.4fr) minmax(170px, .7fr) minmax(170px, .7fr) auto;
    align-items: end;
    gap: 14px;
}
.sample-field label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 12px;
    font-weight: 900;
}
.sample-field select,
.sample-field input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    outline: none;
}
.sample-field select:focus,
.sample-field input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.sample-actions { display: flex; gap: 8px; }
.sample-action {
    height: 42px;
    min-width: 106px;
    padding: 0 18px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 900;
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.sample-action:hover:not(:disabled) { transform: translateY(-1px); }
.sample-action:disabled { cursor: wait; opacity: .58; }
.sample-apply { border: 1px solid #1d4ed8; color: #fff; background: #2563eb; box-shadow: 0 8px 18px rgba(37,99,235,.2); }
.sample-reset { border: 1px solid #fecaca; color: #dc2626; background: #fff; }
.sample-result {
    display: none;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}
.sample-result.is-visible { display: block; }
.sample-result-message { margin-bottom: 12px; color: #1e3a8a; font-size: 14px; font-weight: 900; }
.sample-result-message.is-error { color: #dc2626; }
.sample-summary { display: grid; grid-template-columns: repeat(5, minmax(110px, 1fr)); gap: 10px; }
.sample-summary-card {
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}
.sample-summary-label { color: #64748b; font-size: 11px; font-weight: 800; }
.sample-summary-value { margin-top: 5px; color: #0f2f63; font-size: 22px; font-weight: 900; }
.sample-note {
    margin-top: 18px;
    padding: 15px 17px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.7;
}
.sample-note strong { color: #334155; }
@media (max-width: 1100px) {
    .sample-form { grid-template-columns: 1fr 1fr; }
    .sample-field:first-child, .sample-actions { grid-column: span 2; }
    .sample-summary { grid-template-columns: repeat(3, 1fr); }
}
}

/* resources/css/pages/관리자/에러로그관리.css */
@scope (html:has(meta[name="mes-style-page"][content="관리자/에러로그관리"]) > body) {
.error-log-page { height: calc(100vh - 129px); min-height: 460px; }
.error-log-page .grid-panel { display: flex; flex-direction: column; height: 100%; }
.error-log-page .grid-panel > :not(#mainGrid) { flex-shrink: 0; }
.error-log-page #mainGrid { flex: 1; min-height: 180px; height: auto; }
.error-log-page #errorLogPagination { margin-bottom: 10px; }
.error-log-page form { padding: 8px 10px 0; }
.error-log-page .small { padding: 0 10px; }

/* Static styles migrated from the EJS markup. */
.mes-local-style-001 { width:900px; }
}

/* resources/css/pages/관리자/테넌트코드관리.css */
@scope (html:has(meta[name="mes-style-page"][content="관리자/테넌트코드관리"]) > body) {
.tenant-admin-page {
    gap: 10px;
    min-height: 0;
}

.tenant-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
    gap: 10px;
    flex: 1;
    min-height: 0;
}

.tenant-panel {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tenant-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.tenant-panel-title {
    font-size: 14px;
    font-weight: 800;
    color: #111827;
}

.tenant-panel-desc {
    margin-top: 3px;
    font-size: 12px;
    color: #64748b;
}

.tenant-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

#signupGrid,
#tenantGrid {
    flex: 1;
    min-height: 0;
}

.tenant-assign-box {
    display: grid;
    grid-template-columns: 1fr 90px;
    gap: 8px;
    margin-bottom: 10px;
}

.selected-info {
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.tenant-code-text {
    font-weight: 800;
    color: #0f172a;
}

.status-wait { color: #ca8a04; font-weight: 800; }
.status-done { color: #16a34a; font-weight: 800; }
.status-reject { color: #dc2626; font-weight: 800; }

@media (max-width: 1100px) {
    .tenant-layout {
        grid-template-columns: 1fr;
    }
}

/* Static styles migrated from the EJS markup. */
.mes-local-style-001 { width:460px; }
.mes-local-style-002 { width:460px;max-width:95vw; }
.mes-local-style-003 { font-family:monospace;font-size:18px; }
.mes-local-style-004 { border:1px solid #dbe3ef;border-radius:16px;padding:24px;width:min(420px,90vw); }
.mes-local-style-005 { font-size:20px; }
.mes-local-style-006 { margin:8px 0 16px; }
.mes-local-style-007 { font-size:13px;color:#64748b; }
.mes-local-style-008 { display:flex;justify-content:flex-end;gap:8px; }
}

/* resources/css/pages/기준정보/공지사항.css */
@scope (html:has(meta[name="mes-style-page"][content="기준정보/공지사항"]) > body) {
.mes-local-style-001 { width:600px; }
}

/* resources/css/pages/기준정보/라우팅관리.css */
@scope (html:has(meta[name="mes-style-page"][content="기준정보/라우팅관리"]) > body) {
.vertical-layout {
    height: calc(100vh - 140px);
    display: grid;
    grid-template-rows: 132px minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
}

.routing-product-pane {
    min-height: 0;
    overflow: hidden;
}

.routing-detail-pane {
    min-height: 0;
    overflow: hidden;
}

.sub-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
}

#routingRevisionTitle {
    font-weight: 700;
}

#routingAddPopup .routing-add-grid-section {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
}

#routingAddPopup .routing-add-grid-section .ag-theme-alpine {
    flex: 1 1 auto;
    min-height: 260px;
    height: auto;
    width: 100%;
}

#routingAddPopup .routing-add-grid-section .ag-root-wrapper.ag-layout-normal.ag-ltr {
    width: 100%;
    height: 100%;
}

#routingAddPopup .routing-add-grid-section[data-coach="facility-grid"] {
    flex: 1.35 1 0;
    min-width: 0;
    min-height: 0;
    max-width: none;
}

#routingAddPopup .routing-add-grid-section[data-coach="facility-grid"] .ag-theme-alpine {
    width: 100%;
}

#routingAddPopup .routing-add-grid-section[data-coach="facility-grid"] .ag-root-wrapper.ag-layout-normal.ag-ltr {
    width: 100%;
}

#routingAddPopup .routing-add-grid-section[data-coach="material-grid"] {
    flex: 1.3 1 0;
    min-width: 0;
    min-height: 0;
    max-width: none;
}

#routingAddPopup .routing-add-grid-section[data-coach="material-grid"] .ag-theme-alpine {
    width: 100%;
}

#routingAddPopup .routing-add-grid-section[data-coach="material-grid"] .ag-root-wrapper.ag-layout-normal.ag-ltr {
    width: 100%;
}

#routingAddPopup.routing-no-material [data-coach="material-grid"],
#routingAddPopup.routing-no-material [data-material-management] {
    opacity: .48;
    filter: grayscale(1);
    pointer-events: none;
    user-select: none;
}

#routingAddPopup.routing-no-material [data-coach="material-grid"]::after {
    content: "PRO 요금제부터 자재관리 사용 가능";
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
}

.routing-plan-locked-value {
    color: #94a3b8;
    cursor: not-allowed;
    filter: grayscale(1);
}

#routingAddPopup .routing-add-input-section {
    flex: 0 0 220px;
    min-width: 220px;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding-right: 4px;
    padding-bottom: 8px;
}

.routing-type-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-height: 30px;
    margin-bottom: 6px;
}

.routing-popup-search {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.routing-popup-search input {
    width: 220px;
    height: 32px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0 10px;
    color: #334155;
    font-size: 12px;
    font-weight: 400;
}

.routing-popup-search input::placeholder {
    color: #94a3b8;
    font-weight: 400;
    opacity: 1;
}

.required-star {
    color: #dc2626;
    font-weight: 700;
    margin-left: 3px;
}

.routing-type-filter button {
    height: 26px;
    min-width: 46px;
    padding: 0 9px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.routing-type-filter button.active {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

#routingAddPopup .mes-pagination {
    flex: 0 0 auto;
    margin-bottom: 0;
    padding-top: 6px;
    min-height: 36px;
}

#routingAddPopup .mes-pagination-size {
    display: none;
}

#routingAddPopup .mes-pagination-summary {
    display: none;
}

.routing-facility-check {
    width: 16px;
    height: 16px;
    border: 1px solid #9ca3af;
    border-radius: 3px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    cursor: pointer;
    box-sizing: border-box;
}

.routing-facility-check.checked {
    background: #2563eb;
    border-color: #2563eb;
}

.routing-facility-check.checked::after {
    content: "";
    width: 8px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
    margin-top: -2px;
}

#facilityGrid .routing-empty-header .ag-header-cell-label,
#facilityGrid .routing-empty-header .ag-header-cell-menu-button,
#facilityGrid .routing-empty-header .ag-header-cell-filter-button,
#facilityGrid .routing-empty-header .ag-header-icon {
    display: none !important;
}

.routing-inline-detail {
    position: fixed;
    z-index: 10000;
    min-width: 320px;
    max-width: 520px;
    max-height: 260px;
    overflow: auto;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
    padding: 8px;
    font-size: 12px;
    color: #111827;
}

.routing-inline-detail-title {
    font-weight: 700;
    margin-bottom: 6px;
    color: #334155;
}

.routing-inline-detail-row {
    display: grid;
    grid-template-columns: 110px 1fr 70px;
    gap: 8px;
    padding: 6px 4px;
    border-bottom: 1px solid #e5e7eb;
}

.routing-inline-detail-head {
    font-weight: 700;
    background: #f8fafc;
    border-radius: 4px;
}

.routing-inline-detail-row:last-child {
    border-bottom: 0;
}

.routing-inline-detail-primary {
    color: #2563eb;
    font-weight: 700;
}

.routing-detail-link {
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
}

.routing-reason-editor {
    position: fixed;
    z-index: 10001;
    width: 420px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
    padding: 12px;
}

.routing-reason-editor textarea {
    width: 100%;
    height: 130px;
    resize: vertical;
}

.routing-rev-delete-btn {
    padding-top: 2px;
    padding-bottom: 2px;
    min-height: 24px;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

#facilityGrid .ag-cell-menu-button,
#facilityGrid .ag-header-cell-menu-button {
    display: none !important;
}

.routing-work-content-layout {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) 360px;
    gap: 14px;
    min-height: 430px;
}

.routing-work-content-list {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: auto;
}

#routingWorkContentGrid {
    height: 430px;
    width: 100%;
}

.routing-work-content-form {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.routing-work-content-form textarea {
    min-height: 76px;
    resize: vertical;
}

.routing-sheet-template-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.routing-sheet-manage-layout {
    display: grid;
    grid-template-columns: 220px 620px;
    gap: 14px;
    width: 854px;
    margin: 0 auto;
}

.routing-sheet-sample-frame {
    width: 810px;
    height: 1123px;
    border: 0;
    background: #fff;
    transform: scale(var(--routing-sheet-preview-scale, 0.62));
    transform-origin: top left;
}

.routing-sheet-a4-preview {
    width: 620px;
    aspect-ratio: 210 / 297;
    height: 792px;
    max-height: calc(100vh - 170px);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 0 auto;
    box-sizing: border-box;
}

.routing-sheet-a4-frame-box {
    width: calc(810px * var(--routing-sheet-preview-scale, 0.62));
    height: calc(1123px * var(--routing-sheet-preview-scale, 0.62));
    flex: 0 0 auto;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22);
}

.routing-sheet-ready-box {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    border: 1px dashed #cbd5e1;
}

.routing-sheet-ready-title {
    color: #111827;
    font-size: 26px;
    font-weight: 800;
}

.routing-sheet-ready-desc {
    color: #64748b;
    font-size: 14px;
}

.routing-sheet-template-card {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    cursor: pointer;
}

.routing-sheet-theme-gray {
    --sheet-theme-color: #9ca3af;
    --sheet-theme-shadow: rgba(156, 163, 175, 0.18);
}

.routing-sheet-theme-blue {
    --sheet-theme-color: #93c5fd;
    --sheet-theme-shadow: rgba(147, 197, 253, 0.22);
}

.routing-sheet-theme-yellow {
    --sheet-theme-color: #fde68a;
    --sheet-theme-shadow: rgba(253, 230, 138, 0.28);
}

.routing-sheet-template-card.active {
    border-color: var(--sheet-theme-color, #2563eb);
    box-shadow: 0 0 0 2px var(--sheet-theme-shadow, rgba(37, 99, 235, 0.12));
}

.routing-sheet-template-card strong {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: #111827;
}

.routing-sheet-template-swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(17, 24, 39, 0.18);
    background: var(--sheet-theme-color, #94a3b8);
    flex: 0 0 auto;
}

.routing-sheet-template-card span {
    display: block;
    min-height: 34px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.45;
}

.routing-sheet-preview-wrap {
    max-height: 66vh;
    overflow: auto;
    border: 1px solid #d1d5db;
    background: #f8fafc;
    padding: 14px;
}

.routing-sheet-preview-wrap.routing-sheet-a4-preview {
    max-height: calc(100vh - 170px);
    overflow: hidden;
    padding: 10px;
}

.routing-sheet-preview-iframe {
    width: 100%;
    height: min(76vh, 980px);
    border: 0;
    background: #fff;
}

.routing-sheet-model-a {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 8mm 9mm;
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #d4d4d4;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    font-family: "Malgun Gothic", Arial, sans-serif;
    font-size: 10px;
}

.routing-sheet-model-a .model-a-doc-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 2px solid #888;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.routing-sheet-model-a .model-a-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 4px;
}

.routing-sheet-model-a .model-a-title small {
    display: block;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 1px;
    color: #777;
    margin-top: 1px;
}

.routing-sheet-model-a table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.routing-sheet-model-a th,
.routing-sheet-model-a td {
    border: 1px solid #b8b8b8;
    padding: 4px 6px;
    vertical-align: middle;
}

.routing-sheet-model-a th,
.routing-sheet-model-a .model-a-lbl {
    background: #f4f4f4;
    color: #444;
    font-weight: 700;
    text-align: center;
}

.routing-sheet-model-a .model-a-info {
    margin-bottom: 10px;
}

.routing-sheet-model-a .model-a-card {
    border: 1px solid #b8b8b8;
    margin-bottom: 10px;
    page-break-inside: avoid;
}

.routing-sheet-model-a .model-a-card-top {
    display: grid;
    grid-template-columns: 70px 1fr 280px;
    border-bottom: 1px solid #b8b8b8;
}

.routing-sheet-model-a .model-a-seq {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-right: 1px solid #b8b8b8;
    background: #f9f9f9;
    font-weight: 800;
}

.routing-sheet-model-a .model-a-seq strong {
    font-size: 22px;
    line-height: 1;
}

.routing-sheet-model-a .model-a-proc {
    padding: 8px 10px;
    border-right: 1px solid #b8b8b8;
}

.routing-sheet-model-a .model-a-proc-name {
    font-size: 15px;
    font-weight: 800;
}

.routing-sheet-model-a .model-a-sub-bar {
    padding: 4px 7px;
    border-top: 1px solid #b8b8b8;
    border-bottom: 1px solid #b8b8b8;
    background: #eeeeee;
    font-weight: 800;
}

.routing-sheet-model-a .model-a-work {
    display: grid;
    grid-template-columns: 76px 1fr;
    border-bottom: 1px solid #b8b8b8;
}

.routing-sheet-model-a .model-a-work-label {
    background: #f4f4f4;
    border-right: 1px solid #b8b8b8;
    padding: 6px 7px;
    font-weight: 800;
    text-align: center;
}

.routing-sheet-model-a .model-a-work-text {
    min-height: 34px;
    padding: 6px 8px;
    line-height: 1.45;
}

.routing-sheet-model-a .model-a-field td {
    height: 28px;
}

.routing-sheet-model-a .model-a-empty {
    background: #fff;
}

.routing-sheet-model-a .model-a-foot {
    margin-top: 10px;
    padding-top: 5px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    font-size: 8.5px;
    color: #999;
}

.routing-sheet-model-a {
    --b: #b8b8b8;
    --b2: #d4d4d4;
    --h1: #e4e4e4;
    --h2: #eeeeee;
    --h3: #f4f4f4;
    --sub: #f9f9f9;
    --txt: #1a1a1a;
    --lbl: #444;
    --font: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: #fff;
    color: var(--txt);
    border: 0;
    box-shadow: none;
    font-family: var(--font);
    font-size: 10px;
}

.routing-sheet-model-a *,
.routing-sheet-model-a *::before,
.routing-sheet-model-a *::after {
    box-sizing: border-box;
}

.routing-sheet-model-a .page {
    background: #fff;
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto 20px;
    padding: 8mm 9mm;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}

.routing-sheet-model-a .doc-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #888;
    min-height: 82px;
    padding: 0 0 5px;
    margin-bottom: 10px;
}

.routing-sheet-model-a .doc-top-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 4px;
    color: #222;
}

.routing-sheet-model-a .doc-top-title small {
    display: block;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 1px;
    color: #777;
    margin-top: 1px;
}

.routing-sheet-model-a .doc-top-meta {
    display: flex;
    gap: 14px;
    font-size: 9.5px;
    color: #555;
}

.routing-sheet-model-a .doc-top-meta span b {
    color: #222;
    font-weight: 700;
}

.routing-sheet-model-a .doc-info-wrap {
    border: 1px solid var(--b);
    margin: 8px 0 14px;
}

.routing-sheet-model-a .doc-info-wrap table,
.routing-sheet-model-a .card-id-tbl,
.routing-sheet-model-a .card-tbl,
.routing-sheet-model-a .mat-tbl,
.routing-sheet-model-a .field-tbl {
    width: 100%;
    border-collapse: collapse;
}

.routing-sheet-model-a .doc-info-wrap td {
    padding: 4px 7px;
    border: 1px solid var(--b2);
    height: 21px;
    vertical-align: middle;
}

.routing-sheet-model-a .doc-info-wrap td.lbl {
    background: var(--h1);
    font-weight: 700;
    color: var(--lbl);
    font-size: 9px;
    line-height: 1.25;
    white-space: normal;
    width: 72px;
}

.routing-sheet-model-a .proc-card {
    border: 2px solid #777;
    margin-bottom: 12px;
    page-break-inside: avoid;
    background: #fcfcfc;
}

.routing-sheet-model-a .card-top {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--b);
}

.routing-sheet-model-a .card-seq-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-right: 1px solid var(--b);
    background: var(--h3);
    min-width: 52px;
    gap: 1px;
}

.routing-sheet-model-a .card-seq {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    color: #222;
}

.routing-sheet-model-a .card-operno {
    font-size: 9px;
    color: #666;
    letter-spacing: .5px;
}

.routing-sheet-model-a .card-procname-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5px 10px;
    border-right: 1px solid var(--b);
    background: #fff;
}

.routing-sheet-model-a .card-procname-block .label9 {
    font-size: 8.5px;
    color: #999;
    margin-bottom: 1px;
}

.routing-sheet-model-a .card-procname-block .procname-value {
    font-size: 13px;
    font-weight: 400;
    color: #1a1a1a;
    line-height: 1.35;
    overflow-wrap: anywhere;
    white-space: normal;
}

.routing-sheet-model-a .card-id-tbl {
    font-size: 9.5px;
}

.routing-sheet-model-a .card-id-tbl th,
.routing-sheet-model-a .card-id-tbl td,
.routing-sheet-model-a .card-tbl th,
.routing-sheet-model-a .card-tbl td,
.routing-sheet-model-a .mat-tbl th,
.routing-sheet-model-a .mat-tbl td,
.routing-sheet-model-a .field-tbl th,
.routing-sheet-model-a .field-tbl td {
    border: 1px solid var(--b2);
}

.routing-sheet-model-a .card-id-tbl th {
    background: var(--h1);
    padding: 3px 8px;
    font-weight: 700;
    color: var(--lbl);
    text-align: center;
    white-space: nowrap;
}

.routing-sheet-model-a .card-id-tbl td {
    padding: 3px 8px;
    text-align: center;
    background: var(--sub);
}

.routing-sheet-model-a .card-tbl {
    border-bottom: 1px solid var(--b);
    font-size: 9.5px;
}

.routing-sheet-model-a .card-tbl th,
.routing-sheet-model-a .mat-tbl th,
.routing-sheet-model-a .field-tbl th {
    background: var(--h2);
    padding: 3px 5px;
    font-weight: 700;
    color: var(--lbl);
    text-align: center;
    white-space: nowrap;
}

.routing-sheet-model-a .card-tbl td,
.routing-sheet-model-a .mat-tbl td {
    padding: 3px 6px;
    height: 22px;
    vertical-align: middle;
    font-size: 13px;
    font-weight: 400;
    overflow-wrap: anywhere;
    white-space: normal;
}

.routing-sheet-model-a .sub-bar {
    background: var(--h1);
    padding: 2px 8px;
    font-size: 9px;
    font-weight: 700;
    color: var(--lbl);
    border-bottom: 1px solid var(--b2);
    letter-spacing: .3px;
}

.routing-sheet-model-a .mat-tbl {
    border-bottom: 1px solid var(--b);
    font-size: 9.5px;
}

.routing-sheet-model-a .text-row {
    border-bottom: 1px solid var(--b);
}

.routing-sheet-model-a .text-row-inner {
    display: flex;
    align-items: stretch;
}

.routing-sheet-model-a .text-row-lbl {
    background: var(--h2);
    border-right: 1px solid var(--b2);
    padding: 5px 7px 4px;
    font-size: 9px;
    font-weight: 700;
    color: var(--lbl);
    display: flex;
    align-items: flex-start;
    white-space: nowrap;
    min-width: 64px;
}

.routing-sheet-model-a .text-row-value {
    flex: 1;
    min-height: 54px;
    padding: 7px 7px;
    font-size: 9.5px;
    line-height: 1.45;
    background: #fff;
    display: flex;
    align-items: center;
}

.routing-sheet-model-a .field-tbl {
    font-size: 9.5px;
}

.routing-sheet-model-a .field-tbl td {
    padding: 3px 6px;
    height: 24px;
    vertical-align: middle;
}

.routing-sheet-model-a .doc-foot {
    margin-top: 10px;
    padding-top: 5px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    font-size: 8.5px;
    color: #bbb;
}

.routing-sheet-document {
    background: #fff;
    color: #111827;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 20px;
    font-size: 12px;
}

.routing-sheet-doc-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 2px solid #111827;
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.routing-sheet-doc-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0;
}

.routing-sheet-meta {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 4px 8px;
    min-width: 260px;
}

.routing-sheet-table {
    width: 100%;
    border-collapse: collapse;
}

.routing-sheet-table th,
.routing-sheet-table td {
    border: 1px solid #cbd5e1;
    padding: 7px 8px;
    vertical-align: top;
}

.routing-sheet-table th {
    background: #eef2f7;
    text-align: center;
    font-weight: 700;
}

.routing-sheet-step {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.routing-sheet-step:last-child {
    border-bottom: 0;
}

.routing-sheet-step-no {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.routing-sheet-chip {
    display: inline-block;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 2px 8px;
    margin: 4px 4px 0 0;
    background: #f8fafc;
}

.routing-sheet-check-row {
    display: grid;
    grid-template-columns: 34px 64px 1fr 140px 110px;
    gap: 0;
    border-bottom: 1px solid #cbd5e1;
}

.routing-sheet-check-row > div {
    padding: 8px;
    border-right: 1px solid #cbd5e1;
}

.routing-sheet-check-row > div:last-child {
    border-right: 0;
}

.routing-sheet-check-row.header {
    background: #eef2f7;
    font-weight: 700;
    text-align: center;
    border-top: 1px solid #cbd5e1;
}

.routing-sheet-kai {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    border: 1px solid #111;
    border-radius: 0;
    padding: 10mm;
    font-family: Arial, "Malgun Gothic", sans-serif;
}

.routing-sheet-kai .kai-title {
    text-align: center;
    font-size: 24px;
    font-style: italic;
    font-weight: 800;
    border-bottom: 2px solid #111;
    padding-bottom: 6px;
    margin-bottom: 8px;
}

.routing-sheet-kai .kai-section {
    border: 1px solid #111;
    padding: 6px;
    margin-bottom: 10px;
}

.routing-sheet-kai .kai-section-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
}

.routing-sheet-kai .kai-op-card {
    border: 1px solid #111;
    padding: 8px;
    margin-top: 8px;
}

.routing-sheet-kai .kai-op-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.routing-sheet-kai .kai-op-no {
    font-size: 20px;
    font-weight: 800;
}

.routing-sheet-tct {
    width: 470px;
    margin: 0 auto;
    border: 2px solid #111;
    border-radius: 0;
    padding: 0;
    font-family: Arial, "Malgun Gothic", "Gulim", sans-serif;
    font-size: 7px;
}

.routing-sheet-tct table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.routing-sheet-tct th,
.routing-sheet-tct td {
    border: 1px solid #111;
    padding: 3px 4px;
    font-size: 7px;
    line-height: 1.15;
    vertical-align: middle;
}

.routing-sheet-tct .tct-brand {
    height: 58px;
    padding-left: 10px;
}

.routing-sheet-tct .tct-logo {
    color: #d4001a;
    font-size: 26px;
    font-style: italic;
    font-weight: 900;
}

.routing-sheet-tct .tct-main-title {
    margin-left: 10px;
    font-size: 12px;
    font-weight: 900;
}

.routing-sheet-tct .tct-barcode {
    height: 20px;
    background: repeating-linear-gradient(90deg, #111 0 1px, transparent 1px 3px, #111 3px 5px, transparent 5px 8px);
}

.routing-sheet-tct .empty-bind,
.routing-sheet-hybrid .empty-bind {
    background: #fff59d;
}

.routing-sheet-tct .seq-cell,
.routing-sheet-tct .proc-cell,
.routing-sheet-tct .detail-cell,
.routing-sheet-tct .narrow-cell {
    text-align: center;
    font-weight: 800;
}

.routing-sheet-tct .instruction-cell {
    text-align: left;
    font-weight: 700;
}

.routing-sheet-tct .instruction-blue {
    color: #0b56b3;
}

.routing-sheet-tct .barcode-row td {
    height: 22px;
}

.routing-sheet-hybrid {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    border: 1px solid #111;
    border-radius: 0;
    padding: 9mm;
    font-family: "Malgun Gothic", Arial, sans-serif;
}

.routing-sheet-hybrid .hybrid-title-row {
    display: grid;
    grid-template-columns: 150px 1fr 180px;
    border: 2px solid #111;
    margin-bottom: 8px;
}

.routing-sheet-hybrid .hybrid-title-row > div {
    border-right: 1px solid #111;
    padding: 8px;
}

.routing-sheet-hybrid .hybrid-title-row > div:last-child {
    border-right: 0;
}

.routing-sheet-hybrid .hybrid-title {
    text-align: center;
    font-size: 22px;
    font-weight: 900;
}

.routing-sheet-hybrid .hybrid-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.routing-sheet-hybrid .hybrid-box {
    border: 1px solid #111;
    padding: 8px;
}

.routing-sheet-hybrid .hybrid-box-title {
    font-weight: 900;
    margin-bottom: 6px;
}

/* Static styles migrated from the EJS markup. */
.mes-local-style-001 { width: 130px; }
.mes-local-style-002 { width:784px; }
.mes-local-style-003 { margin-bottom:10px; }
.mes-local-style-004 { font-size:12px;color:#6b7280;margin-bottom:6px;padding-left:4px;margin-left:143px; }
.mes-local-style-005 { height:300px; padding-left:40px; }
.mes-local-style-006 { width:calc(100% - 40px); margin-left:40px; }
.mes-local-style-007 { width:min(98vw, 1560px); max-height:calc(81vh + 50px); }
.mes-local-style-008 { height:min(68vh, 670px); gap:16px; }
.mes-local-style-009 { min-height:110px; max-height:150px; overflow:auto; font-size:12px; }
.mes-local-style-010 { height: 162px; }
.mes-local-style-011 { margin-right: 18px; }
.mes-local-style-012 { width:min(96vw, 1180px); max-height:86vh; }
.mes-local-style-013 { width:min(96vw, 960px); max-height:96vh; }
.mes-local-style-014 { font-size:12px;color:#6b7280;margin-bottom:10px; }

/* Styles used by generated HTML. */
.mes-local-style-015 { color:#dc2626; }
.mes-local-style-016 { width:72px;height:24px;padding:0 6px;font-size:11px; }
.mes-local-style-017 { height:24px;padding:0 8px;font-size:11px; }
.mes-local-style-018 { padding:30px;text-align:center;color:#6b7280; }
.mes-local-style-019 { text-align:center; }
.mes-local-style-020 { width:42px; }
.mes-local-style-021 { width:92px; }
.mes-local-style-022 { width:76px; }
.mes-local-style-023 { width:12%; }
.mes-local-style-024 { width:20%; }
.mes-local-style-025 { margin-top:10px; }
.mes-local-style-026 { width:14%; }
.mes-local-style-027 { width:18%; }
.mes-local-style-028 { display:flex;justify-content:space-between;border-bottom:2px solid #111;padding-bottom:4px;margin-bottom:8px; }
.mes-local-style-029 { font-size:15px;font-weight:800; }
.mes-local-style-030 { text-align:right; }
.mes-local-style-031 { text-align:right;font-weight:900; }
.mes-local-style-032 { width:68%; }
.mes-local-style-033 { width:32%; }
.mes-local-style-034 { width:19%; }
.mes-local-style-035 { width:81%; }
.mes-local-style-036 { width:21%; }
.mes-local-style-037 { width:8%; }
.mes-local-style-038 { width:7%; }
.mes-local-style-039 { width:13%; }
.mes-local-style-040 { height:18px;display:flex;align-items:center;justify-content:center;font-weight:900; }
.mes-local-style-041 { width:46%; }
.mes-local-style-042 { width:5%; }
.mes-local-style-043 { width:6%; }
.mes-local-style-044 { text-align:center;height:40px; }
.mes-local-style-045 { text-align:center;font-weight:900; }
.mes-local-style-046 { color:#475569; }
.mes-local-style-047 { font-weight:900;font-size:22px;color:#d4001a;font-style:italic; }
.mes-local-style-048 { height:42px; }
.mes-local-style-049 { width:9%; }
.mes-local-style-050 { width:16%; }
.mes-local-style-051 { width:15%; }
.mes-local-style-052 { width:10%; }
.mes-local-style-053 { margin-top:8px; }
.mes-local-style-054 { height:88px;border:1px solid #cbd5e1;background:#fff; }
}

/* resources/css/pages/기준정보/사용자정보.css */
@scope (html:has(meta[name="mes-style-page"][content="기준정보/사용자정보"]) > body) {
/* =========================================
   좌우 레이아웃
========================================= */
.horizontal-layout {
    flex-direction: row;
    height: calc(100vh - 140px);
}

.master-grid {
    flex: 8.5;
}

.detail-grid {
    flex: 1.5;
}

.master-grid .ag-theme-alpine,
.detail-grid .ag-theme-alpine {
    height: 100%;
    min-height: 0;
}

.sub-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
}

/* =========================================
   권한 영역
========================================= */
.permission-area {

    flex: 1;

    overflow-y: auto;

    padding-right: 4px;

    display: flex;

    flex-direction: column;

    gap: 12px;
}

/* 그룹 카드 */
.permission-group {

    background: rgba(255,255,255,0.03);

    border: 5px solid rgb(0 0 0 / 6%);

    border-radius: 14px;

    padding: 14px;
}

/* 그룹 제목 */
.permission-title {

    display: flex;

    align-items: center;

    gap: 10px;

    font-size: 14px;

    font-weight: 700;

    color: #111827;

    margin-bottom: 12px;

    padding: 10px 12px;

    border-radius: 10px;

    background: #f8fafc;
}

/* 메뉴 아이템 */
.permission-item {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 10px 12px;

    border-radius: 10px;

    color: var(--text-main);

    font-size: 13px;

    cursor: pointer;

    transition: background 0.15s ease;
}

/* hover 효과 최소화 */
.permission-item:hover {

    background: rgba(255,255,255,0.04);

    transform: none;
}

/* 체크박스 */
.permission-item input,
.permission-title input {

    width: 17px;

    height: 17px;

    accent-color: #64748b;

    cursor: pointer;
}

/* 체크된 상태 */
.permission-item:has(input:checked) {

    background: rgba(255,255,255,0.06);

    border: none;
}

/* 사용자명 */
.permission-user {

    color: #2f6fed !important;

    font-weight: 700;

    font-size: 13px;

    margin-top: 4px;

    display: inline-block;
}

/* 빈 상태 */
.permission-empty {

    display: flex;

    align-items: center;

    justify-content: center;

    height: 100%;

    color: var(--text-dim);

    font-size: 13px;

    border: 1px dashed rgba(255,255,255,0.08);

    border-radius: 12px;

    background: rgba(255,255,255,0.02);
}

/* 스크롤바 */
.permission-area::-webkit-scrollbar {
    width: 6px;
}

.permission-area::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 10px;
}

.permission-area::-webkit-scrollbar-track {
    background: transparent;
}

.initial-user-row,
.ag-row.initial-user-row .ag-cell {
    background: #fff7ed !important;
}

.user-page-note {
    margin: 8px 0 12px;
    padding: 9px 12px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
    line-height: 1.5;
}

/* Static styles migrated from the EJS markup. */
.mes-local-style-001 { width: 107px !important; min-width: 107px; }
.mes-local-style-002 { display: none; width: 112px; }
}

/* resources/css/pages/기준정보/자재정보.css */
@scope (html:has(meta[name="mes-style-page"][content="기준정보/자재정보"]) > body) {
.mes-local-style-001 { width: 120px; }
}

/* resources/css/pages/기준정보/제품정보.css */
@scope (html:has(meta[name="mes-style-page"][content="기준정보/제품정보"]) > body) {
.product-routing-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
}

/* resources/css/pages/기준정보/코드관리.css */
@scope (html:has(meta[name="mes-style-page"][content="기준정보/코드관리"]) > body) {
.order-number-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 15px;
}

.order-number-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-number-field label,
.order-number-checks-title {
    font-size: 12px;
    font-weight: 400;
    color: #000000;
}

.order-number-field input,
.order-number-field select {
    height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0 9px;
    font-size: 13px;
    background: #ffffff;
    color: #111827;
}

.order-number-checks,
.order-number-preview {
    grid-column: 1 / -1;
}

.order-number-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.order-number-check-row label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.order-number-preview {
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
}

.order-number-preview strong {
    font-size: 20px;
    color: #1d4ed8;
    letter-spacing: 0.02em;
}

.order-number-help {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-dim);
}

.order-number-popup {
    width: 560px;
}
}

/* resources/css/pages/기준정보/BOM관리.css */
@scope (html:has(meta[name="mes-style-page"][content="기준정보/BOM관리"]) > body) {
.vertical-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: calc(100vh - 140px);
}
.half-grid { flex: 1; }

.sub-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
}

/* Static styles migrated from the EJS markup. */
.mes-local-style-001 { width:784px; }
.mes-local-style-002 { margin-bottom:10px; }
.mes-local-style-003 { font-size: 12px; color: #6b7280; margin-bottom: 6px; padding-left: 4px; margin-left: 143px; }
.mes-local-style-004 { height:300px; padding-left: 40px; }
.mes-local-style-005 { width:1000px; }
.mes-local-style-006 { height:350px; gap:12px; }
.mes-local-style-007 { flex:3; min-width:0; }
.mes-local-style-008 { height:100%; }
.mes-local-style-009 { flex:1; display:flex; flex-direction:column; gap:10px; }
.mes-local-style-010 { height: 253px; }
}

/* resources/css/pages/로그인/가입승인.css */
@scope (html:has(meta[name="mes-style-page"][content="로그인/가입승인"]) > body) {
.approval-alert {
    margin: 10px 20px;
}

.approval-layout {
    gap: 10px;
    padding: 10px 0;
}

.approval-pane {
    flex: 1 1 0;
}

.approval-grid {
    height: 600px;
}

/* Styles used by generated HTML. */
.mes-local-style-001 { color:#999; }
}

/* resources/css/pages/마이페이지.css */
@scope (html:has(meta[name="mes-style-page"][content="마이페이지"]) > body) {
.mypage-wrap {
    max-width: 560px;
    margin: 0 auto;
}

.mypage-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 18px;
}

.mypage-summary {
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 13px;
    line-height: 1.5;
}

.password-check-message {
    min-height: 18px;
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.4;
}

.password-check-message.ok {
    color: #15803d;
}

.password-check-message.warn {
    color: #b45309;
}

.password-check-message.error {
    color: #dc2626;
}
}

/* resources/css/pages/생산관리/생산모니터링.css */
@scope (html:has(meta[name="mes-style-page"][content="생산관리/생산모니터링"]) > body) {
.production-monitor-page {
    padding-bottom: 28px;
    overflow-y: auto;
}

.production-monitor-head {
    justify-content: space-between;
    gap: 12px;
}

.production-monitor-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.monitor-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

.monitor-view-toggle button {
    height: 28px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.monitor-view-toggle button.active {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.monitor-refresh-timer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #ffffff;
    color: #111827;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.monitor-filter {
    display: grid;
    grid-template-columns: 230px auto;
    align-items: end;
    gap: 10px;
    margin: 18px 0;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.monitor-filter label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
}

.monitor-filter-description {
    min-height: 31px;
    display: flex;
    align-items: center;
    margin-left: 8px;
    padding: 0 2px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}

.monitor-date-filter {
    display: inline-flex;
    align-items: end;
    gap: 5px;
}

.monitor-date-filter .worker-select-wrap {
    width: 86px;
}

.monitor-date-filter .worker-input,
.monitor-date-filter .monitor-date-input {
    height: 31px;
    border-radius: 7px;
    border: 1px solid #cbd5e1;
    font-size: 11px;
    color: #0f172a;
    background-color: #ffffff;
}

.monitor-date-filter .worker-input {
    padding: 0 24px 0 8px;
}

.monitor-date-filter .monitor-date-input {
    width: 100px;
    padding: 0 5px;
}

.monitor-date-filter .date-range-separator {
    height: 31px;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    color: #64748b;
}

.monitor-date-filter .monitor-filter-submit {
    width: 58px;
    height: 31px;
    border-radius: 7px;
    font-size: 11px;
    padding: 0;
}

.monitor-status-legend {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding-top: 2px;
}

.monitor-legend-item,
.monitor-status-description-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    color: #475569;
}

.monitor-legend-item {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.monitor-legend-item.active {
    color: #111827;
    font-weight: 900;
}

.monitor-legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid transparent;
}

.monitor-legend-swatch.all { background: #ffffff; border-color: #94a3b8; }
.monitor-legend-swatch.waiting,
.monitor-matrix-cell.waiting { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }
.monitor-legend-swatch.running,
.monitor-legend-swatch.in-progress,
.monitor-matrix-cell.running,
.monitor-matrix-cell.in-progress { background: #dbeafe; border-color: #93c5fd; color: #1d4ed8; }
.monitor-legend-swatch.paused,
.monitor-matrix-cell.paused { background: #fef3c7; border-color: #fcd34d; color: #a16207; }
.monitor-legend-swatch.partial,
.monitor-matrix-cell.partial { background: #f0fdf4; border-color: #86efac; color: #166534; }
.monitor-legend-swatch.done,
.monitor-matrix-cell.done { background: #dcfce7; border-color: #86efac; color: #15803d; }
.monitor-legend-swatch.planned,
.monitor-matrix-cell.planned { background: #ffffff; border-color: #cbd5e1; color: #64748b; }
.monitor-legend-swatch.routing-missing,
.monitor-matrix-cell.routing-missing { background: #fee2e2; border-color: #fecaca; color: #b91c1c; }

.monitor-card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    min-width: 0;
}

.monitor-card-stage {
    min-width: 0;
}

.monitor-view[hidden] {
    display: none !important;
}

.monitor-grid-view {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    overflow: auto;
}

.monitor-matrix {
    display: grid;
    min-width: max-content;
}

.monitor-matrix-head,
.monitor-matrix-row {
    display: grid;
    grid-template-columns: 210px repeat(var(--process-count), 60px);
}

.monitor-matrix-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
}

.monitor-matrix-corner,
.monitor-matrix-process,
.monitor-matrix-order,
.monitor-matrix-cell {
    width: 60px;
    height: 60px;
    padding: 5px 4px;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
}

.monitor-matrix-corner,
.monitor-matrix-order {
    width: 210px;
    box-sizing: border-box;
    padding-left: 12px;
}

.monitor-matrix-corner,
.monitor-matrix-process {
    height: 42px;
    font-size: 12px;
    font-weight: 900;
    color: #334155;
}

.monitor-matrix-process {
    justify-content: center;
    text-align: center;
}

.monitor-matrix-order {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 900;
    color: #111827;
}

.monitor-matrix-product {
    max-width: 185px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
}

.monitor-matrix-cell {
    flex-direction: column;
    justify-content: center;
    border-radius: 0;
    text-align: center;
}

.monitor-matrix-process-name {
    max-width: 52px;
    max-height: 50px;
    overflow: hidden;
    white-space: normal;
    word-break: keep-all;
    overflow-wrap: anywhere;
    line-height: 1.25;
    font-size: 11px;
    font-weight: 900;
}

.monitor-matrix-cell.empty {
    background: #f8fafc;
    color: #cbd5e1;
}

.production-monitor-page .mes-pagination-summary {
    display: none;
}

.monitor-card {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    overflow: hidden;
}

.monitor-card-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 15px 16px 12px;
    border-bottom: 1px solid #edf2f7;
}

.monitor-po {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.monitor-po strong {
    font-size: 17px;
    color: #111827;
}

.monitor-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.monitor-status.waiting { background: #f1f5f9; color: #475569; }
.monitor-status.running,
.monitor-status.in-progress { background: #dbeafe; color: #1d4ed8; }
.monitor-status.paused { background: #fef3c7; color: #a16207; }
.monitor-status.done { background: #dcfce7; color: #15803d; }
.monitor-status.routing-missing { background: #fee2e2; color: #b91c1c; }

.monitor-product {
    margin-top: 8px;
    font-size: 14px;
    font-weight: 800;
    color: #334155;
}

.monitor-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 7px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.monitor-rate {
    min-width: 86px;
    text-align: right;
}

.monitor-rate strong {
    display: block;
    font-size: 24px;
    line-height: 1;
    color: #111827;
}

.monitor-rate span {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
}

.monitor-card-body {
    padding: 14px 16px 16px;
}

.process-flow {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 26px 28px;
}

.process-step {
    position: relative;
    min-height: 330px;
    padding: 12px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    overflow: visible;
}

.process-step::after {
    content: "";
    position: absolute;
    inset: -3px;
    z-index: 3;
    border-radius: 10px;
    padding: 3px;
    background:
        linear-gradient(90deg, #7890ad 55%, transparent 0) 0 0 / 22px 3px repeat-x,
        linear-gradient(90deg, #7890ad 55%, transparent 0) 0 100% / 22px 3px repeat-x,
        linear-gradient(0deg, #7890ad 55%, transparent 0) 0 0 / 3px 22px repeat-y,
        linear-gradient(0deg, #7890ad 55%, transparent 0) 100% 0 / 3px 22px repeat-y;
    pointer-events: none;
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.process-step.running::after {
    background:
        linear-gradient(90deg, #3b82f6 55%, transparent 0) 0 0 / 22px 3px repeat-x,
        linear-gradient(90deg, #3b82f6 55%, transparent 0) 0 100% / 22px 3px repeat-x,
        linear-gradient(0deg, #3b82f6 55%, transparent 0) 0 0 / 3px 22px repeat-y,
        linear-gradient(0deg, #3b82f6 55%, transparent 0) 100% 0 / 3px 22px repeat-y;
    animation: stepBorderMarch 1s linear infinite;
}

.process-step.done::after {
    background:
        linear-gradient(90deg, #16a34a 55%, transparent 0) 0 0 / 22px 3px repeat-x,
        linear-gradient(90deg, #16a34a 55%, transparent 0) 0 100% / 22px 3px repeat-x,
        linear-gradient(0deg, #16a34a 55%, transparent 0) 0 0 / 3px 22px repeat-y,
        linear-gradient(0deg, #16a34a 55%, transparent 0) 100% 0 / 3px 22px repeat-y;
}

.process-step.partial::after {
    background:
        linear-gradient(90deg, #86efac 55%, transparent 0) 0 0 / 22px 3px repeat-x,
        linear-gradient(90deg, #86efac 55%, transparent 0) 0 100% / 22px 3px repeat-x,
        linear-gradient(0deg, #86efac 55%, transparent 0) 0 0 / 3px 22px repeat-y,
        linear-gradient(0deg, #86efac 55%, transparent 0) 100% 0 / 3px 22px repeat-y;
}

.process-step.paused::after {
    background:
        linear-gradient(90deg, #f59e0b 55%, transparent 0) 0 0 / 22px 3px repeat-x,
        linear-gradient(90deg, #f59e0b 55%, transparent 0) 0 100% / 22px 3px repeat-x,
        linear-gradient(0deg, #f59e0b 55%, transparent 0) 0 0 / 3px 22px repeat-y,
        linear-gradient(0deg, #f59e0b 55%, transparent 0) 100% 0 / 3px 22px repeat-y;
}

.process-step:not(:last-child) .step-flow-line {
    position: absolute;
    top: 50%;
    right: -22px;
    width: 18px;
    height: 2px;
    background: #94a3b8;
    transform: translateY(-50%);
    z-index: 4;
    pointer-events: none;
}

.process-step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: 50%;
    right: -24px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid #94a3b8;
    transform: translateY(-50%);
    z-index: 4;
}

.process-step.is-row-end:not(:last-child) .step-flow-line {
    top: auto;
    right: 50%;
    bottom: -22px;
    width: 2px;
    height: 18px;
    transform: translateX(50%);
}

.process-step.is-row-end:not(:last-child)::before {
    top: auto;
    right: 50%;
    bottom: -24px;
    border-top: 8px solid #94a3b8;
    border-right: 6px solid transparent;
    border-left: 6px solid transparent;
    border-bottom: 0;
    transform: translateX(50%);
}

.process-step.is-reverse-row:not(:last-child) .step-flow-line {
    left: -22px;
    right: auto;
}

.process-step.is-reverse-row:not(:last-child)::before {
    left: -24px;
    right: auto;
    border-top: 6px solid transparent;
    border-right: 8px solid #94a3b8;
    border-bottom: 6px solid transparent;
    border-left: 0;
}

.process-step.is-reverse-row.is-row-end:not(:last-child) .step-flow-line {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

.process-step.is-reverse-row.is-row-end:not(:last-child)::before {
    left: 50%;
    right: auto;
    border-top: 8px solid #94a3b8;
    border-right: 6px solid transparent;
    border-left: 6px solid transparent;
    border-bottom: 0;
    transform: translateX(-50%);
}

.process-step.done { background: #dcfce7; border-color: #16a34a; }
.process-step.running { background: #eff6ff; border-color: #93c5fd; }
.process-step.paused { background: #fffbeb; border-color: #fcd34d; }
.process-step.partial { background: #f0fdf4; border-color: #86efac; }
.process-step.waiting { background: #ffffff; border-color: #cbd5e1; }
.process-step.planned { background: #f8fafc; border-style: dashed; color: #64748b; }

.step-top {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
}

.step-seq {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #111827;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.step-state {
    font-size: 11px;
    font-weight: 900;
    color: #475569;
}

.step-head-main {
    min-width: 0;
}

.step-name {
    position: relative;
    z-index: 1;
    margin-top: 0;
    min-height: 0;
    font-size: 13px;
    font-weight: 900;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.step-facility {
    position: relative;
    z-index: 1;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.step-qty,
.step-worker {
    position: relative;
    z-index: 1;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.step-qty {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin-top: 6px;
}

.step-qty span {
    display: block;
    padding: 6px 4px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-align: center;
    white-space: nowrap;
    font-size: 11px;
}

.step-top,
.step-worker {
    padding: 4px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .86);
}

.step-qty b {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: #111827;
}

.empty-monitor {
    padding: 64px 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    color: #94a3b8;
    font-weight: 800;
}

@media (max-width: 1200px) {
    .monitor-card-list {
        grid-template-columns: 1fr;
    }

    .process-flow {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .monitor-filter {
        grid-template-columns: 1fr;
    }

}

:scope.production-monitor-board-mode {
    overflow: hidden;
}

:scope.production-monitor-board-mode .sidebar,
:scope.production-monitor-board-mode .top-nav,
:scope.production-monitor-board-mode .mes-footer,
:scope.production-monitor-board-mode .monitor-filter {
    display: none !important;
}

:scope.production-monitor-board-mode .production-monitor-page {
    position: fixed;
    inset: 0;
    z-index: 9999;
    margin: 0;
    width: 100vw;
    height: 100vh;
    padding: 18px;
    overflow-y: auto;
    background: #f8fafc;
}

:scope.production-monitor-board-mode .grid-header {
    margin-bottom: 12px;
}

:scope.production-monitor-board-mode .monitor-card-list {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
}

:scope.production-monitor-board-mode .step-machine-visual {
    height: auto;
}

:scope.production-monitor-board-mode .monitor-refresh-timer {
    height: 36px;
    min-width: 150px;
    background: #ffffff;
    color: #111827;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
}
}

/* resources/css/pages/생산관리/생산현황.css */
@scope (html:has(meta[name="mes-style-page"][content="생산관리/생산현황"]) > body) {
.production-status-page {
    gap: 10px;
    min-height: 0;
    height: calc(100vh - 89px);
    overflow-y: auto;
    padding-bottom: 48px;
    scrollbar-gutter: stable;
}

.status-filter {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    display: grid;
    grid-template-columns: 160px 160px 190px 74px 74px;
    gap: 10px;
    align-items: end;
    justify-content: start;
}

.status-filter label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.status-filter .worker-select-wrap {
    width: 190px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.kpi-card,
.chart-card,
.status-grid-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.kpi-card {
    padding: 14px 16px;
    position: relative;
    overflow: hidden;
    border-left: 4px solid #cbd5e1;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: #cbd5e1;
    opacity: .8;
}

.kpi-card.kpi-production-total {
    border-left-color: #475569;
}

.kpi-card.kpi-production-total::before {
    background: #475569;
}

.kpi-card.kpi-good {
    border-left-color: #16a34a;
}

.kpi-card.kpi-good::before {
    background: #16a34a;
}

.kpi-card.kpi-defect {
    border-left-color: #dc2626;
}

.kpi-card.kpi-defect::before {
    background: #dc2626;
}

.kpi-card.kpi-yield {
    border-left-color: #0f766e;
}

.kpi-card.kpi-yield::before {
    background: #0f766e;
}

.kpi-card.kpi-production-total .kpi-value {
    color: #334155;
}

.kpi-card.kpi-good .kpi-value {
    color: #15803d;
}

.kpi-card.kpi-defect .kpi-value {
    color: #b91c1c;
}

.kpi-card.kpi-yield .kpi-value {
    color: #0f766e;
}

.kpi-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
}

.sub-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
}

.kpi-value {
    margin-top: 6px;
    font-size: 27px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.kpi-caption {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-dim);
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    min-height: 245px;
}

.chart-card {
    padding: 12px;
    min-width: 0;
}

.chart-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
}

.chart-subtitle {
    font-size: 11px;
    color: var(--text-dim);
}

.chart-canvas-wrap {
    height: 178px;
    margin-top: 10px;
    position: relative;
}

.chart-canvas-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.production-doughnut-box {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    height: 178px;
    margin-top: 10px;
}

.chart-legend-vertical {
    display: grid;
    gap: 6px;
    align-content: center;
    min-width: 0;
}

.chart-legend-item {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    border: 0;
    background: transparent;
    padding: 2px 0;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-main);
    text-align: left;
}

.chart-legend-item.is-hidden {
    opacity: .38;
}

.chart-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.chart-legend-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chart-legend-value {
    color: #334155;
    font-weight: 900;
}

.doughnut-canvas-wrap {
    position: relative;
    height: 100%;
    min-height: 0;
}

.donut-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 175px;
}

.donut-chart {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    position: relative;
    flex: 0 0 auto;
}

.donut-chart::after {
    content: "";
    position: absolute;
    inset: 24px;
    background: #fff;
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--text-main);
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.bar-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 12px;
}

.bar-row {
    display: grid;
    grid-template-columns: 72px 1fr 48px;
    gap: 8px;
    align-items: center;
    font-size: 12px;
}

.bar-label {
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bar-track {
    height: 9px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 999px;
}

.bar-value {
    color: var(--text-dim);
    text-align: right;
    font-weight: 700;
}

.daily-chart {
    display: flex;
    align-items: end;
    gap: 9px;
    height: 145px;
    margin-top: 16px;
}

.daily-item {
    display: flex;
    flex: 1;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    justify-content: end;
    align-items: center;
    gap: 6px;
}

.daily-bar {
    width: 100%;
    max-width: 26px;
    min-height: 3px;
    background: #2f6fed;
    border-radius: 6px 6px 0 0;
}

.daily-label {
    font-size: 11px;
    color: var(--text-dim);
}

.empty-chart {
    height: 165px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 13px;
}

.status-grid-box {
    padding: 10px;
    display: flex;
    height: 700px;
    min-height: 0;
    flex: 0 0 700px;
    flex-direction: column;
}

.status-grid-box .ag-theme-alpine {
    flex: 1 1 auto;
    min-height: 0;
}

.status-grid-box .mes-pagination {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.production-status-grid-search {
    flex: 0 0 auto;
    margin-top: 0;
    margin-bottom: 8px;
}

.production-status-legend {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-left: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}

.production-status-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.production-status-legend-item.active {
    color: #0f172a;
    font-weight: 900;
}

.production-status-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, .08);
}

.production-status-legend-dot.state-all { background: #ffffff; }
.production-status-legend-dot.state-ready { background: #f8fafc; }
.production-status-legend-dot.state-running { background: #eff6ff; }
.production-status-legend-dot.state-paused { background: #fffbeb; }
.production-status-legend-dot.state-done { background: #f0fdf4; }

.ag-theme-alpine .ag-row.production-row-state-ready .ag-cell { background-color: #fbfcfe !important; }
.ag-theme-alpine .ag-row.production-row-state-running .ag-cell { background-color: #f8fbff !important; }
.ag-theme-alpine .ag-row.production-row-state-paused .ag-cell { background-color: #fffdf5 !important; }
.ag-theme-alpine .ag-row.production-row-state-done .ag-cell { background-color: #f8fff9 !important; }

@media (max-width: 1500px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1000px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .status-filter {
        grid-template-columns: 1fr;
    }
}

/* Static styles migrated from the EJS markup. */
.mes-local-style-001 { font-size:11px; font-weight:600; color:#94a3b8; }
}

/* resources/css/pages/생산관리/완제품재고현황.css */
@scope (html:has(meta[name="mes-style-page"][content="생산관리/완제품재고현황"]) > body) {
.finished-stock-page {
    gap: 10px;
    min-height: 0;
    height: calc(100vh - 89px);
    overflow-y: auto;
    padding-bottom: 40px;
    scrollbar-gutter: stable;
}

.stock-filter {
    grid-template-columns: 220px 300px 74px 74px;
    align-items: end;
    gap: 10px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: -18px;
    gap: 10px;
}

.kpi-card {
    position: relative;
    overflow: hidden;
    border-left: 4px solid #cbd5e1;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: #cbd5e1;
    opacity: .8;
}

.kpi-card.kpi-stock-total {
    border-left-color: #0f766e;
}

.kpi-card.kpi-stock-total::before {
    background: #0f766e;
}

.kpi-card.kpi-production-good {
    border-left-color: #2563eb;
}

.kpi-card.kpi-production-good::before {
    background: #2563eb;
}

.kpi-card.kpi-good-convert {
    border-left-color: #16a34a;
}

.kpi-card.kpi-good-convert::before {
    background: #16a34a;
}

.kpi-card.kpi-product-count {
    border-left-color: #64748b;
}

.kpi-card.kpi-product-count::before {
    background: #64748b;
}

.kpi-card.kpi-stock-total .kpi-value {
    color: #0f766e;
}

.kpi-card.kpi-production-good .kpi-value {
    color: #1d4ed8;
}

.kpi-card.kpi-good-convert .kpi-value {
    color: #15803d;
}

.kpi-card.kpi-product-count .kpi-value {
    color: #334155;
}

.stock-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(440px, .75fr);
    gap: 10px;
    height: 500px;
    min-height: 0;
    flex: 0 0 500px;
}

.stock-filter .filter-btn-group{
    display: flex;
    gap: 6px;
}

.stock-panel .mes-pagination {
    flex: 0 0 auto;
    margin-bottom: 0;
}

.stock-panel .ag-theme-alpine {
    flex: 0 0 395px;
    height: 395px;
    min-height: 395px;
}

.stock-panel .ag-theme-alpine .ag-root.ag-layout-normal {
    height: 100% !important;
}


@media (max-width: 1400px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stock-layout {
        grid-template-columns: 1fr;
        height: 1010px;
        flex-basis: 1010px;
    }
}

@media (max-width: 900px) {
    .stock-filter {
        grid-template-columns: 1fr;
    }
}
}

/* resources/css/pages/설비관리/설비모니터링.css */
@scope (html:has(meta[name="mes-style-page"][content="설비관리/설비모니터링"]) > body) {
.facility-monitor-page {
    gap: 10px;
    height: calc(100vh - 89px);
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 54px;
}

.monitor-shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.monitor-left {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.monitor-content-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 10px;
    align-items: start;
}

.monitor-kpi-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.monitor-kpi-card {
    position: relative;
    overflow: hidden;
    border-left: 4px solid #cbd5e1;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.monitor-kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: #cbd5e1;
    opacity: .8;
}

.monitor-kpi-card.kpi-running {
    border-left-color: #2563eb;
}

.monitor-kpi-card.kpi-running::before {
    background: #2563eb;
}

.monitor-kpi-card.kpi-pause {
    border-left-color: #ca8a04;
}

.monitor-kpi-card.kpi-pause::before {
    background: #ca8a04;
}

.monitor-kpi-card.kpi-waiting {
    border-left-color: #64748b;
}

.monitor-kpi-card.kpi-waiting::before {
    background: #64748b;
}

.monitor-kpi-card.kpi-rate {
    border-left-color: #0f766e;
}

.monitor-kpi-card.kpi-rate::before {
    background: #0f766e;
}

.monitor-kpi-card.kpi-production {
    border-left-color: #475569;
}

.monitor-kpi-card.kpi-production::before {
    background: #475569;
}

.monitor-kpi-card.kpi-running .kpi-value {
    color: #1d4ed8;
}

.monitor-kpi-card.kpi-pause .kpi-value {
    color: #a16207;
}

.monitor-kpi-card.kpi-waiting .kpi-value,
.monitor-kpi-card.kpi-production .kpi-value {
    color: #334155;
}

.monitor-kpi-card.kpi-rate .kpi-value {
    color: #0f766e;
}

.monitor-filter,
.monitor-board,
.facility-detail-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.monitor-filter {
    padding: 12px;
    display: grid;
    grid-template-columns: 230px 120px auto;
    column-gap: 4px;
    row-gap: 10px;
    align-items: end;
    justify-content: start;
}

.monitor-filter label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.monitor-filter-submit {
    grid-column: 3;
    justify-self: start;
}

.monitor-board {
    padding: 12px;
    min-height: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.section-title {
    font-size: 13px;
    font-weight: 900;
    color: var(--text-main);
}

.section-caption {
    font-size: 12px;
    color: var(--text-dim);
}

.facility-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
    overflow: visible;
    padding-right: 2px;
    margin-top: 10px;
}

.facility-card {
    position: relative;
    border: 1px solid var(--border-color);
    background: #ffffff;
    border-radius: 10px;
    padding: 13px;
    text-align: left;
    min-height: 340px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    margin-top: 10px;
    overflow: hidden;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.facility-card:hover,
.facility-card.active {
    border-color: #2f6fed;
    transform: translateY(-1px);
}

.facility-card:hover {
    box-shadow: 0 8px 22px rgba(47, 111, 237, .16);
}

.facility-card.active {
    border-color: #1d4ed8;
    box-shadow:
        0 0 0 2px rgba(37, 99, 235, .85),
        0 0 0 6px rgba(59, 130, 246, .22),
        0 14px 34px rgba(37, 99, 235, .26);
}

.facility-card.active::after {
    content: "";
    position: absolute;
    inset: -4px;
    border: 2px solid rgba(96, 165, 250, .9);
    border-radius: 13px;
    pointer-events: none;
    box-shadow: 0 0 18px rgba(59, 130, 246, .55);
}

.facility-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.facility-code {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.1;
}

.facility-name {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-running {
    background: #eaf2ff;
    color: #1d4ed8;
}

.status-running .status-dot {
    background: #2563eb;
}

.status-pause {
    background: #fff7db;
    color: #a16207;
}

.status-pause .status-dot {
    background: #ca8a04;
}

.status-waiting {
    background: #f1f5f9;
    color: #475569;
}

.status-waiting .status-dot {
    background: #94a3b8;
}

.card-metrics {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.facility-card .facility-machine-visual {
    top: 108px;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0 0 10px 10px;
}

.facility-card .mini-factory {
    left: 18px;
    right: 10px;
    height: 178px;
}

.facility-card .factory-building {
    width: 34%;
    height: 68px;
}

.facility-card .factory-chimney {
    left: 7%;
    bottom: 83px;
}

.facility-card .smoke {
    left: calc(7% + 5px);
    bottom: 128px;
}

.facility-card .smoke.s2 {
    left: calc(7% + 22px);
}

.facility-card .smoke.s3 {
    left: calc(7% + 13px);
}

.facility-card .rail {
    left: 30%;
    right: 0;
    bottom: 23px;
}

.facility-card .rail-part {
    left: 30%;
    bottom: 49px;
}

.facility-card .gear {
    right: 70px;
    bottom: 74px;
}

.facility-card .gear.g2 {
    right: 24px;
    bottom: 83px;
}

.facility-card.facility-state-running {
    background: #eff6ff;
    border-color: #93c5fd;
}

.facility-card.facility-state-pause {
    background: #fffbeb;
    border-color: #fcd34d;
}

.facility-card.facility-state-waiting {
    background: #ffffff;
    border-color: #cbd5e1;
}

.card-metric {
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 8px;
    padding: 10px 12px;
    min-width: 0;
}

.card-metric.waiting-job-count {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metric-label {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 800;
}

.metric-value {
    margin-top: 0;
    font-size: 13px;
    color: var(--text-main);
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.facility-detail-panel {
    min-height: 0;
    max-height: calc(100vh - 110px);
    position: sticky;
    top: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.waiting-job-count .metric-value {
    font-size: 17px;
    color: #1d4ed8;
}

.detail-header {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.detail-title {
    font-size: 19px;
    font-weight: 900;
    color: var(--text-main);
    line-height: 1.15;
}

.detail-subtitle {
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-dim);
}

.detail-body {
    padding: 14px;
    overflow: auto;
}

.detail-section {
    margin-bottom: 16px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.info-box,
.job-row {
    border: 1px solid #eef2f7;
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px;
}

.info-box {
    min-width: 0;
}

.info-label {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 800;
}

.info-value {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-main);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.job-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.job-row {
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.job-row.job-running {
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    border-color: #93c5fd;
    box-shadow: inset 4px 0 0 #2563eb;
}

.job-row.job-running .job-state {
    background: #dbeafe;
    color: #1d4ed8;
}

.job-row.job-pause {
    background: linear-gradient(135deg, #fffbeb, #ffffff);
    border-color: #fcd34d;
    box-shadow: inset 4px 0 0 #ca8a04;
}

.job-row.job-pause .job-state {
    background: #fef3c7;
    color: #a16207;
}

.job-row.job-planned {
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border-color: #cbd5e1;
    box-shadow: inset 4px 0 0 #64748b;
}

.job-row.job-planned .job-state {
    background: #e2e8f0;
    color: #334155;
}

.job-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    padding-bottom: 9px;
    border-bottom: 1px solid rgba(148, 163, 184, .22);
}

.job-po {
    font-size: 14px;
    font-weight: 900;
    color: var(--text-main);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.job-state {
    flex: 0 0 auto;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 900;
}

.job-meta {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 8px;
    font-size: 12px;
    color: var(--text-main);
}

.job-meta-item {
    min-width: 0;
}

.job-meta-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: var(--text-dim);
}

.job-meta-value {
    display: block;
    margin-top: 2px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-state {
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    min-height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 13px;
    text-align: center;
    padding: 20px;
}

@media (max-width: 1500px) {
    .monitor-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .monitor-content-row {
        grid-template-columns: 1fr;
    }

    .monitor-filter {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .facility-detail-panel {
        min-height: 420px;
        max-height: none;
        position: static;
    }
}
}

/* resources/css/pages/설비관리/설비점검.css */
@scope (html:has(meta[name="mes-style-page"][content="설비관리/설비점검"]) > body) {
.facility-check-layout {
    height: calc(100vh - 140px);
    min-height: 0;
}

.facility-box {
    flex: 3.5;
}

.check-box {
    flex: 6.5;
}

.facility-box,
.check-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.facility-box .ag-theme-alpine,
.check-box .ag-theme-alpine {
    flex: 1;
    min-height: 0;
}

.sub-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dim);
}

.facility-empty-guide {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: #dc2626;
}

/* Static styles migrated from the EJS markup. */
.mes-local-style-001 { margin-top:0; }
}

/* resources/css/pages/영업관리/수주관리.css */
@scope (html:has(meta[name="mes-style-page"][content="영업관리/수주관리"]) > body) {
/* 🔥 좌우 분할 */
.horizontal-layout {
    height: calc(100vh - 140px);
}

.master-grid {
    flex: 1;
}

/* 🔥 grid 꽉 채우기 */
.master-grid .ag-theme-alpine {
    height: 100%;
    min-height: 0;
}

.half-grid { flex: 1; }

.sub-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
}

.order-list-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
}

.order-list-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.order-date-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.order-date-filter select,
.order-date-filter input {
    height: 28px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #111827;
    font-size: 12px;
    padding: 0 8px;
}

.order-date-filter select {
    width: 86px;
}

.order-date-filter input {
    width: 100px;
}

.order-date-filter .order-keyword-input {
    width: 190px;
}

.order-date-filter .date-sep {
    color: #64748b;
    font-size: 12px;
}

.order-date-filter button {
    height: 28px !important;
    padding: 0 10px !important;
    font-size: 12px;
    line-height: 1;
}

.order-status-legend {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-left: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}

.order-status-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.order-status-legend-item.active {
    color: #0f172a;
    font-weight: 900;
}

.order-status-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, .08);
}

.order-status-legend-dot.state-10 { background: #f8fafc; }
.order-status-legend-dot.state-20 { background: #eff6ff; }
.order-status-legend-dot.state-30 { background: #f0fdfa; }
.order-status-legend-dot.state-40 { background: #f0fdf4; }
.order-status-legend-dot.state-80 { background: #fffbeb; }
.order-status-legend-dot.state-90 { background: #f5f3ff; }
.order-status-legend-dot.state-all { background: #ffffff; }

.ag-theme-alpine .ag-row.order-row-state-10 .ag-cell { background-color: #fbfdff !important; }
.ag-theme-alpine .ag-row.order-row-state-20 .ag-cell { background-color: #f6faff !important; }
.ag-theme-alpine .ag-row.order-row-state-30 .ag-cell { background-color: #f5fdfb !important; }
.ag-theme-alpine .ag-row.order-row-state-40 .ag-cell { background-color: #f6fef8 !important; }
.ag-theme-alpine .ag-row.order-row-state-80 .ag-cell { background-color: #fffdf2 !important; }
.ag-theme-alpine .ag-row.order-row-state-90 .ag-cell { background-color: #faf9ff !important; }
.ag-theme-alpine .ag-row.ag-row-hover .ag-cell { filter: brightness(.985); }



/* 🔥 셀 세로선 제거 */
.ag-row-pinned .ag-cell {
    border-left: none !important;
    border-right: none !important;
}

/* 🔥 배경 강조 (선택) */
.ag-row-pinned {
    background: rgba(34, 197, 94, 0.05);
}
/* 푸터 클릭 했을때 row 디자인 안바꾸기 */
.ag-row-pinned {
    pointer-events: none;
}

.order-number-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 15px;
}

.alert-box.order-prerequisite-alert-box {
    width: min(520px, calc(100vw - 32px));
    padding: 26px;
    text-align: left;
}

.order-prerequisite-guide-title {
    color: #0f172a;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.35;
}

.order-prerequisite-guide-description {
    margin-top: 7px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.55;
}

.order-prerequisite-status-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.order-prerequisite-status-item {
    padding: 13px 15px;
    border: 1px solid #dbe4ee;
    border-left: 4px solid #16a34a;
    border-radius: 9px;
    background: #f8fafc;
}

.order-prerequisite-status-item.is-required {
    border-color: #fed7aa;
    border-left-color: #f97316;
    background: #fffaf5;
}

.order-prerequisite-status-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.order-prerequisite-page-name {
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
}

.order-prerequisite-current-count {
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.order-prerequisite-current-count strong {
    color: #0f172a;
    font-size: 17px;
}

.order-prerequisite-requirement {
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.order-prerequisite-status-item.is-required .order-prerequisite-requirement {
    color: #c2410c;
}

.alert-box.order-prerequisite-alert-box .alert-message {
    margin-bottom: 20px;
}

.alert-box.order-prerequisite-alert-box .alert-actions {
    justify-content: stretch;
    gap: 10px;
}

.alert-box.order-prerequisite-alert-box .alert-actions button {
    flex: 1 1 0;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 560px) {
    .alert-box.order-prerequisite-alert-box .alert-actions {
        flex-direction: column;
    }
}

.order-number-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-number-field label,
.order-number-checks-title {
    font-size: 12px;
    font-weight: 400;
    color: #000000;
}

.order-number-field input,
.order-number-field select {
    height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0 9px;
    font-size: 13px;
    background: #ffffff;
    color: #111827;
}

.order-number-checks {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-number-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
}

.order-number-check-row label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--text-main);
}

.order-number-preview {
    grid-column: 1 / -1;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
}

.order-number-preview strong {
    font-size: 20px;
    color: #1d4ed8;
    letter-spacing: 0.02em;
}

.order-number-help {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-dim);
}

.order-number-popup {
    width: 560px;
}

.order-bulk-guide-animate tbody tr { animation: order-bulk-row-in .38s ease both; }
.order-bulk-guide-animate tbody tr:nth-child(2) { animation-delay: .14s; }
.order-bulk-guide-animate tbody tr:nth-child(3) { animation-delay: .28s; }
@keyframes order-bulk-row-in { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: translateX(0); } }
.mes-excel-context-menu.is-guide-opening { animation: order-bulk-guide-menu-in .34s cubic-bezier(.2,.8,.2,1) both; transform-origin: left top; }
@keyframes order-bulk-guide-menu-in { from { opacity: 0; transform: translateY(-8px) scale(.92); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .order-bulk-guide-animate tbody tr { animation: none; } }

.order-excel-note {
    margin-top: 8px;
    border: 1px solid #d8b761;
    background: #fff4c7;
    color: #1e40af;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.65;
}

.order-number-guide-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(760px, calc(100vw - 56px));
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
    z-index: 10990;
    display: none;
    padding: 10px;
}

.order-number-guide-panel.show {
    display: block;
}

.order-number-guide-title {
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    background: #e5e7eb;
    border: 1px solid #94a3b8;
    border-bottom: 0;
}

.order-number-guide-panel table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 12px;
}

.order-number-guide-panel th,
.order-number-guide-panel td {
    height: 28px;
    border: 1px solid #a8a8a8;
    text-align: center;
    padding: 3px 5px;
}

.order-number-guide-panel th {
    background: #d9e0e8;
    font-weight: 700;
}

.order-number-guide-panel .guide-strong {
    color: #1d4ed8;
    font-weight: 800;
}

/* Static styles migrated from the EJS markup. */
.mes-local-style-001 { width: 112px; display: none; }

/* Styles used by generated HTML. */
.mes-local-style-002 { display:inline-flex;align-items:center;justify-content:center; }
.mes-local-style-003 { color:#dc2626; }
}

/* resources/css/pages/영업관리/수주현황.css */
@scope (html:has(meta[name="mes-style-page"][content="영업관리/수주현황"]) > body) {
.order-status-page {
    gap: 10px;
    min-height: 0;
    height: calc(100vh - 89px);
    overflow-y: auto;
    padding-bottom: 16px;
}

.status-filter {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    display: grid;
    grid-template-columns: 160px 160px 190px 150px 300px 74px 74px;
    gap: 10px;
    align-items: end;
    justify-content: start;
}

.status-filter label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.status-filter .worker-select-wrap {
    width: 190px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.kpi-card,
.chart-card,
.status-grid-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.kpi-card {
    padding: 14px 16px;
    position: relative;
    overflow: hidden;
    border-left: 4px solid #cbd5e1;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: #cbd5e1;
    opacity: .8;
}

.kpi-card.kpi-order-total {
    border-left-color: #475569;
}

.kpi-card.kpi-order-total::before {
    background: #475569;
}

.kpi-card.kpi-order-qty {
    border-left-color: #2563eb;
}

.kpi-card.kpi-order-qty::before {
    background: #2563eb;
}

.kpi-card.kpi-order-amount {
    border-left-color: #0f766e;
}

.kpi-card.kpi-order-amount::before {
    background: #0f766e;
}

.kpi-card.kpi-order-rate {
    border-left-color: #7c3aed;
}

.kpi-card.kpi-order-rate::before {
    background: #7c3aed;
}

.kpi-card.kpi-order-total .kpi-value {
    color: #334155;
}

.kpi-card.kpi-order-qty .kpi-value {
    color: #1d4ed8;
}

.kpi-card.kpi-order-amount .kpi-value {
    color: #0f766e;
}

.kpi-card.kpi-order-rate .kpi-value {
    color: #6d28d9;
}

.kpi-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
}

.sub-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
}

.kpi-value {
    margin-top: 6px;
    font-size: 27px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.kpi-caption {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-dim);
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    min-height: 245px;
}

.chart-card {
    padding: 12px;
    min-width: 0;
}

.chart-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
}

.chart-subtitle {
    font-size: 11px;
    color: var(--text-dim);
}

.chart-canvas-wrap {
    height: 178px;
    margin-top: 10px;
    position: relative;
}

.chart-canvas-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.empty-chart {
    height: 165px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 13px;
}

.status-grid-box {
    padding: 10px;
    display: flex;
    min-height: 420px;
    flex-direction: column;
}

.status-grid-box .ag-theme-alpine {
    flex: 1;
    min-height: 360px;
}

.order-status-legend {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-left: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
}

.order-status-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.order-status-legend-item.active {
    color: #0f172a;
    font-weight: 900;
}

.order-status-legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, .08);
}

.order-status-legend-dot.state-all { background: #ffffff; }
.order-status-legend-dot.state-10 { background: #f8fafc; }
.order-status-legend-dot.state-20 { background: #eff6ff; }
.order-status-legend-dot.state-30 { background: #f0fdfa; }
.order-status-legend-dot.state-40 { background: #f0fdf4; }
.order-status-legend-dot.state-80 { background: #fffbeb; }
.order-status-legend-dot.state-90 { background: #f5f3ff; }

.ag-theme-alpine .ag-row.order-row-state-10 .ag-cell { background-color: #fbfcfe !important; }
.ag-theme-alpine .ag-row.order-row-state-20 .ag-cell { background-color: #f8fbff !important; }
.ag-theme-alpine .ag-row.order-row-state-30 .ag-cell { background-color: #f7fefc !important; }
.ag-theme-alpine .ag-row.order-row-state-40 .ag-cell { background-color: #f8fff9 !important; }
.ag-theme-alpine .ag-row.order-row-state-80 .ag-cell { background-color: #fffdf5 !important; }
.ag-theme-alpine .ag-row.order-row-state-90 .ag-cell { background-color: #fbfaff !important; }

@media (max-width: 1500px) {
    .kpi-grid,
    .chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .status-filter {
        grid-template-columns: 160px 160px 190px 150px 300px;
    }
}

@media (max-width: 1000px) {
    .kpi-grid,
    .chart-grid,
    .status-filter {
        grid-template-columns: 1fr;
    }
}
}

/* resources/css/pages/자재관리/자재입출고.css */
@scope (html:has(meta[name="mes-style-page"][content="자재관리/자재입출고"]) > body) {
.material-io-page {
    min-height: 0;
    height: calc(100vh - 89px);
}

.material-io-history {
    flex: 1;
    min-height: 0;
}

.material-io-popup {
    width: min(92vw, 460px);
}

.material-io-popup-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 15px;
}

.material-io-type-buttons {
    display: flex;
    gap: 8px;
}

.material-io-type-btn {
    flex: 1;
    height: 42px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.material-io-type-btn:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.material-io-type-btn.inactive {
    border-color: #d1d5db;
    background: #e5e7eb;
    color: #9ca3af;
}

.material-io-type-btn.inactive:hover {
    border-color: #94a3b8;
    background: #dbe1e8;
    color: #64748b;
}

.material-io-type-btn[data-value="IN"].active {
    border-color: #22c55e;
    background: #dcfce7;
    color: #15803d;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.14);
}

.material-io-type-btn[data-value="OUT"].active {
    border-color: #ef4444;
    background: #fee2e2;
    color: #b91c1c;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.14);
}

.material-io-qty-input {
    display: flex;
    align-items: center;
    min-height: 38px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
}

.material-io-qty-input:focus-within {
    border-color: #2f6fed;
    box-shadow: 0 0 0 2px rgba(47, 111, 237, 0.2);
}

.material-io-qty-sign {
    display: none;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    width: 36px;
    flex: 0 0 36px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 20px;
    font-weight: 900;
    border-right: 1px solid #fecaca;
}

.material-io-qty-sign.visible {
    display: inline-flex;
}

.material-io-qty-input input {
    min-width: 0;
    border: 0 !important;
    box-shadow: none !important;
}

.material-io-remark-guide {
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
}

.material-empty-guide {
    display: none;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #dc2626;
}

.material-current-stock {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 16px;
    font-weight: 900;
}

.material-current-stock.empty {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
}

.material-io-popup textarea {
    resize: vertical;
}

/* Static styles migrated from the EJS markup. */
.mes-local-style-001 { height:100px; }
}

/* resources/css/pages/자재관리/자재현황.css */
@scope (html:has(meta[name="mes-style-page"][content="자재관리/자재현황"]) > body) {
.material-status-page {
    min-height: 0;
    height: calc(100vh - 89px);
}
}

/* resources/css/pages/출하관리/출하등록.css */
@scope (html:has(meta[name="mes-style-page"][content="출하관리/출하등록"]) > body) {
.shipment-register-page {
    gap: 10px;
    min-height: 0;
    height: calc(100vh - 89px);
}

.horizontal-layout.shipment-register-layout {
    flex-direction: row;
    height: calc(100vh - 140px);
    min-height: 0;
}

.master-grid {
    flex: 6;
}

.detail-grid {
    flex: 4;
}

.master-grid .ag-theme-alpine,
.detail-grid .ag-theme-alpine {
    flex: 1;
    min-height: 0;
}

.shipment-form {
    display: grid;
    gap: 10px;
}

.shipment-form label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.empty-guide {
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 26px 16px;
    background: #f8fafc;
    text-align: center;
}

.empty-guide-title {
    font-size: 15px;
    font-weight: 900;
    color: var(--text-main);
}

.empty-guide-text {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-dim);
}

.po-list-box {
    height: 280px;
    min-height: 0;
}

.shipment-header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.shipment-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 1400px) {
    .horizontal-layout.shipment-register-layout {
        flex-direction: column;
    }

    .master-grid,
    .detail-grid {
        flex: initial;
    }
}

/* Static styles migrated from the EJS markup. */
.mes-local-style-001 { margin-top:0; }
.mes-local-style-002 { height:100%; }
}

/* resources/css/pages/출하관리/출하현황.css */
@scope (html:has(meta[name="mes-style-page"][content="출하관리/출하현황"]) > body) {
.shipment-status-page {
    gap: 10px;
    min-height: 0;
    height: calc(100vh - 89px);
}

.shipment-filter {
    grid-template-columns: 150px 150px 140px 150px 74px 74px minmax(74px, 1fr);
    align-items: end;
}

.shipment-filter .coach-btn {
    justify-self: end;
}

.shipment-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: -18px;
}

.shipment-kpi-card {
    position: relative;
    overflow: hidden;
    border-left: 4px solid #cbd5e1;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.shipment-kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: #cbd5e1;
    opacity: .8;
}

.shipment-kpi-card.kpi-count {
    border-left-color: #2563eb;
}

.shipment-kpi-card.kpi-count::before {
    background: #2563eb;
}

.shipment-kpi-card.kpi-qty {
    border-left-color: #0f766e;
}

.shipment-kpi-card.kpi-qty::before {
    background: #0f766e;
}

.shipment-kpi-card.kpi-product {
    border-left-color: #64748b;
}

.shipment-kpi-card.kpi-product::before {
    background: #64748b;
}

.shipment-kpi-card.kpi-today {
    border-left-color: #16a34a;
}

.shipment-kpi-card.kpi-today::before {
    background: #16a34a;
}

.shipment-kpi-card.kpi-count .mes-kpi-value {
    color: #1d4ed8;
}

.shipment-kpi-card.kpi-qty .mes-kpi-value {
    color: #0f766e;
}

.shipment-kpi-card.kpi-product .mes-kpi-value {
    color: #334155;
}

.shipment-kpi-card.kpi-today .mes-kpi-value {
    color: #15803d;
}

.shipment-status-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, .78fr);
    gap: 10px;
    min-height: 0;
    flex: 1;
}

.status-text {
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 1400px) {
    .shipment-status-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .shipment-filter {
        grid-template-columns: 1fr;
    }
}

/* Static styles migrated from the EJS markup. */
.mes-local-style-001 { width: 88px; }
}

/* resources/css/pages/품질관리/불량관리.css */
@scope (html:has(meta[name="mes-style-page"][content="품질관리/불량관리"]) > body) {
/* 🔥 좌우 분할 */
.defect-management-layout {
    height: calc(100vh - 140px);
    min-height: 0;
}

/* 🔥 비율 */
.master-grid {
    flex: 5.5;
}

.detail-grid {
    flex: 4.5;
}

/* 🔥 grid 꽉 채우기 */
.master-grid .ag-theme-alpine,
.detail-grid .ag-theme-alpine {
    flex: 1;
    min-height: 0;
}



/* 🔥 셀 세로선 제거 */
.ag-row-pinned .ag-cell {
    border-left: none !important;
    border-right: none !important;
}

/* 🔥 배경 강조 (선택) */
.ag-row-pinned {
    background: rgba(34, 197, 94, 0.05);
}
/* 푸터 클릭 했을때 row 디자인 안바꾸기 */
.ag-row-pinned {
    pointer-events: none;
}

/* Static styles migrated from the EJS markup. */
.mes-local-style-001 { margin-top:0; }
.mes-local-style-002 { color: #ef4444 !important; }
.mes-local-style-003 { color: var(--accent-blue) !important; }
.mes-local-style-004 { font-weight:900; color:#000; }

/* Styles used by generated HTML. */
.mes-local-style-005 { display:inline-flex;align-items:center;justify-content:center; }
.mes-local-style-006 { color:#dc2626; }
}

/* resources/css/pages/품질관리/불량현황.css */
@scope (html:has(meta[name="mes-style-page"][content="품질관리/불량현황"]) > body) {
.defect-status-page {
    gap: 10px;
    min-height: 0;
    height: calc(100vh - 89px);
    overflow-y: auto;
    padding-bottom: 16px;
}

.status-filter {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    display: grid;
    grid-template-columns: 160px 160px 190px 74px 74px minmax(90px, 1fr);
    gap: 10px;
    align-items: end;
    justify-content: stretch;
}

.status-filter label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.status-filter .worker-select-wrap {
    width: 190px;
}

.status-filter .coach-btn {
    justify-self: end;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.kpi-card,
.chart-card,
.status-grid-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.kpi-card {
    padding: 14px 16px;
    position: relative;
    overflow: hidden;
    border-left: 4px solid #cbd5e1;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: #cbd5e1;
    opacity: .8;
}

.kpi-card.kpi-defect-total {
    border-left-color: #dc2626;
}

.kpi-card.kpi-defect-total::before {
    background: #dc2626;
}

.kpi-card.kpi-open {
    border-left-color: #ca8a04;
}

.kpi-card.kpi-open::before {
    background: #ca8a04;
}

.kpi-card.kpi-complete-rate {
    border-left-color: #0f766e;
}

.kpi-card.kpi-complete-rate::before {
    background: #0f766e;
}

.kpi-card.kpi-defect-total .kpi-value {
    color: #b91c1c;
}

.kpi-card.kpi-open .kpi-value {
    color: #a16207;
}

.kpi-card.kpi-complete-rate .kpi-value {
    color: #0f766e;
}

.kpi-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
}

.sub-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
}


.kpi-value {
    margin-top: 6px;
    font-size: 27px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.kpi-caption {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-dim);
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    min-height: 245px;
}

.chart-card {
    padding: 12px;
    min-width: 0;
}

.chart-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
}

.chart-subtitle {
    font-size: 11px;
    color: var(--text-dim);
}

.chart-canvas-wrap {
    height: 178px;
    margin-top: 10px;
    position: relative;
}

.chart-canvas-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.donut-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 175px;
}

.donut-chart {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    position: relative;
    flex: 0 0 auto;
}

.donut-chart::after {
    content: "";
    position: absolute;
    inset: 24px;
    background: #fff;
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--text-main);
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.bar-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 12px;
}

.bar-row {
    display: grid;
    grid-template-columns: 72px 1fr 42px;
    gap: 8px;
    align-items: center;
    font-size: 12px;
}

.bar-label {
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bar-track {
    height: 9px;
    background: #eef2f7;
    border-radius: 999px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 999px;
}

.bar-value {
    color: var(--text-dim);
    text-align: right;
    font-weight: 700;
}

.daily-chart {
    display: flex;
    align-items: end;
    gap: 9px;
    height: 145px;
    margin-top: 16px;
}

.daily-item {
    display: flex;
    flex: 1;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    justify-content: end;
    align-items: center;
    gap: 6px;
}

.daily-bar {
    width: 100%;
    max-width: 26px;
    min-height: 3px;
    background: #2f6fed;
    border-radius: 6px 6px 0 0;
}

.daily-label {
    font-size: 11px;
    color: var(--text-dim);
}

.empty-chart {
    height: 165px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 13px;
}

.status-grid-box {
    padding: 10px;
    display: flex;
    flex: 1;
    min-height: 420px;
    flex-direction: column;
}

.status-grid-box .ag-theme-alpine {
    flex: 1;
    min-height: 360px;
}

@media (max-width: 1400px) {
    .chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1000px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .status-filter {
        grid-template-columns: 1fr;
    }
}
}

/* resources/css/pages/현황판/공지사항.css */
@scope (html:has(meta[name="mes-style-page"][content="현황판/공지사항"]) > body) {
.notice-board-page {
    min-height: 0;
    height: calc(100vh - 89px);
    gap: 10px;
}

.notice-board-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(360px, .75fr);
    gap: 14px;
}

.notice-board-feature,
.notice-board-list {
    min-height: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}

.notice-board-feature {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 30px 34px;
    border-color: rgba(47, 111, 237, .22);
    background:
        linear-gradient(135deg, rgba(47, 111, 237, .08), rgba(255, 255, 255, 0) 38%),
        #ffffff;
}

.notice-board-feature::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2f6fed, #22d3ee, #f59e0b);
}

.notice-board-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.notice-board-actions .neon-btn {
    width: 92px;
    font-weight: 800;
}

.notice-board-list {
    overflow: auto;
    padding: 16px;
    background: #fbfdff;
}

.notice-board-list-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 900;
}

.notice-board-count {
    min-width: 28px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(47, 111, 237, .25);
    color: #2f6fed;
    background: #eff6ff;
    font-size: 12px;
    font-weight: 900;
}

.notice-board-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid rgba(47, 111, 237, .25);
    background: rgba(239, 246, 255, .9);
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 0 12px rgba(47, 111, 237, .12);
}

.notice-board-badge.is-main {
    border-color: rgba(245, 158, 11, .35);
    background: #fffbeb;
    color: #b45309;
    box-shadow: 0 0 12px rgba(245, 158, 11, .16);
}

.notice-board-title {
    margin: 20px 0 10px;
    font-size: 34px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.28;
    letter-spacing: 0;
}

.notice-board-date {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.notice-board-date i {
    color: #2f6fed;
}

.notice-board-content {
    flex: 1;
    min-height: 0;
    margin-top: 26px;
    padding: 24px 2px 4px 0;
    border-top: 1px solid #e5e7eb;
    color: #1f2937;
    font-size: 16px;
    line-height: 1.9;
    white-space: pre-line;
    overflow: auto;
}

.notice-board-item {
    position: relative;
    width: 100%;
    text-align: left;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 8px;
    padding: 14px 15px 14px 17px;
    margin-bottom: 10px;
    color: #111827;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
}

.notice-board-item::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: transparent;
}

.notice-board-item:hover,
.notice-board-item.is-active {
    border-color: #2f6fed;
    background: #f8fbff;
    box-shadow:
        0 0 0 1px rgba(47, 111, 237, .08),
        0 8px 18px rgba(47, 111, 237, .12);
    transform: translateY(-1px);
}

.notice-board-item:hover::before,
.notice-board-item.is-active::before {
    background: #2f6fed;
    box-shadow: 0 0 10px rgba(47, 111, 237, .75);
}

.notice-board-item-title {
    font-weight: 900;
    font-size: 14px;
    line-height: 1.35;
}

.notice-board-item-meta {
    margin-top: 7px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.notice-board-main-chip {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid rgba(245, 158, 11, .28);
    font-size: 11px;
    font-weight: 900;
}

.notice-board-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 15px;
    font-weight: 800;
    background: #fbfdff;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
}

@media (max-width: 1100px) {
    .notice-board-layout {
        grid-template-columns: 1fr;
    }
}
}

/* resources/css/pages/현황판/관리자게시판.css */
@scope (html:has(meta[name="mes-style-page"][content="현황판/관리자게시판"]) > body) {
.admin-board-page {
    min-height: 0;
    height: calc(100vh - 89px);
}

.admin-board-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    padding: 16px;
}

.admin-board-tabs {
    display: flex;
    gap: 8px;
}

.admin-board-tab {
    min-width: 108px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.admin-board-tab.is-active {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.admin-board-table-wrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.admin-board-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.admin-board-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #dbeafe;
    color: #1e3a8a;
}

.admin-board-table th,
.admin-board-table td {
    height: 44px;
    padding: 0 12px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
    vertical-align: middle;
}

.admin-board-table th {
    text-align: center;
    font-weight: 900;
}

.admin-board-table td {
    color: #334155;
    font-weight: 800;
}

.admin-board-table td:first-child,
.admin-board-table td:nth-child(3),
.admin-board-table td:nth-child(4) {
    text-align: center;
}

.admin-board-title-link {
    color: #0f172a;
    font-weight: 900;
    text-decoration: none;
}

.admin-board-title-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Static styles migrated from the EJS markup. */
.mes-local-style-001 { width: 70px; }
.mes-local-style-002 { width: 140px; }
.mes-local-style-003 { width: 120px; }
.mes-local-style-004 { width: 110px; }
}

/* resources/css/pages/현황판/관리자게시판상세.css */
@scope (html:has(meta[name="mes-style-page"][content="현황판/관리자게시판상세"]) > body) {
.admin-board-detail-page {
    min-height: 0;
    height: calc(100vh - 89px);
}

.admin-board-detail {
    flex: 1;
    min-height: 0;
    overflow: auto;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #fff;
    padding: 28px 32px;
}

.admin-board-detail-badge {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
}

.admin-board-detail-title {
    margin: 18px 0 10px;
    color: #0f172a;
    font-size: 30px;
    line-height: 1.3;
    font-weight: 900;
}

.admin-board-detail-meta {
    display: flex;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.admin-board-detail-content {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    color: #1f2937;
    font-size: 16px;
    line-height: 1.9;
    white-space: pre-line;
}
}

/* resources/css/pages/현황판/통합현황판.css */
@scope (html:has(meta[name="mes-style-page"][content="현황판/통합현황판"]) > body) {
.integrated-board-page {
    gap: 10px;
    min-height: 0;
    height: calc(100vh - 89px);
}

.board-config-grid-wrap {
    flex: 1;
    min-height: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
}

.integrated-board-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.integrated-board-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    background: #020617;
    overflow: hidden;
}

.integrated-board-overlay.is-open {
    display: block;
}

.integrated-board-toolbar {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    background: rgba(15, 23, 42, .78);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(8px);
}

.integrated-board-frame-wrap {
    width: 100vw;
    height: 100vh;
    transition: opacity .55s ease, filter .55s ease;
}

.integrated-board-frame-wrap.is-transitioning {
    opacity: .18;
    filter: blur(14px);
}

.integrated-board-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}

/* Static styles migrated from the EJS markup. */
.mes-local-style-001 { width: 120px; }
.mes-local-style-002 { width:100%; height:100%; }
}
