:root {
    --navy: #0f1f3d;
    --navy-hover: rgba(255, 255, 255, .08); /* 💡 좀 더 직관적인 호버 틴트로 미세 조정 */
    --accent: #60a5fa;
    --surface: #f0f3f8;
    --card: #ffffff;
    --border: #dde3ee;
    --border-light: #eef1f7;
    --text-primary: #1a2540;
    --text-secondary: #5a6a8a;
    --text-muted: #9aaac0;
    --text-surface: #5a6a8a; /* 💡 누락되었던 변수 정의 추가 */

    --blue: #2356b6;
    --blue-medium: #a6afe0;
    --blue-light: #e8f0fd;
    --red: #c0392b;
    --red-light: #fdf0ef;
    --green: #1a7a4a;
    --green-light: #e6f7ed;
    --orange: #d4620a;
    --orange-light: #fef3e8;
    --radius: 6px;
    --radius-sm: 4px;
    --shadow: 0 1px 4px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04);
    --shadow-card: 0 2px 8px rgba(0,0,0,.07);
    --transition: 150ms ease;
    --menu-bar-base: #5270a0;
    --menu-bar-hover: #0f1f3d;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Pretendard', 'Apple SD Gothic Neo', -apple-system, sans-serif;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
}

/* ════════ 상단 GNB (1단 메뉴) ════════ */
.gnb {
    background: var(--navy);
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 200 !important; /* 드롭다운 레이어 밸런스를 위해 최상위 유지 */
}

.gnb-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 20px;
    border-right: 1px solid rgba(255,255,255,.1);
    margin-right: 4px;
    flex-shrink: 0;
    position: relative;
    z-index: 10 !important;
}
.logo-icon { font-size: 18px; }
.logo-text {
    font-size: 14px;
    font-weight: 700;
    color: #e8f0ff;
    white-space: nowrap;
    letter-spacing: -.2px;
}

/* 메뉴 항목 묶음 영역 */
.gnb-menus {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 10 !important;
    overflow: visible !important; /* 자식 서브메뉴가 삐져나와도 잘리지 않게 보장 */
}

.gnb-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    height: 48px;
    cursor: pointer;
    color: #b8c8e8;
    font-size: 13px;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    position: relative;
    white-space: nowrap;
    user-select: none;
    z-index: 15 !important;
}

/* 대메뉴 클릭 트리거 영역 */
.gnb-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    width: 100%;
    cursor: pointer;
    pointer-events: auto !important;
}

/* 💡 데스크톱 환경에 걸맞게 호버 스타일을 고급스럽고 깔끔하게 보정 */
#gnb-visible-menus .gnb-item:hover { 
    background: var(--navy-hover) !important;
    color: #ffffff !important;
    box-shadow: none !important;
    border: none !important;
}

.gnb-item.active { color: var(--accent); }

/* 데스크톱 상단 바 메뉴에서만 깔끔한 바닥 밑줄이 표시되도록 제한 */
#gnb-visible-menus .gnb-item.active::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
}

.gnb-icon { font-size: 15px; }
.gnb-arrow {
    font-size: 18px;    
    color: #93aaca;    
    transition: transform var(--transition);
}
.gnb-item.open .gnb-arrow { transform: rotate(180deg); }

.gnb-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
    position: relative;
    z-index: 10 !important;
}
.gnb-right span { font-size: 14px; cursor: pointer; color: #b8c8e8; }
.gnb-right span:hover { color: #fff; }

.gnb-item, 
.dropdown,
.mobile-side-panel {
    pointer-events: auto !important;
}

/* 햄버거 버튼 */
.hamburger-btn {
    display: none; /* 기본 숨김 */
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.hamburger-btn.force-show { 
    display: flex !important; /* 💡 상단에서 밀려난 숨김 메뉴(HiddenMenus)가 단 1개라도 생기면 자동 노출 */
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: #b8c8e8;
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.hamburger-line.x1 { transform: translateY(6px) rotate(45deg); }
.hamburger-line.x2 { opacity: 0; }
.hamburger-line.x3 { transform: translateY(-6px) rotate(-45deg); }

/* 모바일 메뉴 열렸을 때 배경 오버레이 */
.gnb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 190 !important;
}

/* ── 데스크톱 일반 드롭다운 서브메뉴 박스 ── */
.dropdown {
    position: absolute;
    top: 48px;
    left: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0,0,0,.14);    
    overflow: hidden;
    z-index: 210 !important;
}

.dropdown.show {
    position: absolute;
    top: 48px;
    left: 0;
    background: #fff !important;
    border: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,.14);    
    width: max-content;
    display: block !important;
    z-index: 10000 !important; /* 백드롭보다 높여 터치 씹힘 방지 */
    pointer-events: auto !important;
}
.dropdown.hidden { display: none !important; }

/* 💡 하이퍼링크 기반 자식에 대한 마우스 클릭 보장 */
a.dd-item, .dd-item {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    cursor: pointer !important;
    font-size: 12.5px;
    color: var(--text-primary) !important;
    text-decoration: none !important;
    transition: background 120ms ease;
    white-space: nowrap;
    position: relative;
    z-index: 10005 !important;
    pointer-events: auto !important;
}
a.dd-item:hover, .dd-item:hover { background: var(--surface) !important; }
a.dd-item.active, .dd-item.active { color: var(--blue) !important; font-weight: 600; background: var(--blue-light) !important; }
.dd-icon { font-size: 13px; }

.dd-item-color{
    color: var(--text-surface) !important;
}

/* ── 외부 영역 클릭 차단용 백드롭 ── */
.gnb-dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;    
    pointer-events: auto !important; 
    z-index: 1 !important; /* 드롭다운 메뉴 본체(10000) 바로 아래 배치 */
}

/* ════════ LNB (2단 서브 탭) ════════ */
.lnb-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    display: block !important;
    background: #cae8ff;
}

.lnb {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: max-content !important; /* 💡 내부 자식들의 총합만큼 가로폭을 강제로 무한 확장 */
    height: 28px;
}

.lnb-item {
    flex-shrink: 0 !important; /* 💡 탭이 절대로 찌그러지지 않도록 고정 */
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center;
    font-size:12px;
}
.lnb-item:hover { color: var(--text-primary); }
.lnb-item.active {
    border-bottom: 2px solid #007bff; /* 원하는 파란색 헥사코드 (#007bff, #1890ff 등) */
    color: #007bff; /* (선택) 텍스트/아이콘 색상도 함께 변경 시 */
    font-weight: 600;
}
.lnb-icon { font-size: 13px; }

/* ════════ 본문 공통 UI ════════ */
.page-wrap {
    padding: 18px 24px 40px;
    max-width: 1280px;
    margin: 0 auto;
}
.page-header { margin-top: 0px; }
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: bold;
    padding: 5px 0px 5px 15px;
    margin: 0px;
    color: var(--text-secondary);
    line-height: 1;
}
.breadcrumb .sep { font-size: 12px;  margin: 0 6px; color: var(--text-secondary); }
.breadcrumb .cur { color: var(--text-secondary); font-weight: bold; padding-left: 10px; font-weight: bold;}
.breadcrumb span {
    white-space: nowrap; /* 텍스트가 단어 중간에서 애매하게 깨지는 것을 방지 */
}

/* ── 툴바 ── */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 5px;    
}
.btn-group { display: flex; align-items: center; gap: 6px; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-save { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-save:hover:not(:disabled) { background: #1a46a0; }
.btn-delete { background: var(--red-light); color: var(--red); border-color: #f0b8b3; }
.btn-delete:hover:not(:disabled) { background: #fce8e6; }
.btn-search { background: var(--card); color: var(--text-secondary); border-color: var(--border); }
.btn-search:hover { background: var(--surface); color: var(--text-primary); }
.btn-search-exec {
    background: var(--blue);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.btn-divider { width: 1px; height: 22px; background: var(--border); margin: 0 2px; }

.btn-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
}
.status-badge.status-접수 { background: var(--blue-light); color: var(--blue); }
.status-badge.status-진행중 { background: var(--orange-light); color: var(--orange); }
.status-badge.status-완료 { background: var(--green-light); color: var(--green); }
.status-badge.status-보류 { background: #f5f0ff; color: #6d28d9; }
.status-badge.status-취소 { background: #f5f5f5; color: #888; }

/* ── 검색 패널 ── */
.search-panel {
    background: #c4cbed;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 5px;        
    animation: slideDown .15s ease;
}
@keyframes slideDown { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }
.search-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
}
.search-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 200px; /* 💡 최소 200px을 유지하며 공간이 부족하면 자동으로 다음 줄로 이동 */
    min-width: 200px;
}
.search-field label {
    font-size: 11.5px;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}
.search-field input {
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    background: #fff;
    color: var(--text-primary);
    width: 130px;
}
/* 데이트 피커 박스 정렬 */
.date-picker-group {
    display: flex;
    align-items: center;
    gap: 0px;
    width: 100%;
}
.date-tilde { color: var(--text-muted); }

/* 하단 그리드 컨테이너 가드 */
.grid-responsive-container {
    padding: 0; 
    gap: 10px;
}

/* 부모 그리드 아이템 가드 */
.fluent-grid-item {
    min-height: 0; /* Flex 자식이 부모를 뚫고 나가는 버그 방지 */
}

/* 다이얼로그 내 메인 영역 유연성 확보 */
.main-content-wrap {
    flex: 1;
    height: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.list-card .table-wrap {
    flex: 1;
    height: 0;
    min-height: 0;
    overflow: auto !important; /* 내부 자체 가로/세로 스크롤 활성화 */
    border-top: none;
}

/* ── 폼 카드 ── */
.form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px 22px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-card);
}
.form-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 12px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--blue-light);
}
.form-divider { border: none; border-top: 1px solid var(--border-light); margin: 16px 0 14px; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 18px;
}
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field.wide { grid-column: span 3; }
.form-field label { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.required { color: var(--red); }
.form-field input, .form-field select, .form-field textarea {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    color: var(--text-primary);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
    font-family: inherit;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(35,86,182,.12);
}
.form-field input.readonly { background: var(--surface); color: var(--text-muted); }
.form-field textarea { resize: vertical; }

/* ── 목록 카드 ── */
.list-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    min-height: 0; /* 중요: 내부 스크롤 생성을 위해 고정 해제 */
}
.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1px 15px;
    border-bottom: 1px solid var(--border);
    background-color: #efefef;
}
.list-title { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
.list-selected { font-size: 13.5px; font-weight: bold; color: var(--blue);}
.list-count { font-size: 13.5px; color: var(--text-primary);}
.table-wrap {     
    width: 100%;
    height: 100%; 
    overflow: auto;            
    background: white;
 }

.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th {
    background: #f5f7fc;
    padding: 8px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    white-space: nowrap;
}
.data-table tbody tr { cursor: pointer; transition: background var(--transition); }
.data-table tbody tr:hover { background: var(--blue-light); }
.data-table tbody tr.selected { background: #dce8fb; }
.data-table tbody tr:last-child td { border-bottom: none; }
.empty-row { text-align: center; color: var(--text-muted); padding: 30px !important; font-size: 12.5px; }

/* ── 토스트 & 에러 UI ── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 11px 20px;
    border-radius: var(--radius);
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.18);
    z-index: 9999;
    animation: toastIn .2s ease, toastOut .2s ease 2.3s forwards;
}
.toast.success { background: #1a7a4a; }
.toast.error { background: var(--red); }
@keyframes toastIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
@keyframes toastOut { to { opacity:0; transform:translateY(6px); } }

#blazor-error-ui {
    background: #fdf0ef;
    color: #c0392b;
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,.1);
    display: none;
    left: 0;
    padding: 0.8rem 1.2rem;
    position: fixed !important;
    width: 100%;
    z-index: 10000 !important;;
    font-size: 13px;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 1rem; top: 0.6rem; }

#components-reconnect-modal
{
    z-index: 10000 !important;
}

/* ── 우측 슬라이딩 모바일 사이드 패널 ── */
.mobile-side-panel {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--navy);
    flex-direction: column !important;
    align-items: stretch !important;
    transition: right 250ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9996 !important; /* 오버레이보다 높은 계층 구조 주입 */
    box-shadow: -4px 0 12px rgba(0,0,0,.2);
    padding-top: 10px;
    display: flex !important;
    overflow-y: auto;
}
.mobile-side-panel.mobile-open { right: 0; }

.mobileopen-op{
    background: rgba(0, 0, 0, .45)!important;
    inset: 0!important;
}

/* 모바일용 항목 기본 리셋 */
.mobile-side-panel .gnb-item {
    position: relative;
    z-index: 5 !important;
    background: transparent !important;
    color: #b8c8e8 !important;
    box-shadow: none !important;
    border: none !important;
}
.mobile-side-panel .gnb-item.active {
    color: var(--accent) !important;
    font-weight: 600;
}

/* 모바일 패널 내부의 자식 메뉴(인라인 아코디언) 홀더 양식 보정 */
.mobile-side-panel .dropdown-inline {
    display: block;
    width: 100%;
}
.mobile-side-panel .dropdown-inline.hidden {
    display: none !important;
}

/* 모바일 내부 자식 하이퍼링크 마우스 상호작용 격리 */
.mobile-side-panel .dropdown-inline a.dd-item {
    display: flex !important;
    width: 100%;
    color: #b8c8e8 !important;
    text-decoration: none !important;
    padding: 10px 16px;
    z-index: 10010 !important;
}
.mobile-side-panel .dropdown-inline a.dd-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

.panel-void-click {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: transparent;
    z-index: 0;
}

.bg-bluelight {
    --bs-bg-opacity: 1;
    background-color: var(--blue-medium) !important;
}

.bg-image-section{
    background-image: url('images/login-bg.jpg'); 
    background-size: cover;
    background-position: center;
    transition: all 0.3s ease;
    background-repeat: no-repeat;
}

.comboboxList {
    display: block;
    padding-left:10px;
    width: 100%;                                
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap;
}

.custom-bg-input::part(control) {
    background-color: lightgray;
}

.info-panel {
    background: #f5f5f0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 4px;
    animation: slideDown .15s ease;
}

.info-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
}

.info-field {
    display: flex;
    flex-direction: column;
    flex: 1 ; 
}

.fluent-data-grid-page {
    padding: 2px 10px !important; 
    border-top: 1px solid var(--border-light); 
    background: #fbfbfb;
    font-size: 11px;    
    margin-top: 1px !important;
}

.fluent-data-grid {  
    font-size: 11px !important;
    height: 100%;
    width: 100%;
}

.fluent-data-grid-button {
    height: 0 !important;
    font-size: 11px !important;    
    display: flex !important;
    justify-content: center;
    align-items: center;    
}

/* 💡 오타 교정 완료: heder -> header */
.fluent-data-grid-header {
    font-size: 13px !important;
}

.fluent-data-grid-row [role="gridcell"] {
    font-size: 12px !important;    
    line-height: 0px;    
    padding-left:0px !important;     
}

.fluent-data-grid-number{
    /* border-right: 1px solid #e0e0e0; */
     text-align: center;
     font-size: 6px !important;
     font-style: italic;
     color:gray;
     padding-left:0px !important;     
}

/* 다이얼로그 본체 레이어 조절 */
.fluent-dialog-header {
    z-index: 12000 !important;
    padding-bottom: 1px !important; /* 원하시는 패딩 값으로 조절 */
}

/* 다이얼로그 본체 레이어 조절 */
fluent-dialog {
    z-index: 12000 !important;
}

/* 다이얼로그 뒤에 깔리는 흐릿한 배경(오버레이) 레이어 조절 */
fluent-dialog-overlay {
    z-index: 11999 !important;
}

.sticky-total-row {
    position: sticky !important;
    bottom: 0 !important; /* 최하단 고정 */
    
    /* 스크롤 시 뒤쪽의 일반 데이터가 비쳐 보이지 않도록 배경색을 불투명하게 채워야 합니다 */
    background-color: #f8f9fa !important; 
    
    font-weight: bold !important;
    color: #0056b3 !important;
    
    /* 일반 데이터행과 구분감을 주기 위한 상단 굵은 경계선 */
    border-top: 1px solid #b8daff !important;
    border-bottom: 1px solid #b8daff !important;
    /* 다른 행보다 무조건 위에 보이도록 레이어 순서 지정 */
    z-index: 1; 
        /* 높이를 명확히 체킹할 수 있도록 패딩 고정 */
    height: 28px !important;       /* 행 높이를 22px로 고정 */
    text-align: center;
}

/* 요약 행 내부의 모든 셀(td) 패딩을 제거하거나 최소화하여 글자가 잘리지 않게 함 */
.sticky-total-row td {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    height: 28px !important;
    font-size: 11px !important; /* 높이가 줄어든 만큼 글자 크기도 살짝 줄여주면 예쁩니다 */
}

.sticky-total-row td,
.sticky-total-row [role="gridcell"] {
    border-right: none !important;
    border-left: none !important;
}

/* 첫 번째 셀(No. 또는 Client)에만 텍스트를 정렬하고 나머지는 비워두거나, 
   특정 셀의 텍스트가 옆으로 흘러넘치도록 overflow를 해제합니다 */
.sticky-total-row [role="gridcell"]:nth-child(2) {
    overflow: visible !important;
    white-space: nowrap !important;
    z-index: 5;
}

/* 🌟 Accounts Rec. 내 요약 2줄 박스 레이아웃 */
.summary-amount-cell-box {
    display: flex;
    flex-direction: column;      /* 위에서 아래로 2줄 배치 */
    justify-content: center;
    align-items: flex-end;       /* ⚠️ 중요: 금액 컬럼이므로 우측 정렬(오른쪽 줄맞춤) */
    line-height: 1.2 !important;
}

/* 2줄 중 상단 글씨 스타일 (크고 두껍게 강조) */
.summary-amount-main {
    font-size: 11px !important;    
    color: #0056b3;
}

/* 2줄 중 하단 글씨 스타일 (작고 옅은 회색 안내 문구) */
.summary-amount-sub {
    overflow-wrap: break-word;
    font-size: 11px !important;
    font-weight: bold;
    color: #0056b3;
}

.grid-scroll-container {
    height: calc(100vh - 250px); /* 화면 상단 검색바나 툴바 높이를 제외한 나머지 공간을 꽉 채움 */
    overflow: auto;              /* 스크롤바가 이 영역에 생기도록 유도 */
    position: relative;
}

/* ════════ 더블클릭 상세조회 모달 팝업 스타일 ════════ */
.grid-popup-box {
    /* 🌟 핵심: 부모 요소들의 위치 제약을 완전히 깨부수고 화면 전체(Viewport) 기준으로 고정합니다 */
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important; /* 가로, 세로 정중앙 축 정렬 */
    
    /* 기존 스타일 초기화 및 유지 */
    margin: 0 !important; /* 브라우저가 기본적으로 주는 dialog 마진 제거 */
    border: none;
    border-radius: 8px;
    padding: 0;
    width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    background-color: #ffffff;
    font-family: inherit;
    z-index: 99999 !important; /* 그리드 헤더나 스티키 행보다 무조건 위에 띄움 */
}

/* 팝업이 열렸을 때 뒷배경을 어둡고 고급스럽게 블러 처리 */
.grid-popup-box::backdrop {
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(2px);
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
}

/* 1. 평상시 짝수(Even) 그룹 내부 셀 배경색 */
.fluent-data-grid-row.even-row [role="gridcell"],
fluent-data-grid-row.even-row [role="gridcell"] {
    background-color: #ffffff !important;
}

/* 2. 평상시 홀수(Odd) 그룹 내부 셀 배경색 */
.fluent-data-grid-row.odd-row [role="gridcell"],
fluent-data-grid-row.odd-row [role="gridcell"] {
    background-color: #f3faef !important; /* 소프트 실버 그레이 */
}

/* 3. 💥 마우스가 올라갔을 때(Hover) 해당 행 내부의 '모든 셀' 배경색을 한 번에 강제 전환 */
.fluent-data-grid-row.even-row:hover [role="gridcell"],
.fluent-data-grid-row.odd-row:hover [role="gridcell"],
fluent-data-grid-row.even-row:hover [role="gridcell"],
fluent-data-grid-row.odd-row:hover [role="gridcell"] {
    background-color: #e8f0fd !important; /* 마우스가 올라갔을 때 칠할 뚜렷한 연한 블루 */
    cursor: pointer !important;
}

/* ==========================================================================
   [보너스 가드] 최하단 요약 행(sticky-total-row)은 호버 대상에서 완전히 제외 */
.fluent-data-grid-row.sticky-total-row:hover [role="gridcell"],
fluent-data-grid-row.sticky-total-row:hover [role="gridcell"] {
    background-color: #f8f9fa !important; /* 호버 시에도 요약 행 특유의 배경색 유지 */
    cursor: default !important;
}


.popup-content-wrapper {
    padding: 20px;
}

.popup-title {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

/* 데이터가 담기는 본문 영역 (길면 자동 줄바꿈) */
.popup-body-text {
    font-size: 13px;
    color: #334155;
    line-height: 1.6;
    word-break: break-all;
    white-space: pre-wrap;
    padding: 10px 12px;
    background-color: #f8fafc;
    border-radius: 4px;
    min-height: 40px;
    max-height: 250px;
    overflow-y: auto;
}

/* 하단 제어 버튼 레이아웃 */
.popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.popup-btn {
    border: none;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn {
    background-color: #2563eb;
    color: white;
}
.copy-btn:hover { background-color: #1d4ed8; }

.close-btn {
    background-color: #e2e8f0;
    color: #475569;
}
.close-btn:hover { background-color: #cbd5e1; }

/* ════════════════════════════════════════════════
   반응형 브레이크포인트 미디어쿼리 (데스크톱 ➡️ 모바일 순으로 통합 정렬)
   ════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    /* 💡 태블릿 해상도 이하로 내려가면 좌/우로 배치되던 그리드를 위/아래 100% 배치로 전환 */
    .grid-responsive-container > .fluent-grid-item {
        width: 100% !important;
        max-width: 100% !important;
        flex-basis: 100% !important;
    }
}

@media (max-width: 900px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
    .form-field.wide { grid-column: span 2; }
}

@media (max-width: 768px) {
    /* 💡 [수정 핵심] 상단바 강제 삭제 코드 제거 상태 유지 */
    /* 이제 상단바 영역이 완전히 사라지지 않고, JS 너비 계산식에 유연하게 연동되어 메뉴가 1개씩 깔끔하게 햄버거 메뉴 안으로 숨겨집니다. */
    .form-grid { grid-template-columns: 1fr; gap: 10px; }
    .search-field { flex: 1 1 100%; /* 💡 모바일 환경에서는 검색 필드가 한 줄에 하나씩 꽉 차게 변경 */ }
    .search-field input { width: 100%; flex: 1; }
}

@media (max-width: 576px) {
    .breadcrumb { font-size: 12px; /* 모바일에서는 폰트 크기를 살짝 줄임 */ }
    
    /* 너무 긴 텍스트를 ...으로 말아쥐기 */
    .breadcrumb .sep, 
    .breadcrumb .cur {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 480px) {
    .logo-text { display: none; }
    .gnb-logo { padding-right: 6px; }
    .breadcrumb { font-size: 11px; }
    .status-badge { font-size: 11px; padding: 3px 10px; }
    .btn span:last-child { font-size: 12px; }
    .btn-divider { display: none; }
    .toast { left: 12px; right: 12px; bottom: 12px; text-align: center; }
}

/* 데스크톱 환경에서는 로그인 세션 일러스트 영역이 세로로 꽉 차게 조절 */
@media (min-width: 768px) {
    .bg-image-section { min-height: 100% !important; }
}


.custom-header {
    font-family: 'Pretendard', 'Malgun Gothic', sans-serif !important;
    font-size: 8px !important;
    font-weight: bold !important;
    color: #64181b !important; /* 텍스트 색상도 변경 가능 */
}

.custom-header-color{
    background-color: #f9f8f4 !important;
    font-weight: bold !important;
    color: #2b579a !important;
}

.customDxGrid
{
    height: 100% !important; 
    Width: 100% !important; 
}

.large-summary-text {
    font-size: 11px !important;
    color: #2c3e50;
}

.blazor-auth-loading-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 80vh; /* 화면 전체 영역 확보 */
    width: 100%;
    text-align: center;
}

/* 데이터가 없을 때, 하단 바(dxbl-grid-bottom-panel) 영역을 정렬 */
.grid-no-data .dxbl-grid-bottom-panel {
    display: flex !important;
    justify-content: center !important; /* 글자를 가운데 정렬 */
    align-items: center !important;
    min-height: 25px;
    padding: 0 !important;
    background-color: #f8f9fa; /* 하단 바 배경색 유지 */
    border-top: 1px solid #dee2e6;
}

/* 하단 공간 내부에 "No data" 텍스트를 가상 요소로 강제 강제 주입 */
.grid-no-data .dxbl-grid-bottom-panel::after {
    content: "No data";
    font-size: 0.7rem;
    font-weight: bold;
    color: #6c757d; /* Bootstrap Muted 칼라 */
    display: block;
    line-height: 1 !important;
}

/* 데이터가 없는데도 조그맣게 렌더링되어 자리만 차지하는 
   기본 페이지 크기(Page Size) 드롭다운이나 페이징 버튼 레이아웃을 완전히 숨김 */
.grid-no-data .dxbl-grid-bottom-panel > * {
    display: none !important;
}

.dxbl-grid-header-content
{
    text-align: center;
}

.dxbl-grid-header-content span{
    white-space: normal !important;
    word-break: keep-all; /* 한글 단어 단위 줄바꿈 */
    line-height: 1.2 !important;
}

/* DevExpress Pager 내 Page Size 선택 상자 스타일 지정 */
.dxbl-pager-container > .dxbl-pager-page-size-selector > .dxbl-text-edit {
    width: 7rem !important;          /* 내용 길이에 맞춰 너비 자동 조절 */    
}

.dx_readonly
{
    background-color: #f9fadb !important;
}

/* DateRangePicker 달력의 주차 번호 열 및 헤더 비활성화 */
.hide-week-numbers .dxbl-calendar-week-number-cell,
.hide-week-numbers .dxbl-calendar-week-number,
.hide-week-numbers .dxbl-calendar th:first-child,
.hide-week-numbers .dxbl-calendar td:first-child:has(.dxbl-calendar-week-number) {
    visibility: hidden !important;
}

.dx-nav-menu {
    color: #fff !important;
    background-color: var(--menu-bar-base) !important;
    --dxbl-menu-top-left-border-radius:"" !important;
}

.dxbl-menu-dropdown-toggle {
    color: white !important;
}

.menu-item {
    color: #fff !important;

}

    .menu-item :hover {
        color: #fff !important;
        background-color: var(--menu-bar-hover) !important;
    }

.menu-item-sub {
    color: #fff !important;
    background-color: var(--menu-bar-base) !important;
}

    .menu-item-sub :hover {
         background-color: var(--menu-bar-hover) !important;
    }

.dxbl-menu-item-text {
    color: #fff !important;
}

.menu-item .dxbl-selected {
    background-color: var(--menu-bar-hover) !important;
}

.menu-item .dxbl-active {
    background-color: var(--menu-bar-hover) !important;
}

/* 탭 기본 레이아웃 (비활성 상태) */
.tab-item-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0px !important;
    cursor: pointer !important;
    user-select: none;
    padding: 0px 5px 0px 5px !important;    
    margin:1px;
    border: none !important;
    border-bottom: 2px solid transparent !important; /* 비활성: 투명 바 */
    background-color: transparent !important;
    border-radius: 0 !important;
    transition: all 0.15s ease-in-out !important;    
}

/* 탭 제목 기본 스타일 (비활성: 은은한 회색) */
.tab-title {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #666666 !important;
    transition: color 0.15s ease-in-out !important;
}

/* 닫기 버튼 기본 스타일 */
.tab-close-icon-btn {
    padding: 0px !important;
    margin-left:3px;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    border: none !important;
    background: transparent !important;
    opacity: 0.3 !important;
    transition: opacity 0.15s ease-in-out, background-color 0.15s ease-in-out !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

    .tab-close-icon-btn * {
        pointer-events: none !important;
    }

/* ===================================================
   1. 💡 [Hover 상태] 연한 파스텔 강조 (미리보기 느낌)
   =================================================== */

.tab-item-wrapper:hover {
    border-bottom-color: #9ec5fe !important; /* 연한 하늘색 하단 바 */
    background-color: rgba(0, 0, 0, 0.03) !important; /* 살짝 어두워지는 은은한 배경 */
}

    .tab-item-wrapper:hover .tab-title {
        color: #0b5ed7 !important; /* 조금 진해지는 회색/파랑 */
    }

    .tab-item-wrapper:hover .tab-close-icon-btn {
        opacity: 0.6 !important;
    }

/* ===================================================
   2. 🔥 [Active 상태] 확실한 메인 컬러 강조 (선택 완료)
   =================================================== */

.dxbl-active .tab-item-wrapper,
.dx-active .tab-item-wrapper,
.active .tab-item-wrapper {
    border-bottom-color: #0d6efd !important; /* 또렷한 메인 블루 하단 바 */
    background-color: rgba(13, 110, 253, 0.06) !important; /* 옅은 파란색 배경 포커스 */
}

.dxbl-active .tab-title,
.dx-active .tab-title,
.active .tab-title {
    color: #0d6efd !important; /* 진한 메인 블루 글자 */
    font-weight: 600 !important;
}

.dxbl-active .tab-close-icon-btn,
.dx-active .tab-close-icon-btn,
.active .tab-close-icon-btn {
    opacity: 0.8 !important;
}

/* 닫기 버튼 자체 direct Hover */
.tab-close-icon-btn:hover {
    opacity: 1 !important;
    background-color: rgba(0, 0, 0, 0.12) !important;
}

/* 레이아웃 최상위 높이 고정 */
.main-layout-container {
    height: 100vh;
    overflow: hidden;
}

/* Flexbox 자식 요소 스크롤 처리를 위한 필수 유틸리티 */
.min-h-0 {
    min-height: 0 !important;
}

.tab-content {
    overflow-y: auto; /* 내용이 넘칠 때만 세로 스크롤 생성 */
    overflow-x: hidden; /* 가로 스크롤 발생 방지 */
    height: 88vh;
    box-sizing: border-box; /* 패딩/테두리로 인한 사이즈 증가 방지 */
}

.custom-item-group {
    background-color: #dfe6ec;       
    padding: 1px 3px 1px 3px;
    box-sizing: border-box;
}

.grid-modified-cell{    
    font-weight:bold;
}

.grid-toolbar-display-none .dxbl-grid-toolbar-container
{
    display: none; 
}