/* 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"])) {
/* 🔥 상단 네비 */
.top-nav {
    position: fixed;
    top: 0;
    left: 220px;
    width: calc(100% - 220px);
    height: 89px;

    background: #ffffff;
    border-bottom: 1px solid var(--border-color);

    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 30px;

    z-index: 1000;
}

/* 메인 */
.main-content {
    margin-left: 220px;
    margin-top: 89px;
    width: calc(100% - 220px);

    padding: 10px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
}

/* 헤더 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
}
}

/* resources/css/common.css */
@scope (html:has(meta[name="mes-style-surface"][content="app"], meta[name="mes-style-surface"][content="login"])) {
/* 🔥 푸터 */
.mes-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;

    height: 40px;
    background: #ffffff;

    color: #6b7280;
    font-size: 13px;

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

    padding: 0 20px;
    border-top: 1px solid var(--border-color);

    z-index: 1000;
}

.mes-footer .footer-left {
    color: #9ca3af;
}

.mes-footer .footer-center {
    color: #6b7280;
}

.mes-footer .footer-right {
    color: #9ca3af;
}
}

/* resources/css/common.css */
@scope (html:has(meta[name="mes-style-surface"][content="app"], meta[name="mes-style-surface"][content="login"])) {
/* Common split-grid layout */
.mes-split-layout {
    display: flex;
    gap: 8px;
    min-height: 0;
    flex: 1;
}

.mes-split-pane {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.mes-split-pane > .ag-theme-alpine {
    flex: 1;
    min-height: 0;
}
}

/* resources/css/sidebar.css */
@scope (html:has(meta[name="mes-style-surface"][content="app"])) {
/* ========================= */
/* SIDEBAR & TOP NAV STYLE */
/* ========================= */

/* 🔥 라이트 메인 + 다크 사이드 혼합 */
:root {
    --bg-dark: #f5f7fb;
    --card-bg: #ffffff;

    --accent-cyan: #2f6fed;

    --text-main: #111827;
    --text-dim: #6b7280;

    --border-color: #e5e7eb;
}

/* ========================= */
/* SIDEBAR */
/* ========================= */

.sidebar { 
    height: 100vh;

    /* 🔥 스크롤은 가능 */
    overflow-y: hidden;
    overflow-x: hidden;

    /* 🔥 스크롤바 숨김 */
    scrollbar-width: none;         /* Firefox */
    -ms-overflow-style: none;      /* IE */

    width: 220px;

    background: #1e2a3a;
    min-height: 100vh;
    position: fixed;

    border-right: 1px solid #1e2a3a;
    z-index: 1001;

    /* 🔥 부드러운 스크롤 */
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
}

/* Chrome / Edge / Safari */
.sidebar::-webkit-scrollbar {
    width: 0;
    display: none;
}

/* 사이드바 헤더 */
.sidebar-header { 
    flex: 0 0 89px;
    padding: 30px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    height: 89px;
}

.sidebar-header h5 { 
    font-family: 'Orbitron', sans-serif;
    color: #2f6fed;
    letter-spacing: 2px;
    margin: 0;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
}

.sidebar-logo-img {
    display: block;
    max-width: 160px;
    max-height: 42px;
    object-fit: contain;
}

/* ========================= */
/* MENU */
/* ========================= */

.nav-link { 
    color: #cbd5e1;
    padding: 15px 25px;

    transition: 0.2s;
    text-decoration: none;
    display: block;
}

/* hover */
.nav-link:hover {
    color: #ffffff;
    background: #2a3a4f;
}

/* 🔥 활성 메뉴 */
.nav-link.active { 
    color: #ffffff;
    background: #2f6fed;
    border-left: 3px solid #2f6fed;
}

/* ========================= */
/* TOP NAV */
/* ========================= */

.top-nav {
    position: fixed;
    top: 0;
    left: 220px;
    width: calc(100% - 220px);
    height: 89px;

    background: #ffffff;
    border-bottom: 1px solid var(--border-color);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 30px;

    z-index: 1000;
}

.nav-brand-license {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.sidebar > .nav {
    flex: 1 1 auto;
    min-height: 0;
    flex-wrap: nowrap !important;
    align-content: stretch;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 14px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior: contain;
}

.sidebar > .nav::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.sidebar-credit {
    flex: 0 0 auto;
    margin: 12px 14px 16px;
    padding: 13px 13px 12px;
    border: 1px solid rgba(96, 165, 250, .28);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(37, 99, 235, .16), rgba(15, 23, 42, .34));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
    color: #e2e8f0;
}

.sidebar-credit-heading,
.sidebar-credit-unlimited {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-credit-heading {
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -.1px;
}

.sidebar-credit-heading strong {
    flex: 0 0 auto;
    color: #93c5fd;
    font-size: 12px;
    font-weight: 900;
}

.sidebar-credit-track {
    height: 7px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, .2);
}

.sidebar-credit-track > span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    box-shadow: 0 0 10px rgba(96, 165, 250, .5);
    transition: width .28s ease;
}

.sidebar-logo-wordmark { color: #fff; }
.nav-tenant-details { color: #666; }
.nav-operator-alert { color: #dc2626; font-weight: 800; }
.nav-operator-form { margin: 0; }
.nav-operator-button { border: 0; background: transparent; }

.sidebar-credit > small {
    display: block;
    margin-top: 7px;
    color: #64748b;
    font-size: 9px;
    font-weight: 700;
}

.sidebar-credit-unlimited {
    justify-content: flex-start;
    gap: 7px;
    margin-top: 10px;
    color: #bfdbfe;
    font-size: 10px;
    font-weight: 800;
}

.nav-license-badge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    border: 1px solid #dbe6fb;
    background: #f0f5ff;
    color: var(--license-color, #205bff);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(32, 91, 255, .06);
}

.nav-license-badge > i {
    font-size: 15px;
}

.nav-license-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.nav-license-copy strong {
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 800;
}

.nav-license-copy small {
    color: var(--license-color, #205bff);
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 1200px) {
    .nav-brand-license { gap: 8px; }
    .nav-brand-license .addon-promo-text { display: none; }
    .nav-license-badge { padding: 8px 10px; }
}

.addon-promo-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    max-width: 640px;
    min-height: 45px;
    padding: 12px 15px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #f8fafc;
    color: #334155;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.addon-promo-link:hover {
    color: #1e293b;
    background: #ffffff;
    border-color: #b8c4d6;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, .14);
}

.addon-promo-brand {
    flex: 0 0 auto;
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #1e4ed8;
}

.addon-promo-brand span {
    color: #1e4ed8;
}

.addon-promo-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
}

.addon-promo-highlight {
    color: #1e4ed8;
    font-weight: 900;
}

.addon-command-button {
    min-height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-weight: 800;
}

.addon-command-button:hover {
    color: #1e4ed8;
    background: #ffffff;
    border-color: #b8c4d6;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, .14);
}

/* ========================= */
/* USER */
/* ========================= */

.user-info-area {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
 
.user-status {
    color: var(--text-main);
    font-size: 0.9rem;
}

.user-status span {
    color: #2f6fed;
    font-weight: 700;
}

/* 상단 링크 */
.top-nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;

    transition: 0.2s;
}

.top-nav-link:hover {
    color: #2f6fed;
}

/* ========================= */
/* COLLAPSE MENU */
/* ========================= */

.menu-group {
    width: 100%;
    flex: 0 0 auto;
}

.menu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 화살표 */
.menu-toggle .arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
    color: #94a3b8;
}

/* 펼침 */
.menu-toggle.open .arrow,
.menu-toggle.active .arrow {
    transform: rotate(180deg);
    color: #ffffff;
}

.menu-toggle.open:not(.active) {
    color: #ffffff;
    background: #2a3a4f;
}

.menu-toggle.active,
.menu-toggle:active,
.menu-toggle:focus {
    color: #ffffff;
    background: #2a3a4f !important;
    border-left: 0;
}

.sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sub-menu.open {
    max-height: 1000px;
}

/* 서브 메뉴 */
.sub-link {
    padding-left: 50px;
    font-size: 0.9rem;
    color: #94a3b8;
}

/* hover */
.sub-link:hover {
    color: #ffffff;
    background: #2a3a4f;
}

.menu-group.is-plan-locked .menu-toggle { color: #94a3b8; }
.menu-group.is-plan-locked .menu-toggle .fa-boxes { color: #64748b; }
.sub-link.is-plan-locked,
.sub-link.is-plan-locked:hover,
.sub-link.is-plan-locked:focus { display: flex; align-items: center; justify-content: space-between; color: #64748b !important; background: rgba(148,163,184,.08) !important; cursor: not-allowed; filter: grayscale(1); }
.sub-link.is-plan-locked .plan-lock-icon { margin-left: 10px; color: #64748b; font-size: 11px; }
.sub-link.is-plan-locked.is-notice-active { color: #dbeafe !important; background: rgba(47,111,237,.2) !important; box-shadow: inset -3px 0 0 #60a5fa !important; }
.sidebar-plan-notice {
    position: fixed;
    z-index: 12010;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    width: min(280px, calc(100vw - 24px));
    padding: 11px 13px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    opacity: 0;
    visibility: hidden;
    color: #1e3a5f;
    background: rgba(255,255,255,.98);
    box-shadow: 0 10px 28px rgba(15,23,42,.18), 0 0 16px rgba(59,130,246,.14);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.55;
    pointer-events: none;
    transform: translateX(-6px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.sidebar-plan-notice::before { content: ""; position: absolute; top: 50%; left: -6px; width: 11px; height: 11px; border-left: 1px solid #bfdbfe; border-bottom: 1px solid #bfdbfe; background: #fff; transform: translateY(-50%) rotate(45deg); }
.sidebar-plan-notice > i { flex: 0 0 auto; margin-top: 3px; color: #2563eb; font-size: 11px; }
.sidebar-plan-notice.show { opacity: 1; visibility: visible; transform: translateX(0); }

/* Bootstrap hover 제거 */
.nav-link:focus,
.nav-link:hover {
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* 🔥 선택된 서브 */
.sub-link.active {
    color: #ffffff !important;
    background: rgba(47, 111, 237, 0.2);
    border-left: 3px solid #2f6fed;
}
}

/* resources/css/splitter.css */
@scope (html:has(meta[name="mes-style-surface"][content="app"])) {
.splitter-layout {
    display: flex;
    gap: 0;
}

.splitter-layout.splitter-vertical {
    flex-direction: column;
}

.splitter-layout.splitter-horizontal {
    flex-direction: row;
}

.splitter-pane {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
}

.splitter-vertical > .splitter-pane {
    min-height: var(--splitter-min-size, 100px);
}

.splitter-horizontal > .splitter-pane {
    min-width: var(--splitter-min-size, 100px);
}

.splitter-bar {
    position: relative;
    flex: 0 0 12px;
}

.splitter-vertical > .splitter-bar {
    cursor: row-resize;
}

.splitter-horizontal > .splitter-bar {
    cursor: col-resize;
}

.splitter-bar::before {
    content: "";
    position: absolute;
    background: var(--border-color);
    border-radius: 999px;
}

.splitter-vertical > .splitter-bar::before {
    left: 10px;
    right: 10px;
    top: 5px;
    height: 2px;
}

.splitter-horizontal > .splitter-bar::before {
    top: 10px;
    bottom: 10px;
    left: 5px;
    width: 2px;
}

.splitter-bar:hover::before,
.splitter-bar.dragging::before {
    background: #2563eb;
}

body.splitter-resizing {
    user-select: none;
}

body.splitter-resizing-vertical {
    cursor: row-resize;
}

body.splitter-resizing-horizontal {
    cursor: col-resize;
}
}

/* resources/css/mes-page-layout.css */
@scope (html:has(meta[name="mes-style-surface"][content="app"])) {
/* Shared frame used by MES screens that place their page header above the content. */
.main-content > .mes-page-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 10px;
    height: auto;
    min-height: calc(100vh - 109px);
    overflow: auto;
}

.main-content > .mes-page-panel > .grid-header {
    flex: 0 0 auto;
    padding-left: 0;
}

.mes-page-panel > :is(.vertical-layout, .horizontal-layout, .mes-split-layout) {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
}

.mes-page-panel > .ms-2 {
    margin-left: 0 !important;
}

.mes-page-panel > :is(.mes-filter-panel, .status-filter, .monitor-filter) {
    background: #fff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 6px 0;
}

.mes-page-panel > .kpi-grid {
    margin-top: 0;
}

/* The filter already has bottom padding; avoid adding the panel gap before KPI cards. */
.mes-page-panel > :is(.mes-filter-panel, .status-filter) + :is(.kpi-grid, .mes-kpi-grid) {
    margin-top: -10px;
}

.report-page > .mes-page-panel {
    gap: 0;
}

.mes-page-panel .report-sheet {
    border: 0;
    border-radius: 0;
    margin-top: 0;
    padding: 0;
}

/* Product information is the reference for simple master-data search rows. */
.mes-search-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0 6px 6px;
}

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

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

.mes-search-filter .mes-search-button {
    width: 80px;
}

/* Keep the shared hidden state above component display rules, while allowing
   existing popup scripts to show elements with an inline display value. */
.mes-hidden[class] {
    display: none;
}

.mes-width-80 {
    width: 80px;
}

body.report-board-mode .report-page > .mes-page-panel,
body.defect-board-mode .report-page > .mes-page-panel {
    border: 0;
    border-radius: 0;
    padding: 0;
    min-height: 100vh;
    overflow: visible;
}

body.report-board-mode .report-page > .mes-page-panel > .grid-header,
body.report-board-mode .report-page > .mes-page-panel > .report-filter,
body.defect-board-mode .report-page > .mes-page-panel > .grid-header,
body.defect-board-mode .report-page > .mes-page-panel > .report-filter {
    display: none !important;
}
}

/* resources/css/tablet.css */
@scope (html:has(meta[name="mes-style-page"][content="현장/실적등록"])) {
:scope {
    --primary: #2563eb;
    --primary-soft: #eff6ff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #f43f5e;
    --dark: #1e293b;
    --bg: #f1f5f9;
    --border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    overflow: auto !important;
    font-family: 'Inter', 'Noto Sans KR', sans-serif; 
    background-color: var(--bg); color: var(--text-main);
    display: flex; justify-content: center; align-items: flex-start;
    min-height: 100vh; padding: 40px 20px;
}

.workspace { width: 100%; max-width: 1200px; animation: fadeIn 0.5s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* 1. 검색 영역 */
.search-area { display: flex; flex-direction: column; align-items: center; margin-bottom: 30px; gap: 8px; }
.search-label { font-size: 0.9rem; font-weight: 700; color: var(--primary); }
.search-box { 
    display: flex; background: white; padding: 8px; border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); border: 1px solid var(--border); width: 450px;
}
.search-box input { flex: 1; border: none; padding: 10px 15px; outline: none; font-size: 1rem; font-weight: 600; }
.btn-query { background: var(--primary); color: white; border: none; padding: 0 25px; border-radius: 8px; cursor: pointer; font-weight: 600; }

/* 2. 마스터 정보 */
.master-card { 
    background: white; border-radius: 16px; padding: 25px; border: 1px solid var(--border);
    margin-bottom: 25px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px;
}
.info-item { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 8px; background: #f8fafc; border: 1px solid #f1f5f9; }
.info-item label { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); }
.info-item span { font-size: 1rem; font-weight: 700; color: var(--text-main); }

/* 3. 공정 리스트 */
.section-header { font-size: 1.25rem; font-weight: 700; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.process-card { background: white; border-radius: 16px; border: 1px solid var(--border); overflow: hidden; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05); }
.process-row { border-bottom: 1px solid var(--border); }
.process-main { 
    display: grid; grid-template-columns: 80px 1.5fr 1fr 120px 420px; 
    align-items: center; padding: 25px 30px; cursor: pointer; transition: 0.2s;
}
.process-main:hover { background: #f8faff; }
.step-no { font-weight: 800; color: var(--text-muted); font-size: 1.1rem; }
.process-name { font-weight: 700; font-size: 1.15rem; color: var(--dark); }
.machine-name { font-size: 0.86rem; font-weight: 900; color: var(--text-main); }

/* 상태 배지 */
.status-pill { padding: 6px 14px; border-radius: 30px; font-size: 0.85rem; font-weight: 700; text-align: center; }
.status-wait { background: #f1f5f9; color: #64748b; }
.status-ing { background: #dbeafe; color: #2563eb; border: 1px solid #bfdbfe; }
.status-pause { background: #fef9c3; color: #ca8a04; border: 1px solid #fde68a;}
.status-done { background: #dcfce7; color: #10b981; border: 1px solid #bbf7d0; }

/* 🎨 버튼 컬러 시스템 (디폴트 컬러 적용) */
.action-btns { display: flex; gap: 10px; justify-content: flex-end; }
.btn-big { 
    height: 54px; padding: 0 18px; border-radius: 10px; border: 2px solid var(--border);
    font-size: 1rem; font-weight: 700; cursor: pointer; transition: 0.2s;
    display: flex; align-items: center; background: white;
    width: 130px;
}
/* 시작 버튼 */
.btn-start { color: var(--primary); border-color: var(--primary); }
.btn-start:hover { background: var(--primary); color: white; }
/* 일시정지 버튼 */
.btn-pause { color: var(--warning); border-color: var(--warning); }
.btn-pause:hover { background: var(--warning); color: white; }
/* 불량 버튼 */
.btn-defect { color: var(--danger); border-color: var(--danger); }
.btn-defect:hover { background: var(--danger); color: white; }
/* 작업종료 버튼 */
.btn-end {

    color: #10b981;

    border: 1px solid #bbf7d0;

    background: #dcfce7;

    min-width: 110px;

    justify-content: center;
}

.btn-end:hover {

    background: #10b981;

    color: #ffffff;
}

/* 아코디언 애니메이션 */
.process-detail { background: #f8fafc; padding: 0; max-height: 0; overflow: hidden; transition: all 0.35s ease-in-out; }
.process-row.active .process-detail { padding: 30px; max-height: 800px; }

.history-grid {
    width: 100%;
    height: 280px;
    background: #ffffff;
}

.history-grid .ag-row-pinned .ag-cell {
    background: #f8fafc !important;
    color: #0f172a;
    font-weight: 800;
    border-top: 1px solid #cbd5e1;
}

.history-grid .ag-empty-message {
    color: #94a3b8;
    font-weight: 700;
}

.history-grid .history-action-cell {
    text-align: center;
    font-weight: 800;
}

.history-grid .history-action-start {
    color: #2563eb !important;
}

.history-grid .history-action-pause {
    color: #f59e0b !important;
}

.history-grid .history-action-end {
    color: #16a34a !important;
}

.history-grid .ag-row.history-row-new .ag-cell {
    background-image:
        repeating-linear-gradient(to right, #ef4444 0 6px, transparent 6px 12px),
        repeating-linear-gradient(to right, #ef4444 0 6px, transparent 6px 12px);
    background-position: left top, left bottom;
    background-repeat: no-repeat;
    background-size: 100% 0, 100% 0;
    animation: historyRowHorizontalDash 0.35s steps(1, end) 6;
}

.history-grid .ag-row.history-row-new .ag-cell:first-child,
.history-grid .ag-row.history-row-new .ag-cell[col-id="seq"] {
    background-image:
        repeating-linear-gradient(to right, #ef4444 0 6px, transparent 6px 12px),
        repeating-linear-gradient(to right, #ef4444 0 6px, transparent 6px 12px),
        repeating-linear-gradient(to bottom, #ef4444 0 6px, transparent 6px 12px);
    background-position: left top, left bottom, left top;
    animation-name: historyRowFirstCellDash;
}

.history-grid .ag-row.history-row-new .ag-cell:last-child,
.history-grid .ag-row.history-row-new .ag-cell[col-id="event_time"] {
    background-image:
        repeating-linear-gradient(to right, #ef4444 0 6px, transparent 6px 12px),
        repeating-linear-gradient(to right, #ef4444 0 6px, transparent 6px 12px),
        repeating-linear-gradient(to bottom, #ef4444 0 6px, transparent 6px 12px);
    background-position: left top, left bottom, right top;
    animation-name: historyRowLastCellDash;
}

@keyframes historyRowHorizontalDash {
    0%, 100% { background-size: 100% 0, 100% 0; }
    50% { background-size: 100% 2px, 100% 2px; }
}

@keyframes historyRowFirstCellDash {
    0%, 100% { background-size: 100% 0, 100% 0, 0 100%; }
    50% { background-size: 100% 2px, 100% 2px, 2px 100%; }
}

@keyframes historyRowLastCellDash {
    0%, 100% { background-size: 100% 0, 100% 0, 0 100%; }
    50% { background-size: 100% 2px, 100% 2px, 2px 100%; }
}

/* 실적 등록 폼 */
.registration-form { 
    background: white; 
    border: 2px solid var(--primary-soft); 
    padding: 20px; 
    border-radius: 12px; 
    margin-bottom: 25px;
    
    /* 핵심 수정: 고정 5열 대신 자동 배치 적용 */
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); 
    gap: 15px; 
    align-items: flex-end;
}
.input-group { 
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
    /* 그리드 아이템이 넘치지 않도록 최소 너비 해제 */
    min-width: 0; 
}
.input-group label { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.input-group input { 
    width: 100%; /* 부모 너비에 꽉 차게 설정 */
    padding: 12px; 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    outline: none; 
    font-size: 1rem; 
    font-weight: 600; 
    color: var(--primary); 
    background: #fdfdfd;
    /* 패딩 때문에 박스가 커지지 않도록 설정 */
    box-sizing: border-box; 
}
/* 히스토리 테이블 */
.history-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    overflow: hidden;
    border: 1px solid #d2d5dd;
}
.history-table th { background: #f1f5f9; padding: 12px; font-size: 0.85rem; color: var(--text-muted); text-align: left; }
.history-table td { padding: 12px; font-size: 0.9rem; border-bottom: 1px solid #f1f5f9; }
/* 헤더 가운데 정렬 */
.history-table thead th {
    text-align: center;
}

/* 바디 가운데 정렬 */
.history-table tbody td {
    text-align: center;
}

.history-table tfoot td {
    padding: 12px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: #0f172a;
    background: #f8fafc;
    border-top: 1px solid #cbd5e1;
}

.btn-disabled {
background: #e5e7eb !important;
border-color: #cbd5e1 !important;
color: #94a3b8 !important;
cursor: not-allowed !important;
}

.input-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
    display: none;
}

.input-error.active {
    display: block;
}



/* =========================
   히스토리 상태 컬러
========================= */

.history-start {

    color: #2563eb;

    font-weight: 700;
}

.history-pause {

    color: #f59e0b;

    font-weight: 700;
}

.history-end {

    color: #10b981;

    font-weight: 700;
}
}

/* resources/css/pages/로그인/로그인.css */
@scope (html:has(meta[name="mes-style-page"][content="로그인/로그인"]) > body) {
:scope {
            display: block;
            min-height: 100vh;
            overflow: auto;
            background:
                linear-gradient(135deg, rgba(47, 111, 237, .08), rgba(15, 118, 110, .05)),
                var(--bg-dark);
        }

        .login-page {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 34px 16px;
        }

        .login-shell {
            width: min(743px, 100%);
            display: grid;
            grid-template-columns: 360px minmax(0, 1fr);
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            box-shadow: 0 18px 45px rgba(15, 23, 42, .10);
            overflow: hidden;
        }

        .login-aside {
            padding: 34px 30px;
            background: #111827;
            color: #fff;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            gap: 28px;
        }

        .login-logo {
            font-size: 23px;
            font-weight: 900;
            letter-spacing: .4px;
            line-height: 1;
        }

        .login-logo span {
            color: #fff;
        }

        .login-copy-title {
            margin-top: 24px;
            font-size: 24px;
            font-weight: 900;
            line-height: 1.28;
        }

        .login-copy-caption {
            margin-top: 12px;
            font-size: 13px;
            line-height: 1.7;
            color: #cbd5e1;
        }

        .login-note-list {
            display: grid;
            gap: 10px;
            margin: 0;
            padding: 0;
            list-style: none;
            font-size: 12px;
            color: #e5e7eb;
        }

        .login-note-list li {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .login-note-dot {
            width: 7px;
            height: 7px;
            border-radius: 999px;
            background: var(--accent-cyan);
            flex: 0 0 auto;
        }

        .login-panel {
            padding: 42px 42px;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .login-title-row {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            align-items: flex-start;
            margin-bottom: 24px;
        }

        .login-title {
            margin: 0;
            font-size: 22px;
            font-weight: 900;
            color: var(--text-main);
        }

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

        .login-signup-link {
            white-space: nowrap;
            font-size: 13px;
            font-weight: 800;
            color: var(--accent-blue);
            text-decoration: none;
            margin-top: 5px;
        }

        .login-signup-link:hover {
            text-decoration: underline;
        }

        .login-alert {
            border-radius: 8px;
            padding: 11px 12px;
            margin-bottom: 14px;
            font-size: 13px;
            font-weight: 800;
            color: #b91c1c;
            background: #fef2f2;
            border: 1px solid #fecaca;
        }

        .login-field {
            margin-bottom: 13px;
        }

        .login-field label {
            display: block;
            margin-bottom: 5px;
            font-size: 12px;
            font-weight: 800;
            color: var(--text-dim);
        }

        .login-field .form-control {
            height: 40px;
            border-radius: 7px;
            font-size: 13px;
        }

        .login-submit {
            width: 100%;
            height: 40px;
            margin-top: 5px;
            font-weight: 800;
        }

        .login-secondary {
            display: block;
            width: 100%;
            height: 40px;
            margin-top: 8px;
            line-height: 28px;
            text-align: center;
        }

        .login-footer {
            margin-top: 20px;
            text-align: center;
            font-size: 12px;
            color: var(--text-dim);
        }

        input:-webkit-autofill,
        input:-webkit-autofill:hover,
        input:-webkit-autofill:focus,
        input:-webkit-autofill:active {
            -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
            box-shadow: 0 0 0 1000px #ffffff inset !important;
            -webkit-text-fill-color: #111827 !important;
            caret-color: #111827;
            transition: background-color 5000s ease-in-out 0s;
        }

        .login-shell-expired { width: min(1120px, 100%); grid-template-columns: 300px minmax(0, 1fr); }
        .login-shell-expired .login-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 28px; align-content: center; padding: 34px; }
        .login-shell-expired .login-title-row { grid-column: 1; grid-row: 1; }
        .login-shell-expired form { grid-column: 1; grid-row: 2; min-width: 0; }
        .login-shell-expired .login-footer { grid-column: 1; grid-row: 3; }
        .login-expiry-notice { grid-column: 2; grid-row: 1 / 4; align-self: center; min-width: 0; padding: 22px; border: 1px solid #dbe6fb; border-radius: 12px; background: #f5f8ff; line-height: 1.7; }
        .login-expiry-notice h2 { font-size: 17px; font-weight: 800; margin: 20px 0 10px; }
        .login-expiry-notice p { font-size: 14px; color: #52627a; }
        .login-expiry-notice a { color: #205bff; font-weight: 700; font-size: 14px; overflow-wrap: anywhere; text-decoration: underline; }
        @media (max-width: 1020px) {
            .login-shell-expired { grid-template-columns: 1fr; }
            .login-shell-expired .login-aside { display: none; }
        }
        @media (max-width: 640px) {
            .login-shell-expired .login-panel { grid-template-columns: minmax(0, 1fr); padding: 26px; }
            .login-expiry-notice { grid-column: 1; grid-row: 4; margin-top: 20px; }
        }
        @media (max-width: 820px) {
            .login-shell {
                grid-template-columns: 1fr;
            }

            .login-aside {
                padding: 26px;
            }

            .login-panel {
                padding: 30px 26px;
                width: 100%;
                min-width: 0;
            }
        }
}

/* resources/css/pages/로그인/회원가입.css */
@scope (html:has(meta[name="mes-style-page"][content="로그인/회원가입"]) > body) {
:scope {
            display: block;
            min-height: 100vh;
            overflow: auto;
            background:
                linear-gradient(135deg, rgba(47, 111, 237, .08), rgba(15, 118, 110, .05)),
                var(--bg-dark);
        }

        .signup-page {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 34px 16px;
        }

        .signup-shell {
            width: min(960px, 100%);
            display: grid;
            grid-template-columns: 360px minmax(0, 1fr);
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            box-shadow: 0 18px 45px rgba(15, 23, 42, .10);
            overflow: hidden;
        }

        .signup-aside {
            padding: 34px 30px;
            background: #111827;
            color: #fff;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            gap: 28px;
        }

        .signup-logo {
            font-size: 23px;
            font-weight: 900;
            letter-spacing: .4px;
            line-height: 1;
        }

        .signup-logo span {
            color: #fff;
        }

        .signup-copy-title {
            margin-top: 24px;
            font-size: 24px;
            font-weight: 900;
            line-height: 1.28;
        }

        .signup-copy-caption {
            margin-top: 12px;
            font-size: 13px;
            line-height: 1.7;
            color: #cbd5e1;
        }

        .signup-note-list {
            display: grid;
            gap: 10px;
            margin: 0;
            padding: 0;
            list-style: none;
            font-size: 12px;
            color: #e5e7eb;
        }

        .signup-note-list li {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .signup-note-dot {
            width: 7px;
            height: 7px;
            border-radius: 999px;
            background: var(--accent-cyan);
            flex: 0 0 auto;
        }

        .signup-panel {
            padding: 32px 34px;
        }

        .signup-title-row {
            display: flex;
            justify-content: space-between;
            gap: 12px;
            align-items: flex-start;
            margin-bottom: 22px;
        }

        .signup-title {
            margin: 0;
            font-size: 22px;
            font-weight: 900;
            color: var(--text-main);
        }

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

        .signup-login-link {
            white-space: nowrap;
            font-size: 13px;
            font-weight: 800;
            color: var(--accent-blue);
            text-decoration: none;
            margin-top: 5px;
        }

        .signup-login-link:hover {
            text-decoration: underline;
        }

        .signup-alert {
            border-radius: 8px;
            padding: 11px 12px;
            margin-bottom: 14px;
            font-size: 13px;
            font-weight: 800;
            border: 1px solid;
        }

        .signup-alert.error {
            color: #b91c1c;
            background: #fef2f2;
            border-color: #fecaca;
        }

        .signup-alert.success {
            color: #166534;
            background: #f0fdf4;
            border-color: #bbf7d0;
        }

        .signup-form-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 13px 12px;
        }

        .signup-field.full {
            grid-column: 1 / -1;
        }

        .signup-field label {
            display: block;
            margin-bottom: 5px;
            font-size: 12px;
            font-weight: 800;
            color: var(--text-dim);
        }

        .signup-field .form-control {
            height: 38px;
            border-radius: 7px;
            font-size: 13px;
        }

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

        .signup-message {
            margin-top: 6px;
            font-size: 12px;
            font-weight: 800;
        }

        .signup-message.error {
            color: #dc2626;
        }

        .signup-message.success {
            color: #16a34a;
        }

        .signup-submit {
            width: 100%;
            height: 40px;
            margin-top: 18px;
            font-weight: 800;
        }

        .signup-success-panel {
            min-height: 300px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .signup-success-card {
            width: 100%;
            max-width: 430px;
            border: 1px solid var(--border-color);
            border-radius: 10px;
            background: #f8fafc;
            padding: 22px;
            text-align: center;
        }

        .signup-success-title {
            font-size: 18px;
            font-weight: 900;
            color: #166534;
        }

        .signup-contact {
            margin-top: 16px;
            border-radius: 8px;
            background: #fff;
            border: 1px solid var(--border-color);
            padding: 14px;
            font-size: 13px;
            color: var(--text-dim);
        }

        .signup-contact strong {
            display: block;
            margin-top: 4px;
            color: var(--text-main);
            font-size: 15px;
        }

        @media (max-width: 820px) {
            .signup-shell {
                grid-template-columns: 1fr;
            }

            .signup-aside {
                padding: 26px;
            }

            .signup-form-grid {
                grid-template-columns: 1fr;
            }
        }
}

/* resources/css/pages/메인페이지/메인페이지.css */
@scope (html:has(meta[name="mes-style-page"][content="메인페이지/메인페이지"]) > body) {
.main-promo-page {
            height: calc(100vh - 89px);
            min-height: 680px;
            overflow: hidden;
            padding: 18px;
            background: #f8fafc;
        }

        .promo-shell {
            height: 100%;
            display: grid;
            grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
            gap: 16px;
            min-height: 0;
        }

        .promo-hero,
        .promo-side {
            min-height: 0;
        }

        .promo-hero {
            position: relative;
            overflow: hidden;
            border: 1px solid #294e84;
            border-radius: 16px;
            background:
                radial-gradient(circle at 84% 18%, rgba(56, 189, 248, .22), transparent 34%),
                linear-gradient(145deg, #0a1935, #123b78 68%, #102a5d);
            color: #fff;
            padding: clamp(28px, 3.4vw, 54px);
            display: grid;
            grid-template-rows: auto 1fr auto;
            gap: 20px;
        }

        .promo-hero::before {
            content: "";
            position: absolute;
            inset: 0;
            background-image: linear-gradient(rgba(191, 219, 254, .06) 1px, transparent 1px),
                linear-gradient(90deg, rgba(191, 219, 254, .06) 1px, transparent 1px);
            background-size: 44px 44px;
            mask-image: linear-gradient(90deg, transparent 20%, #000);
            pointer-events: none;
        }

        .promo-hero > * {
            position: relative;
        }

        .promo-intro {
            max-width: 720px;
        }

        .promo-kicker,
        .promo-section-label {
            font-size: 12px;
            font-weight: 900;
            letter-spacing: .08em;
            text-transform: uppercase;
            color: #38bdf8;
        }

        .promo-kicker {
            display: inline-flex;
            align-items: center;
            gap: 9px;
            padding: 8px 12px;
            border: 1px solid rgba(125, 211, 252, .26);
            border-radius: 999px;
            background: rgba(8, 47, 95, .55);
            color: #bceeff;
            letter-spacing: .045em;
        }

        .promo-kicker::before {
            content: "";
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: #67e8f9;
            box-shadow: 0 0 10px rgba(103, 232, 249, .8);
        }

        .promo-hero h1 {
            max-width: 880px;
            margin: 22px 0 0;
            font-size: clamp(31px, 3.3vw, 48px);
            line-height: 1.24;
            font-weight: 900;
            letter-spacing: -.05em;
            word-break: keep-all;
        }

        .promo-hero h1 span {
            display: block;
            color: #b9dcff;
        }

        .promo-description {
            max-width: 620px;
            margin: 18px 0 0;
            color: #d6e5f8;
            font-size: 15px;
            font-weight: 500;
            line-height: 1.8;
            word-break: keep-all;
        }

        .promo-example {
            align-self: end;
            display: flex;
            align-items: center;
            gap: 14px;
            width: min(100%, 480px);
            padding: 14px 16px;
            border: 1px solid rgba(191, 219, 254, .3);
            border-radius: 14px;
            background: rgba(255, 255, 255, .08);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
        }

        .promo-example-icon {
            display: grid;
            flex: 0 0 40px;
            place-items: center;
            width: 40px;
            height: 40px;
            border-radius: 11px;
            background: rgba(125, 211, 252, .16);
            color: #9cecff;
            font-size: 23px;
        }

        .promo-example div {
            display: grid;
            gap: 2px;
            min-width: 0;
        }

        .promo-example div span {
            color: #a9c7e9;
            font-size: 11px;
            font-weight: 700;
        }

        .promo-example strong {
            color: #fff;
            font-size: 15px;
            font-weight: 800;
            word-break: keep-all;
        }

        .promo-proof {
            align-self: end;
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 8px;
        }

        .promo-proof div {
            border: 1px solid rgba(191, 219, 254, .21);
            border-radius: 12px;
            background: rgba(5, 23, 53, .34);
            padding: 12px;
            min-width: 0;
        }

        .promo-proof strong {
            display: block;
            font-size: clamp(15px, 1.2vw, 19px);
            font-weight: 900;
            color: #fff;
            line-height: 1.3;
        }

        .promo-proof span {
            display: block;
            margin-top: 7px;
            font-size: 12px;
            font-weight: 600;
            color: #bfdbfe;
            line-height: 1.4;
            word-break: keep-all;
        }

        .promo-side {
            display: grid;
            grid-template-rows: repeat(2, minmax(0, 1fr));
            gap: 12px;
        }

        .promo-card {
            min-height: 0;
            overflow: hidden;
            border: 1px solid #dbe3ef;
            border-radius: 12px;
            background: #fff;
            padding: 16px;
        }

        .promo-card h2,
        .promo-card h3 {
            margin: 6px 0 0;
            color: #111827;
            font-weight: 900;
            letter-spacing: 0;
        }

        .promo-card h2 {
            font-size: 21px;
            line-height: 1.25;
        }

        .promo-card h3 {
            font-size: 15px;
        }

        .promo-card p {
            margin: 8px 0 0;
            color: #475569;
            font-size: 13px;
            font-weight: 700;
            line-height: 1.55;
        }

        .promo-service-grid {
            margin-top: 12px;
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 8px;
        }

        .promo-service-grid article {
            min-height: 0;
            border: 1px solid #e2e8f0;
            border-radius: 9px;
            background: #f8fafc;
            padding: 10px;
        }

        .promo-service-grid span,
        .promo-process span {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 22px;
            border-radius: 6px;
            background: #dbeafe;
            color: #1d4ed8;
            font-size: 11px;
            font-weight: 900;
        }

        .promo-service-grid p {
            font-size: 12px;
            line-height: 1.45;
        }

        .promo-placeholder-card {
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #111827;
            font-size: 18px;
            font-weight: 900;
            text-align: center;
        }

        .main-board-card {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .main-board-card-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .main-board-card-title {
            color: #334155;
            font-size: 16px;
            font-weight: 700;
        }

        .main-board-all-btn {
            color: #2f6fed;
            font-size: 12px;
            font-weight: 700;
            text-decoration: none;
            white-space: nowrap;
        }

        .main-board-all-btn:hover {
            color: #1d4ed8;
            text-decoration: underline;
        }

        .main-board-grid-wrap {
            flex: 1;
            min-height: 0;
            overflow: hidden;
        }

        .main-board-grid {
            width: 100%;
            height: 100%;
        }

        .main-board-card > .mes-pagination {
            flex: 0 0 auto;
            justify-content: center;
            flex-wrap: nowrap;
            gap: 8px;
            min-height: 36px;
            margin: 0;
            padding: 6px 0 0;
        }

        .main-board-card .mes-pagination-size {
            position: absolute;
            left: 0;
            top: 6px;
            flex: 0 0 auto;
        }

        .main-board-card .mes-pagination-controls {
            width: auto;
            min-width: 0;
            margin: 0 auto;
            flex-wrap: nowrap;
            gap: 3px;
        }

        .main-board-card .mes-pagination-summary {
            margin-right: 2px;
            white-space: nowrap;
        }

        .main-board-card .mes-pagination button {
            min-width: 26px;
            padding: 0 5px;
        }

        .main-board-title-link {
            display: block;
            color: #0f172a;
            font-weight: 500;
            text-decoration: none;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .main-board-title-link:hover {
            color: #1d4ed8;
            text-decoration: underline;
        }

        .main-board-empty {
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #64748b;
            font-size: 13px;
            font-weight: 800;
        }

        .main-board-card .ag-theme-alpine {
            --ag-header-background-color: #dbeafe;
            --ag-header-foreground-color: #000000;
            --ag-foreground-color: #000000;
            --ag-font-size: 12px;
            --ag-row-hover-color: #f8fbff;
        }

        .main-board-card .ag-header-cell-label {
            justify-content: center;
            font-weight: 600;
        }

        .main-board-card .ag-cell {
            color: #000000;
            font-weight: 500;
            display: flex;
            align-items: center;
        }

        .main-board-card .ag-header-cell-text {
            color: #000000;
        }

        .promo-ai {
            display: grid;
            grid-template-columns: minmax(0, .92fr) minmax(190px, .7fr);
            gap: 12px;
            align-items: stretch;
        }

        .promo-command-list {
            display: grid;
            gap: 7px;
            margin-top: 10px;
        }

        .promo-command-list span {
            border: 1px solid #dbeafe;
            border-radius: 8px;
            background: #eff6ff;
            color: #1e40af;
            padding: 8px 10px;
            font-size: 12px;
            font-weight: 900;
        }

        .promo-voice-modal {
            border: 1px solid #cbd5e1;
            border-radius: 10px;
            background: #fff;
            box-shadow: 0 16px 34px rgba(15, 23, 42, .12);
            padding: 12px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            min-height: 0;
        }

        .promo-voice-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 13px;
            font-weight: 900;
            color: #111827;
        }

        .promo-wave {
            height: 70px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

        .promo-wave i {
            width: 6px;
            height: 26px;
            border-radius: 99px;
            background: #2563eb;
        }

        .promo-wave i:nth-child(2),
        .promo-wave i:nth-child(6) {
            height: 44px;
            background: #0891b2;
        }

        .promo-wave i:nth-child(3),
        .promo-wave i:nth-child(5) {
            height: 58px;
            background: #0f766e;
        }

        .promo-voice-input {
            border: 1px solid #dbe3ef;
            border-radius: 8px;
            background: #f8fafc;
            padding: 9px 10px;
            font-size: 12px;
            font-weight: 800;
            color: #334155;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .promo-price-table {
            display: grid;
            gap: 7px;
            margin-top: 10px;
        }

        .promo-price-row {
            display: grid;
            grid-template-columns: 1fr 1.5fr auto;
            gap: 10px;
            align-items: center;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            padding: 8px 10px;
            background: #fff;
            font-size: 12px;
            font-weight: 800;
            color: #334155;
        }

        .promo-price-row.featured {
            border-color: #bfdbfe;
            background: #eff6ff;
        }

        .promo-price-row strong {
            color: #111827;
            font-size: 12px;
        }

        .promo-price-row em {
            color: #1d4ed8;
            font-style: normal;
            font-weight: 900;
            white-space: nowrap;
        }

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

        .promo-process div {
            border: 1px solid #e2e8f0;
            border-radius: 9px;
            background: #f8fafc;
            padding: 10px;
            min-width: 0;
        }

        .promo-process strong {
            display: block;
            margin-top: 8px;
            color: #111827;
            font-size: 12px;
            font-weight: 900;
        }

        .promo-process p {
            font-size: 11px;
            line-height: 1.38;
        }

        .promo-contact {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            gap: 10px;
            align-items: center;
            margin-top: 12px;
            border: 1px solid #dbeafe;
            border-radius: 10px;
            background: #eff6ff;
            padding: 10px 12px;
            font-size: 12px;
            font-weight: 900;
            color: #1e3a8a;
        }

        .promo-contact a {
            color: #1d4ed8;
            text-decoration: none;
            white-space: nowrap;
        }

        .main-board-popup-overlay {
            position: fixed;
            inset: 0;
            z-index: 13000;
            display: none;
            align-items: center;
            justify-content: center;
            background: rgba(15, 23, 42, .38);
            padding: 28px;
        }

        .main-board-popup-overlay.show {
            display: flex;
        }

        .main-board-popup-stack {
            display: flex;
            align-items: flex-start;
            justify-content: center;
            gap: 18px;
            width: min(1380px, calc(100vw - 56px));
            max-height: min(500px, calc(100vh - 80px));
        }

        .main-board-popup-slot {
            width: min(430px, calc((100vw - 112px) / 3));
            max-height: min(500px, calc(100vh - 80px));
            flex: 0 0 min(430px, calc((100vw - 112px) / 3));
        }

        .main-board-popup {
            width: 100%;
            max-height: min(500px, calc(100vh - 80px));
            display: flex;
            flex-direction: column;
            border: 1px solid #cbd5e1;
            border-radius: 12px;
            background: #fff;
            box-shadow: 0 24px 60px rgba(15, 23, 42, .24);
            overflow: hidden;
        }

        .main-board-popup-body {
            flex: 1 1 auto;
            min-height: 0;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            padding: 20px;
        }

        .main-board-popup-head-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .main-board-popup-head span {
            color: #2563eb;
            font-size: 12px;
            font-weight: 900;
        }

        .main-board-popup-head strong {
            display: block;
            margin-top: 5px;
            color: #111827;
            font-size: 19px;
            font-weight: 900;
            line-height: 1.35;
        }

        .main-board-popup-meta {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 8px;
            color: #94a3b8;
            font-size: 11px;
            font-weight: 800;
            min-width: 0;
            white-space: nowrap;
        }

        .main-board-popup-meta span {
            color: #94a3b8;
        }

        .main-board-popup-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: 22px;
            padding: 0 8px;
            border-radius: 999px;
            background: #dbeafe;
            color: #1d4ed8;
            font-size: 11px;
            font-weight: 900;
        }

        .main-board-popup-content {
            margin-top: 14px;
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            color: #475569;
            font-size: 13px;
            font-weight: 700;
            line-height: 1.7;
        }

        .main-board-popup-content :first-child {
            margin-top: 0;
        }

        .main-board-popup-content p {
            margin: 0 0 10px;
        }

        .main-board-popup-content img {
            max-width: 100%;
            height: auto;
        }

        .main-board-popup-footer {
            flex: 0 0 auto;
            display: flex;
            justify-content: space-between;
            gap: 10px;
            padding: 12px 20px 16px;
            border-top: 1px solid #e2e8f0;
            background: #fff;
        }

        .main-board-popup-footer button {
            min-height: 34px;
            border-radius: 8px;
            padding: 0 12px;
            font-size: 12px;
            font-weight: 900;
            line-height: 1.2;
        }

        .main-board-hide-btn {
            border: 1px solid #cbd5e1;
            background: #fff;
            color: #475569;
        }

        .main-board-close-btn {
            border: 1px solid #bfdbfe;
            background: #2563eb;
            color: #fff;
        }

        @media (max-width: 1500px) {
            .main-promo-page {
                height: auto;
                min-height: calc(100vh - 89px);
                overflow: visible;
            }

            .promo-shell {
                height: auto;
                grid-template-columns: 1fr;
                grid-template-rows: auto auto;
            }

            .promo-hero {
                min-height: 440px;
            }

            .promo-side {
                grid-template-rows: repeat(2, minmax(320px, 1fr));
            }

            .promo-hero h1 {
                font-size: clamp(32px, 3.6vw, 44px);
            }

            .promo-description {
                font-size: 14px;
            }

            .promo-proof {
                grid-template-columns: repeat(4, minmax(0, 1fr));
            }
        }

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

        @media (max-width: 600px) {
            .main-promo-page {
                padding: 12px;
            }

            .promo-hero {
                padding: 26px 22px;
            }

            .promo-hero h1 {
                font-size: 30px;
            }

            .promo-example strong {
                font-size: 13px;
            }
        }
}

/* resources/css/pages/생산관리/작업지시.css */
@scope (html:has(meta[name="mes-style-page"][content="생산관리/작업지시"]) > body) {
.production-order-page {
    height: auto;
    min-height: 0;
}
.production-order-page > .grid-panel {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
}
.production-order-page > .grid-panel > :not(#mainGrid) {
    flex-shrink: 0;
}
.production-order-page .production-order-grids {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    margin: 8px 12px 0;
    gap: 12px;
    flex: 0 0 auto;
    height: min(580px, max(120px, calc(100dvh - 340px)));
    min-height: 0;
}
.production-order-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border: 1px solid #dbe3ed;
    border-radius: 10px;
    background: #fff;
}
.production-order-page .ag-row.mes-row-status-gray .ag-cell { background-color: #f8fafc !important; }
.production-order-page .ag-row.mes-row-status-green .ag-cell { background-color: #f0fdf4 !important; }
.production-order-page .ag-row.mes-row-status-purple .ag-cell { background-color: #f5f3ff !important; }
.production-order-page .ag-row.ag-row-selected .ag-cell { background-color: #e9f1ff !important; box-shadow: none; }
.production-order-page .ag-row.ag-row-selected { box-shadow: inset 3px 0 #2563eb !important; }
.production-order-pane-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 50px;
    padding: 0 14px;
    border-bottom: 1px solid #e5eaf0;
    background: #f8fafc;
}
.production-order-pane-heading .production-order-status-row { margin: 0; flex: 0 0 auto; }
.production-order-pane-title {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #1e293b;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.production-order-page #mainGrid, .production-order-page #orderSummaryGrid { flex: 1; height: 0; min-height: 0; width: 100%; }
.production-order-page .ag-theme-alpine .ag-root-wrapper { border: 0 !important; }
.production-order-page .ag-header-cell-menu-button,
.production-order-page .ag-header-cell-filter-button { display: none !important; }
.production-order-page .ag-cell-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.production-order-page .ag-root-wrapper-body.ag-layout-normal {
    min-height: 0;
}
.production-order-page #productionPagination {
    margin-bottom: 0;
    padding-bottom: 12px;
}
@media (max-width: 1100px) {
    .production-order-page .production-order-grids {
        grid-template-columns: minmax(0, 1fr);
        height: auto;
    }
    .production-order-page .production-order-pane { height: 320px; }
}
.production-order-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0 6px 6px;
}
.production-order-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 6px 6px;
}
.production-order-date-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.production-order-date-filter select,
.production-order-date-filter input,
.production-order-keyword-input {
    height: 32px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 400;
    padding: 0 8px;
}
.production-order-date-filter select {
    width: 86px;
}
.production-order-date-filter input {
    width: 100px;
}
.production-order-date-filter .production-order-keyword-input {
    width: 260px;
}
.production-order-date-filter .date-sep {
    color: #64748b;
    font-size: 12px;
}
.production-order-date-filter button {
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 12px;
    line-height: 1;
}
.production-split-btn {
    border-color: #f59e0b !important;
    background: #ffffff !important;
    color: #f59e0b !important;
    box-shadow: none !important;
}
.production-split-btn:hover {
    border-color: #f59e0b !important;
    background: #fff7ed !important;
    color: #d97706 !important;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.8), 0 0 16px rgba(245, 158, 11, 0.35) !important;
}
.production-split-btn i {
    color: inherit !important;
}
.production-create-btn {
    border: 1px solid #2f6fed !important;
}
.alert-actions.routing-guide-alert-actions {
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}
.routing-assist-launcher-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 188px;
    height: 50px;
    padding: 0 17px;
    border: 0;
    border-radius: 18px;
    color: #fff;
    background: #1d4ed8;
    box-shadow: 0 6px 22px rgba(29, 78, 216, 0.3);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.routing-assist-launcher-button:hover {
    color: #fff;
    background: #1e40af;
    box-shadow: 0 8px 26px rgba(29, 78, 216, 0.38);
    transform: translateY(-1px) scale(1.02);
}
.routing-assist-launcher-button:focus-visible {
    outline: 3px solid #60a5fa;
    outline-offset: 3px;
}
.routing-assist-launcher-button svg {
    flex: 0 0 auto;
}
.routing-guide-close-button {
    color: #ef4444 !important;
    border: 1px solid #ef4444 !important;
    gap: 5px;
}
.routing-guide-close-button i {
    color: #ef4444 !important;
    font-size: 15px;
}

.production-quantity-popup { width: min(900px, calc(100vw - 38px)); max-height: calc(100vh - 42px); display: flex; flex-direction: column; }
.production-quantity-popup .production-quantity-help { margin: 0; padding: 14px 16px !important; color: #64748b; font-size: 12px; line-height: 1.6; }
.production-quantity-popup form { min-height: 0; display: flex; flex-direction: column; }
.production-quantity-popup .production-quantity-table-wrap { max-height: 50vh; overflow: auto; }
.production-quantity-popup table { min-width: 760px; }
.production-quantity-popup th { position: sticky; top: 0; z-index: 1; }
.production-quantity-popup td:nth-child(n+3) { text-align: right; }
.production-quantity-popup input { display: block; width: 100%; max-width: 112px; min-width: 0; height: 30px; margin: 0 auto; padding: 4px 8px; text-align: right; box-sizing: border-box; }
.production-quantity-popup .production-quantity-error { margin: 0; padding: 0 16px; color: #dc2626; font-size: 12px; }
.production-quantity-popup .production-quantity-error:not(:empty) { padding-top: 10px; }
.production-quantity-popup .production-quantity-actions { margin-top: 20px; padding: 0 20px; }

/* Static styles migrated from the EJS markup. */
.mes-local-style-001 { width: 105px; }
.mes-local-style-002 { width: 85px; }
.mes-local-style-003 { width:22% }
.mes-local-style-004 { width:27% }
.mes-local-style-005 { width:17% }
}

/* resources/css/pages/현장/실적등록.css */
@scope (html:has(meta[name="mes-style-page"][content="현장/실적등록"]) > body) {
.workspace {
    position: relative;
}

.field-top-actions {
    position: absolute;
    top: 25px;
    right: 0;
    display: flex;
    gap: 10px;
    align-items: center;
}

:scope.field-board-mode {
    overflow: hidden;
}

:scope.field-board-mode .workspace {
    width: min(100% - 48px, 1320px);
    max-width: 1320px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 24px;
}

:scope.field-board-mode .field-top-actions,
:scope.field-board-mode .field-home-btn {
    display: none;
}

.field-message {
    min-height: 18px;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    color: #ef4444;
}

.search-label {
    line-height: 17px;
}

.btn-po-search {
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 0 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.field-search-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    height: 58px;
}

.field-screen-action {
    height: 58px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.field-top-actions .field-screen-action {
    width: auto;
}

.field-home-btn {
    position: absolute;
    top: 25px;
    left: 0;
}

.field-screen-action:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
    transform: translateY(-1px);
}

.field-screen-action:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.22);
    outline-offset: 2px;
}

.field-screen-action i {
    font-size: 1.1rem;
}

.field-search-row .search-box {
    width: 360px;
    height: 58px;
}

.field-search-actions {
    display: flex;
    gap: 8px;
}

.field-search-actions .btn-query,
.field-search-actions .btn-po-search {
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.po-search-form {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.po-search-form input {
    flex: 0 0 31%;
}

.po-search-box {
    height: min(92vh, 760px);
    display: flex;
    flex-direction: column;
}

.po-search-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.po-search-list {
    flex: 1;
    min-height: 0;
    width: 100%;
    height: 100%;
}

.po-search-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

#end_reason:disabled {
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border-color: #cbd5e1 !important;
    cursor: not-allowed;
    opacity: 1;
}

.field-rework-notice {
    margin-bottom: 8px;
    padding: 9px 12px;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    background: #fffbeb;
    color: #92400e;
    font-size: 13px;
    font-weight: 800;
}

/* Static styles migrated from the EJS markup. */
.mes-local-style-001 { width: min(96vw, 1020px); }
.mes-local-style-002 { width: 1023px; }
.mes-local-style-003 { font-size:12px;color:#64748b;margin-top:4px; }
.mes-local-style-004 { font-size:13px; color:#64748b; }
.mes-local-style-005 { width:420px; }

/* Styles used by generated HTML. */
.mes-local-style-006 { padding:40px; text-align:center; color:#94a3b8; }
}
