/* ==========================================================================
   Classic ERP Form & Data Grid Style (Form-Specific)
   ========================================================================== */

/* 1. 폼 전체 컨테이너 */
.erp-page-content-wrapper {
    width: 100%; height: 100%;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex; flex-direction: column;
    background-color: #ffffff;
}

/* 2. 상단 폼 타이틀 및 액션 툴바 */
.form-title-bar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px; padding-bottom: 4px;
    border-bottom: 2px solid #1a233a;
}
.form-title-left {
    display: flex; align-items: center; gap: 20px;
}
.form-title-center {
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-title-text {
    margin: 0; font-size: 16px; color: #1a233a; font-weight: bold;
    display: flex; align-items: center; gap: 6px; letter-spacing: -0.5px;
}
.title-bullet {
    display: inline-block; width: 5px; height: 16px;
    background: linear-gradient(180deg, var(--erp-accent, #e68a00) 0%, #ff9c1a 100%);
    border-radius: 3px; margin-right: 2px;
}
.title-badge {
    font-size: 11px; color: #64748b; background-color: #f1f5f9;
    padding: 2px 6px; border: 1px solid #cbd5e1; border-radius: 4px;
    font-weight: normal; margin-left: 4px; letter-spacing: 0;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}
.form-action-group { display: flex; align-items: center; gap: 4px; }

/* 3. 검색 조건 패널 */
.form-condition-panel {
    display: flex; align-items: center; gap: 15px;
    background-color: #f8fafc;
    padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 3px;
    margin-bottom: 8px;
}
.form-condition-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.form-field-group { display: flex; align-items: center; gap: 6px; }
.form-field-item { display: flex; align-items: center; gap: 8px; }
.form-field-item label { width: 70px; font-size: 12px; font-weight: bold; color: #475569; text-align: right; }
.form-label { font-weight: bold; font-size: 12px; color: #334155; white-space: nowrap; }
.form-separator { font-weight: bold; color: #475569; }

/* 4. 데이터 그리드 테이블 */
.grid-table-container { flex: 1; width: 100%; border: 1px solid #cbd5e1; overflow: auto; background-color: #ffffff; }
.erp-grid-table { width: 100%; border-collapse: collapse; background-color: #ffffff; font-size: 12px; }
.erp-grid-table th {
    background: linear-gradient(to bottom, #f1f5f9 0%, #e2e8f0 100%);
    color: #334155; padding: 8px; font-weight: bold; border: 1px solid #cbd5e1; text-align: center;
}
.erp-grid-table td { padding: 6px 8px; border: 1px solid #e2e8f0; color: #2d3748; height: 30px; }
.erp-grid-table tr:nth-child(even) { background-color: #f8fafc; }
.erp-grid-table tr:hover { background-color: #edf2f7; }
.erp-grid-table tr.selected-row {
    background-color: #bee3f8 !important; /* A light blue color */
    font-weight: bold;
}
.erp-grid-table tr.selected-row td {
    color: #2c5282;
}

/* 그리드 합계/요약 행 */
.erp-grid-summary-row {
    background-color: #f1f5f9;
    font-weight: bold;
    border-top: 2px solid #cbd5e1;
}

/* 5. 폼 입력 컨트롤 */
.erp-input-text {
    height: 24px; padding: 0 6px;
    border: 1px solid #cbd5e1; border-radius: 2px;
    font-size: 12px; color: #333333; outline: none; background-color: #ffffff;
}
.erp-input-text:focus { border-color: #4a5568; box-shadow: 0 0 0 2px rgba(74, 85, 104, 0.1); }
.erp-input-readonly { background-color: #e2e8f0; color: #64748b; cursor: not-allowed; }

/* 6. 공통 버튼 스타일 */
/* 6. 공통 버튼 스타일 (3D 입체 디자인) */
.erp-btn-primary {
    height: 30px; padding: 0 16px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(to bottom, #64748b 0%, #475569 100%);
    color: #ffffff;
    border: 1px solid #334155;
    border-radius: 4px;
    font-size: 12px; font-weight: bold; cursor: pointer;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3); /* 글씨 깊이감 */
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.15), /* 위쪽 빛 반사 */
        0 3px 0 #1e293b,                         /* 3D 두께 (밑면) */
        0 4px 4px rgba(0, 0, 0, 0.15);           /* 바닥 그림자 */
    transition: all 0.1s ease;
}
.erp-btn-primary:hover {
    background: linear-gradient(to bottom, #718096 0%, #4a5568 100%);
}
.erp-btn-primary:active {
    transform: translateY(3px); /* 누를 때 아래로 3px 이동 */
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.2), 
        0 0 0 #1e293b,               /* 두께 사라짐 */
        0 1px 1px rgba(0, 0, 0, 0.1);
}

.erp-btn-secondary {
    height: 30px; padding: 0 16px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(to bottom, #ffffff 0%, #f1f5f9 100%);
    color: #334155;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 12px; font-weight: bold; cursor: pointer;
    box-shadow: 
        inset 0 1px 0 #ffffff, 
        0 3px 0 #94a3b8, 
        0 4px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.1s ease;
}
.erp-btn-secondary:hover {
    background: linear-gradient(to bottom, #f8fafc 0%, #e2e8f0 100%);
}
.erp-btn-secondary:active {
    transform: translateY(3px);
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.1), 
        0 0 0 #94a3b8, 
        0 1px 1px rgba(0, 0, 0, 0.05);
}

.erp-btn-danger {
    height: 30px; padding: 0 16px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(to bottom, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    border: 1px solid #b91c1c;
    border-radius: 4px;
    font-size: 12px; font-weight: bold; cursor: pointer;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.2), 
        0 3px 0 #991b1b, 
        0 4px 4px rgba(220, 38, 38, 0.2);
    transition: all 0.1s ease;
}
.erp-btn-danger:hover {
    background: linear-gradient(to bottom, #f87171 0%, #ef4444 100%);
}
.erp-btn-danger:active {
    transform: translateY(3px);
    box-shadow: 
        inset 0 1px 2px rgba(0, 0, 0, 0.2), 
        0 0 0 #991b1b, 
        0 1px 1px rgba(220, 38, 38, 0.1);
}

/* 7. 유틸리티 */
.text-center { text-align: center; }
.text-right { text-align: right; padding-right: 10px !important; }
.font-bold { font-weight: bold; }

/* ==========================================================================
   8. 타이틀 즐겨찾기(나의 메뉴) 버튼
   ========================================================================== */
.erp-title-favorite-btn {
    background: none; border: none; font-size: 18px; cursor: pointer; 
    margin-left: 6px; padding: 0; outline: none;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    filter: grayscale(100%) opacity(0.3); /* 기본은 흑백(비활성화) */
    display: inline-block;
}
.erp-title-favorite-btn.is-favorite {
    filter: none; /* 활성화 시 노란색 별 유지 */
    transform: scale(1.1);
}
.erp-title-favorite-btn:hover {
    transform: scale(1.3);
    filter: grayscale(50%) opacity(0.8);
}
.erp-title-favorite-btn.is-favorite:hover {
    filter: none;
    transform: scale(1.3);
}