
/* 기본 스타일 및 레이아웃 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #4a5568;
    line-height: 1.4;
    min-height: 100vh;
}

.container {
    display: flex;
    min-height: 100vh;
    height: 100vh;
    position: relative;
    max-width: none !important;
}

/* 사이드바 스타일 */
.sidebar {
    width: 280px;
    background: #ffffff !important;
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
    border-radius: 0 12px 12px 0; /* 오른쪽 귀퉁이 라운드 효과 */
}

/* 사이드바 스크롤바 스타일 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f7fafc;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* 모바일에서 사이드바 숨김 */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
        background: #ffffff !important;
        z-index: 9998 !important;
        box-shadow: none !important; /* 닫혀있을 때는 그림자 없음 */
        border-radius: 0 12px 12px 0 !important; /* 오른쪽 귀퉁이 라운드 효과 */
    }
    
    .sidebar.open {
        transform: translateX(0);
        background: #ffffff !important;
        z-index: 9998 !important;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15), 0 0 40px rgba(0, 0, 0, 0.1) !important; /* 열려있을 때 강한 그림자 */
        border-radius: 0 12px 12px 0 !important; /* 오른쪽 귀퉁이 라운드 효과 */
    }
    
    /* 사이드바 내부 요소들 배경 설정 */
    .sidebar-header {
        background-color: #ffffff !important;
    }
    
    .user-info {
        background-color: #ffffff !important;
    }
    
    .sidebar-nav {
        background-color: #ffffff !important;
    }
    
    .nav-list {
        background-color: #ffffff !important;
    }
    
    .nav-item {
        background-color: transparent !important;
    }
    
    .nav-link {
        background-color: transparent !important;
    }
    
    /* 서브메뉴 배경은 밝은 회색 유지 */
    .has-submenu .submenu {
        background: #f8fafc !important;
    }
    
    .submenu .has-submenu .submenu {
        background: #f8fafc !important;
    }
    
    .submenu li {
        background-color: transparent !important;
    }
    
    .submenu a {
        background-color: transparent !important;
    }
    
    .submenu a:hover {
        background: #f8fafc !important;
    }
    
    .submenu a.active {
        background: #f8fafc !important;
    }
    
    /* 모바일에서 사이드바 오버레이 제거 - 그림자 효과로 대체 */
}

/* 햄버거 메뉴 버튼 - 1023px 이하에서만 표시 (PC 모드에서 브라우저를 줄였을 때 메뉴 활성화용) */
.mobile-menu-toggle {
    display: none !important; /* 기본값: 숨김 (1024px 이상) */
    position: fixed !important;
    top: 12px !important;
    left: 12px !important;
    z-index: 1001 !important; /* 사이드바(z-index: 9998)보다 위에 표시 */
    width: 44px !important;
    height: 22px !important; /* 높이 절반으로 축소 */
    background: rgba(0, 0, 0, 0.6) !important; /* 약간 검은색 반투명 */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    padding: 4px 8px !important; /* 높이에 맞게 패딩 조정 */
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: row !important;
    backdrop-filter: blur(8px) !important; /* 블러 효과로 반투명감 강화 */
    -webkit-backdrop-filter: blur(8px) !important;
}

.mobile-menu-toggle:hover {
    background: rgba(0, 0, 0, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 3px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.mobile-menu-toggle:active {
    background: rgba(0, 0, 0, 0.8) !important;
    transform: scale(0.95) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.mobile-menu-toggle .hamburger-icon {
    width: 18px !important; /* 높이에 맞게 아이콘 크기 조정 */
    height: 18px !important;
    color: #ffffff !important; /* 흰색으로 변경 (어두운 배경에 맞춤) */
    stroke-width: 2.5 !important;
    transition: transform 0.3s ease !important;
}

/* 햄버거 메뉴 아이콘 애니메이션 */
#mobileMenuToggle.active .hamburger-icon {
    transform: rotate(90deg) !important;
}

/* 1023px 이하에서만 햄버거 메뉴 버튼 표시 */
@media (max-width: 1023px) {
    .mobile-menu-toggle {
        display: flex !important;
    }
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 로고가 있을 경우: 로고만 풀로 차지 */
.logo-full {
    display: block;
    width: 100%;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.logo-full:hover {
    opacity: 0.8;
}

.logo-full-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    max-height: 80px;
}

/* 로고가 없을 경우: STN Network One'Call이 풀로 차지 */
.logo-full-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.logo-full-text:hover {
    opacity: 0.8;
}

.company-name-full {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    text-align: center;
}

.service-name-full {
    font-size: 20px;
    font-weight: bold;
    color: #667eea;
    text-align: center;
    margin-top: 2px;
}

/* 기존 스타일 (호환성을 위해 유지) */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.company-name {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.service-name {
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
    margin-top: -2px;
}

.user-info {
    padding: 12px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-weight: 600;
    color: #667eea;
    font-size: 14px;
}

.customer-name {
    font-weight: 500;
    color: #718096;
    font-size: 12px;
}

.logout-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s ease;
}

.logout-link:hover {
    color: #667eea;
}

.sidebar-nav {
    padding: 10px 0;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin: 1px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 8px 20px;
    color: #64748b;
    text-decoration: none;
    position: relative;
    font-weight: 700;
}

.nav-link:hover {
    background: #f8fafc;
    color: #475569;
}

.nav-item.active .nav-link {
    background: #f8fafc;
    color: #475569;
    border-right: none;
}

.nav-icon {
    width: 20px;
    text-align: center;
    margin-right: 12px;
    font-size: 14px;
}

.nav-text {
    flex: 1;
    font-size: 14px;
    font-weight: 700;
}

.nav-arrow {
    font-size: 10px;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

/* 서브메뉴 스타일 */
.has-submenu .submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8fafc;
    margin-left: 0;
}

.has-submenu.active .submenu {
    max-height: 1000px;
}

.has-submenu.active .nav-arrow {
    transform: rotate(180deg);
}

.submenu li {
    list-style: none;
}

.submenu a {
    display: flex;
    align-items: center;
    padding: 6px 20px 6px 40px;
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-left: none;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.menu-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.2s ease;
    vertical-align: middle;
    display: inline-block;
}

.submenu a:hover .menu-icon {
    opacity: 1;
    filter: grayscale(0%);
}

.submenu a:hover {
    color: #475569;
    background: #f8fafc;
    border-left-color: transparent;
}

.submenu a.active {
    color: #475569;
    background: #f8fafc;
    border-left-color: transparent;
    font-weight: 700;
    box-shadow: none;
}

/* 중첩된 서브메뉴 스타일 */
.submenu .has-submenu .submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8fafc;
    margin-left: 0;
}

.submenu .has-submenu.active .submenu {
    max-height: 500px;
}

.submenu .has-submenu .nav-arrow {
    font-size: 10px;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.submenu .has-submenu.active .nav-arrow {
    transform: rotate(180deg);
}

.submenu .submenu a {
    padding: 6px 20px 6px 60px;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.submenu .submenu a:hover {
    color: #475569;
    background: #f8fafc;
    border-left-color: transparent;
}

/* 메인 콘텐츠 영역 */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 10px;
    background: transparent;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: calc(100vw - 280px);
    box-sizing: border-box;
    overflow-x: hidden;
}

/* 기본 테이블 스타일 - 모든 리스트를 그리드 형식으로 */
table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    overflow: hidden;
    background: #fafafa;
}

thead {
    background: #f3f4f6;
    border-bottom: 2px solid #d1d5db;
}

th {
    padding: 3px 8px;
    text-align: center;
    font-weight: 600;
    color: #111827;
    border-right: 1px solid #e5e7eb;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1.1;
    height: 20px;
}

th:last-child {
    border-right: none;
}

tbody tr {
    border-bottom: 1px solid #e5e7eb;
    height: 18px;
    background: #fafafa;
}

tbody tr:hover {
    background: #f9fafb;
}

tbody tr:nth-child(even) {
    background: #f5f5f5;
}

tbody tr:nth-child(even):hover {
    background: #f3f4f6;
}

td {
    padding: 2px 8px;
    border-right: 1px solid #e5e7eb;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    line-height: 1.1;
    height: 18px;
    text-align: left;
}

td:last-child {
    border-right: none;
}

.action-buttons {
    white-space: nowrap;
}

.action-buttons button {
    margin-right: 4px;
    padding: 2px 6px;
    font-size: 11px;
    border: 1px solid #d1d5db;
    border-radius: 2px;
    background: white;
    cursor: pointer;
}

.action-buttons button:hover {
    background: #f3f4f6;
}

.status-badge {
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* 공통 검색 버튼 스타일 */
.search-button {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 4px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
    min-width: 50px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
    transform: translateY(-1px);
}

.search-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}

.search-button:focus {
    outline: none;
    ring: 2px;
    ring-color: rgba(79, 70, 229, 0.5);
}

/* 공통 버튼 스타일 - 검색 버튼과 동일한 크기 */
button {
    padding: 4px 12px !important;
    font-size: 12px !important;
    height: 24px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 50px !important;
    background: #f1f5f9 !important; /* 연한 파스텔 그레이 */
    color: #111827 !important; /* 검은색 텍스트 */
    border: 1px solid #e2e8f0 !important; /* 연한 테두리 */
}

button:hover {
    background: #e2e8f0 !important; /* 호버 시 조금 더 진한 그레이 */
    color: #111827 !important;
}

/* 액션 버튼들 스타일 */
.action-buttons button {
    margin-right: 4px !important;
    padding: 2px 6px !important;
    font-size: 11px !important;
    border: 1px solid #e2e8f0 !important; /* 연한 파스텔 테두리 */
    border-radius: 2px !important;
    background: #f8fafc !important; /* 연한 파스텔 그레이 */
    color: #111827 !important; /* 검은색 텍스트 */
    height: 20px !important;
    min-width: 40px !important;
    display: inline-block !important; /* 테이블 내 버튼은 inline-block */
}

.action-buttons button:hover {
    background: #f1f5f9 !important; /* 호버 시 조금 더 진한 파스텔 그레이 */
    color: #111827 !important;
}

/* 페이징 숫자 버튼 스타일 (동그란 원) */
.pagination .page-number {
    padding: 0 !important; /* 동그란 원을 위해 패딩 제거 */
    font-size: 11px !important; /* 폰트 크기 조금 더 작게 */
    width: 22px !important; /* 더 작은 원 */
    height: 22px !important; /* 더 작은 원 */
    border-radius: 50% !important; /* 완전한 원 모양 */
    font-weight: 500 !important; /* 페이징은 조금 더 얇게 */
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important; /* flex로 중앙 정렬 */
    align-items: center !important;
    justify-content: center !important;
    background: #f8fafc !important; /* 연한 파스텔 그레이 */
    color: #111827 !important; /* 검은색 텍스트 */
    border: 1px solid #e2e8f0 !important; /* 연한 테두리 */
    margin: 0 2px !important; /* 버튼 간격 더 좁게 */
    line-height: 1 !important; /* 텍스트 높이 정규화 */
    text-align: center !important; /* 텍스트 중앙 정렬 */
    box-sizing: border-box !important; /* 테두리 포함 크기 계산 */
    min-width: 22px !important; /* 최소 너비 설정 */
}

/* 페이징 네비게이션 버튼 스타일 (이전/다음) */
.pagination .nav-button {
    padding: 4px 12px !important; /* 네비게이션은 좀 더 넓게 */
    font-size: 12px !important;
    height: 22px !important; /* 숫자 버튼과 정확히 같은 높이 */
    border-radius: 6px !important; /* 네비게이션은 둥근 모서리 */
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 50px !important; /* 네비게이션은 최소 너비 */
    background: #f8fafc !important; /* 연한 파스텔 그레이 */
    color: #111827 !important; /* 검은색 텍스트 */
    border: 1px solid #e2e8f0 !important; /* 연한 테두리 */
    margin: 0 3px !important; /* 버튼 간격 */
}

/* 페이징 숫자 버튼 호버 */
.pagination .page-number:hover {
    background: #f1f5f9 !important; /* 호버 시 조금 더 진한 파스텔 그레이 */
    color: #475569 !important;
    border-color: #cbd5e1 !important;
}

/* 페이징 네비게이션 버튼 호버 */
.pagination .nav-button:hover {
    background: #f1f5f9 !important; /* 호버 시 조금 더 진한 파스텔 그레이 */
    color: #475569 !important;
    border-color: #cbd5e1 !important;
}

/* 현재 페이지 (숫자 버튼만) */
.pagination .page-number.active {
    background: #e2e8f0 !important; /* 현재 페이지는 조금 더 진하게 */
    color: #111827 !important;
    border-color: #94a3b8 !important;
    font-weight: 600 !important;
}

/* 검색 영역 컴팩트 스타일 */
.search-compact {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important; /* 스크롤 방지 */
    box-sizing: border-box !important;
    background: #f8fafc !important;
    padding: 20px !important;
    border-radius: 8px !important;
    margin-bottom: 20px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
}

/* 검색 영역 내부 요소들도 너비 제한 */
.search-compact > * {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 검색 필터 컨테이너 */
.search-filter-container {
    display: flex !important;
    gap: 12px !important;
    align-items: center !important; /* 수직 중앙 정렬 */
    flex-wrap: nowrap !important;
}

/* 검색 필터 아이템 */
.search-filter-item {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
}

/* 검색 버튼 래퍼 */
.search-filter-button-wrapper {
    display: flex !important;
    align-items: center !important; /* 수직 중앙 정렬 */
    flex-shrink: 0 !important;
    gap: 8px !important;
    white-space: nowrap !important;
}

/* 검색 필터 라벨 */
.search-filter-label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    letter-spacing: 0.2px !important;
}

/* 검색 필터 입력 필드 */
.search-filter-input,
.search-filter-select {
    /* width: auto !important; - 인라인 스타일의 width를 허용하기 위해 주석 처리 */
    min-width: 120px !important;
    max-width: 100% !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    color: #1e293b !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    flex: 1 1 auto !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.search-filter-input:focus,
.search-filter-select:focus {
    outline: none !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1), 0 2px 4px 0 rgba(0, 0, 0, 0.1) !important;
    background: #ffffff !important;
}

.search-filter-input::placeholder {
    color: #111827 !important;
}

/* 검색 버튼 */
.search-button {
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    background: #6366f1 !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    width: auto !important;
    min-width: auto !important;
}

.search-button:hover {
    background: #4f46e5 !important;
}

.search-button:active {
    background: #4338ca !important;
}

/* 모바일 반응형 - 제거됨 (767px 미만 규칙으로 대체) */

/* 기존 호환성 유지 */
.search-compact .flex {
    gap: 8px !important;
    align-items: center !important;
}

.search-compact .flex-1 {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.search-compact label {
    margin-bottom: 0 !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    min-width: fit-content !important;
}

.search-compact input,
.search-compact select {
    padding: 4px 8px !important;
    font-size: 12px !important;
    height: 24px !important;
    flex: 1 !important;
}

.search-compact button {
    padding: 4px 12px !important;
    font-size: 12px !important;
    height: 24px !important;
}

/* 리스트 페이지 공통 스타일 - style_guide.md 기준 */
.list-page-container {
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 16px !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}

.list-table-container {
    overflow: auto !important;
    max-height: calc(100vh - 300px) !important;
}

.list-table-container table {
    background: #fafafa !important;
    border: 1px solid #d1d5db !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    width: 100% !important;
    border-collapse: collapse !important;
}

.list-table-container th {
    background: #f3f4f6 !important;
    text-align: center !important;
    font-size: 11px !important;
    height: 20px !important;
    padding: 3px 8px !important;
}

.list-table-container td {
    text-align: left !important;
    font-size: 12px !important;
    height: 18px !important;
    padding: 2px 8px !important;
}

/* 테이블 헤더 및 셀 가운데 정렬 */
.list-table-container th.text-center,
th.text-center {
    text-align: center !important;
}

.list-table-container td.text-center,
td.text-center {
    text-align: center !important;
}

.list-table-container tbody tr {
    background: #fafafa !important;
}

.list-table-container tbody tr:nth-child(even) {
    background: #f5f5f5 !important;
}

.list-table-container tbody tr:hover {
    background: #f9fafb !important;
}

.status-badge {
    padding: 2px 6px !important;
    border-radius: 2px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
}

.status-pending {
    background: #dbeafe !important;
    color: #1e40af !important;
}

.status-processing {
    background: #fef3c7 !important;
    color: #92400e !important;
}

.status-completed {
    background: #dcfce7 !important;
    color: #166534 !important;
}

.status-cancelled {
    background: #fee2e2 !important;
    color: #dc2626 !important;
}

.status-api_failed {
    background: #fef3c7 !important;
    color: #92400e !important;
}

.action-buttons button {
    padding: 2px 6px !important;
    font-size: 11px !important;
    height: 20px !important;
    min-width: 40px !important;
    display: inline-block !important;
    padding: 4px 12px !important;
    font-size: 12px !important;
    height: 24px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}

.list-pagination {
    margin-top: 16px !important;
    flex-shrink: 0 !important;
}

.pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
}

.pagination .page-number {
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    font-size: 11px !important;
    margin: 0 2px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 12px !important;
    font-size: 12px !important;
    height: 24px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    text-decoration: none !important;
}

.pagination .nav-button {
    padding: 4px 12px !important;
    font-size: 12px !important;
    height: 22px !important;
    border-radius: 6px !important;
    min-width: 50px !important;
    padding: 4px 12px !important;
    font-size: 12px !important;
    height: 24px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    text-decoration: none !important;
}

.pagination .active {
    background: #e2e8f0 !important;
    color: #111827 !important;
}

/* 모바일에서 메인 콘텐츠 전체 너비 사용 */
@media (max-width: 1023px) {
    .main-content {
        margin-left: 0;
        padding-top: 0; /* 햄버거 메뉴 버튼 제거로 상단 여백 제거 */
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }
}

/* 상단 헤더 패널 위쪽 공간 통일 - 모든 화면 크기에서 패널 간 간격과 동일하게 */
.main-content > div.bg-white.rounded-lg.shadow-sm {
    margin-top: 4px !important; /* 패널 간 간격과 동일 (4px) */
}

/* 모든 미디어쿼리에서 일관된 여백 유지 */
@media (min-width: 1024px) {
    .main-content > div.bg-white.rounded-lg.shadow-sm {
        margin-top: 0px !important; /* 패널 간 간격과 동일 (4px) */
    }
}

@media (max-width: 1023px) {
    .main-content > div.bg-white.rounded-lg.shadow-sm {
        margin-top: 10px !important; /* 패널 간 간격과 동일 (4px) */
    }
}

@media (max-width: 768px) {
    .main-content > div.bg-white.rounded-lg.shadow-sm {
        margin-top: 0px !important; /* 패널 간 간격과 동일 (4px) */
    }
}

.content-header {
    margin-bottom: 30px;
}

.content-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.content-header p {
    color: #111827;
    font-size: 16px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        background: #ffffff !important;
    }
    
    .sidebar.open {
        transform: translateX(0);
        background: #ffffff !important;
    }
    
    .main-content {
        margin-left: 0;
        padding: 10px;
    }
    
    /* 상단 헤더 패널 여백은 위의 미디어쿼리에서 이미 처리됨 */
    .main-content > div.bg-white.rounded-lg.shadow-sm {
        margin-top: 0px !important; /* 패널 간 간격과 동일 (4px) */
    }
    
    .content-header h1 {
        font-size: 24px;
    }
}

/* 폼 스타일 - 얇고 깔끔하게 */
.form-container {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    max-width: 600px !important;
    margin: 0 !important;
}

.form-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
    margin-bottom: 16px !important;
}

.form-field {
    margin-bottom: 16px !important;
}

.form-label {
    display: block !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    margin-bottom: 4px !important;
}

.form-input, .form-select {
    width: 100% !important;
    padding: 6px 8px !important;
    font-size: 12px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 4px !important;
    background: white !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    color: #111827 !important;
}

/* select 요소에 그림자 효과 추가 */
.form-select,
select {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.form-input:focus, .form-select:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1), 0 2px 4px 0 rgba(0, 0, 0, 0.1) !important;
}

.form-input:hover, .form-select:hover {
    border-color: #9ca3af !important;
}

.form-textarea {
    width: 100% !important;
    padding: 6px 8px !important;
    font-size: 12px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 4px !important;
    background: white !important;
    min-height: 60px !important;
    resize: vertical !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    color: #111827 !important;
}

.form-textarea:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
}

.form-textarea:hover {
    border-color: #9ca3af !important;
}

.form-actions {
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 16px !important;
    padding-top: 0 !important;
    border-top: none !important;
}

.form-button {
    padding: 4px 12px !important;
    font-size: 12px !important;
    height: 24px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.2s ease !important;
    min-width: 60px !important;
}

.form-button-primary {
    background: #f1f5f9 !important;
    color: #111827 !important;
    border: 1px solid #e2e8f0 !important;
}

.form-button-primary:hover {
    background: #e2e8f0 !important;
    color: #111827 !important;
}

.form-button-secondary {
    background: #f1f5f9 !important;
    color: #111827 !important;
    border: 1px solid #e2e8f0 !important;
}

.form-button-secondary:hover {
    background: #e2e8f0 !important;
    color: #111827 !important;
}

/* 폼 섹션 스타일 - 퀵접수와 동일한 카드 스타일 */
.form-section {
    background: white !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin-bottom: 0 !important;
    position: relative !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
    height: fit-content !important;
}

.form-section::before {
    display: none !important;
}

.form-section-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    margin-bottom: 16px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #e5e7eb !important;
    letter-spacing: -0.025em !important;
}

/* 필수 필드 표시 */
.form-label.required::after {
    content: ' *' !important;
    color: #ef4444 !important;
    font-weight: 700 !important;
}

/* 입력 필드 그룹 */
.input-group {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.input-group .form-input {
    flex: 1 !important;
}

.input-group .input-suffix {
    font-size: 12px !important;
    color: #111827 !important;
    font-weight: 400 !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    margin-left: 8px !important;
}

/* 플레이스홀더 스타일 */
.form-input::placeholder, .form-select::placeholder, .form-textarea::placeholder {
    color: #111827 !important;
    font-weight: 400 !important;
}

/* 선택 옵션 스타일 */
.form-select option {
    padding: 8px !important;
    background: white !important;
    color: #111827 !important;
}

/* 드래그 가능한 테이블 헤더 */
.draggable-header {
    background: #f3f4f6 !important;
    text-align: center !important;
    font-size: 11px !important;
    height: 20px !important;
    padding: 3px 8px !important;
    cursor: move !important;
    user-select: none !important;
    position: relative !important;
}

.drag-handle {
    position: absolute !important;
    right: 2px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 10px !important;
    color: #111827 !important;
}

/* 계층 구조 스타일 */
.hierarchy-container {
    background: #fafafa !important;
    border: 1px solid #d1d5db !important;
    border-radius: 4px !important;
    padding: 16px !important;
}

.hierarchy-item {
    margin-bottom: 8px !important;
}

.hierarchy-item[data-level="1"] {
    margin-bottom: 6px !important;
}

.hierarchy-item[data-level="2"] {
    margin-bottom: 4px !important;
}

.hierarchy-node {
    display: flex !important;
    align-items: center !important;
    padding: 8px !important;
    background: #f3f4f6 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 4px !important;
    cursor: pointer !important;
}

.hierarchy-node[data-level="1"] {
    padding: 6px !important;
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
}

.hierarchy-node[data-level="2"] {
    padding: 4px !important;
    background: white !important;
    border: 1px solid #f3f4f6 !important;
    cursor: default !important;
}

.toggle-icon {
    margin-right: 8px !important;
    font-size: 12px !important;
    color: #111827 !important;
}

.toggle-icon[data-level="2"] {
    color: #111827 !important;
}

.hierarchy-title {
    font-weight: 600 !important;
    color: #111827 !important;
}

.hierarchy-title[data-level="1"] {
    font-weight: 500 !important;
    color: #111827 !important;
}

.hierarchy-title[data-level="2"] {
    color: #111827 !important;
}

.hierarchy-code {
    margin-left: auto !important;
    font-size: 11px !important;
    color: #111827 !important;
}

.hierarchy-code[data-level="2"] {
    color: #111827 !important;
}

.hierarchy-children {
    margin-left: 20px !important;
    margin-top: 8px !important;
}

.hierarchy-children[data-level="1"] {
    margin-top: 6px !important;
}

.hierarchy-children[data-level="2"] {
    margin-top: 4px !important;
}

/* 트리 구조 스타일 */
.tree-container {
    background: white !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 20px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.tree-node {
    position: relative !important;
    margin: 4px 0 !important;
}

.tree-node-content {
    display: flex !important;
    align-items: center !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: 1px solid transparent !important;
}

.tree-node-content:hover {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

.tree-node-content.expanded {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

.tree-toggle {
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 8px !important;
    border-radius: 4px !important;
    background: #f1f5f9 !important;
    color: #111827 !important;
    font-size: 12px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.tree-toggle:hover {
    background: #e2e8f0 !important;
    color: #111827 !important;
}

.tree-toggle.expanded {
    background: #3b82f6 !important;
    color: white !important;
}

.tree-icon {
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 8px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
}

.tree-icon.level-0 {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    color: white !important;
}

.tree-icon.level-1 {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
}

.tree-icon.level-2 {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: white !important;
}

.tree-label {
    flex: 1 !important;
    font-weight: 500 !important;
    color: #111827 !important;
}

.tree-label.level-0 {
    font-weight: 600 !important;
    font-size: 14px !important;
}

.tree-label.level-1 {
    font-weight: 500 !important;
    font-size: 13px !important;
}

.tree-label.level-2 {
    font-weight: 400 !important;
    font-size: 12px !important;
    color: #111827 !important;
}

.tree-code {
    background: #f3f4f6 !important;
    color: #111827 !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    margin-left: 8px !important;
}

.tree-children {
    margin-left: 32px !important;
    position: relative !important;
}

.tree-children::before {
    content: '' !important;
    position: absolute !important;
    left: -16px !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 1px !important;
    background: #e5e7eb !important;
}

.tree-children .tree-node::before {
    content: '' !important;
    position: absolute !important;
    left: -16px !important;
    top: 20px !important;
    width: 12px !important;
    height: 1px !important;
    background: #e5e7eb !important;
}

.tree-children .tree-node:last-child::after {
    content: '' !important;
    position: absolute !important;
    left: -16px !important;
    top: 20px !important;
    bottom: 0 !important;
    width: 1px !important;
    background: white !important;
}

/* Items Management Styles */
.items-management-container {
    max-width: 1200px;
    margin: 0;
    padding: 0rem;
}

.items-sections-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* 반응형 대응 */
@media (max-width: 1024px) {
    .items-sections-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .items-management-container {
        padding: 0rem;
    }
}

@media (max-width: 768px) {
    .items-management-container {
        padding: 0rem;
    }
    
    .items-section {
        padding: 0.75rem;
    }
    
    .billing-items-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .fee-items-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .billing-items-list {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .select-all-controls {
        align-self: flex-end;
    }
}

.items-section {
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    padding: 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.select-all-controls {
    display: flex;
    gap: 0.5rem;
}

.select-all-btn, .deselect-all-btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #111827;
    cursor: pointer;
    transition: all 0.2s;
}

.select-all-btn:hover, .deselect-all-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.select-all-btn:active, .deselect-all-btn:active {
    background: #e5e7eb;
}

/* Fee Items List */
.fee-items-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
}

.fee-item-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 3px;
    background: #f9fafb;
    font-size: 0.75rem;
}

.fee-checkbox {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    min-width: 60px;
}

.fee-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #6b7280;
}

.fee-checkbox .item-label {
    font-size: 0.7rem;
    color: #111827;
    white-space: nowrap;
}

.fee-input-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
}

.fee-input {
    width: 60px;
    padding: 0.125rem 0.25rem;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    font-size: 0.7rem;
    text-align: right;
}

.fee-input:focus {
    outline: none;
    border-color: #6b7280;
    box-shadow: 0 0 0 1px rgba(107, 114, 128, 0.1);
}

.currency-suffix {
    font-size: 0.7rem;
    color: #111827;
    font-weight: 500;
    min-width: 15px;
}

/* 금액 입력 필드 공통 스타일 */
.currency-input {
    text-align: right !important;
}

.currency-input::placeholder {
    text-align: right !important;
}

.fee-dropdown {
    padding: 0.125rem 0.25rem;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    font-size: 0.7rem;
    background: white;
    min-width: 50px;
}

.fee-dropdown:focus {
    outline: none;
    border-color: #6b7280;
    box-shadow: 0 0 0 1px rgba(107, 114, 128, 0.1);
}

/* Billing Items List */
.billing-items-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
}

.billing-checkbox {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 3px;
    background: #f9fafb;
    transition: background-color 0.2s;
    font-size: 0.7rem;
}

.billing-checkbox:hover {
    background: #f3f4f6;
}

.billing-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #6b7280;
}

.billing-checkbox .item-label {
    font-size: 0.7rem;
    color: #111827;
    white-space: nowrap;
}

/* Items Actions */
.items-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.save-button {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    color: #111827;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.save-button:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.save-button:active {
    background: #cbd5e1;
}

/* 배송수단 선택 스타일 */
.vehicle-option {
    cursor: pointer;
}

.vehicle-option input[type="radio"]:checked + .vehicle-card {
    border-color: #3b82f6;
    background-color: #eff6ff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.vehicle-option input[type="radio"]:checked + .vehicle-card img {
    transform: scale(1.05);
}

/* 레이어팝업 공통 스타일 - 상단 위치 고정 */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 9999 !important;
    display: none !important; /* 기본값은 숨김 */
    align-items: flex-start !important; /* 상단 정렬 */
    justify-content: center !important;
    padding-top: 50px !important; /* 상단에서 50px 고정 */
    overflow-y: auto !important;
}

/* 레이어팝업이 열릴 때 (JavaScript에서 클래스 추가 또는 display: flex !important 사용) */
.modal-overlay.show,
.modal-overlay[style*="display: flex"],
.modal-overlay[style*="display:flex"] {
    display: flex !important;
}

/* Tailwind 클래스로 만든 레이어팝업도 동일하게 적용 */
.fixed.inset-0.bg-black.bg-opacity-50,
div[id$="Modal"].fixed.inset-0,
div[class*="fixed"][class*="inset-0"][class*="items-center"][class*="justify-center"] {
    align-items: flex-start !important;
    padding-top: 50px !important;
    padding-bottom: 20px !important; /* 하단 여백 추가 */
    backdrop-filter: blur(4px) !important; /* 사이드바 및 배경 blur 처리 */
    -webkit-backdrop-filter: blur(4px) !important; /* Safari 지원 */
}

/* ============================================
   반응형 디자인 - 전역 스타일
   ============================================ */

/* 주문접수 페이지 반응형 */
@media (max-width: 1023px) {
    /* 주문접수 페이지 레이아웃 */
    .bg-gradient-to-br.from-blue-50.to-indigo-100 .w-full.flex {
        flex-direction: column !important;
        gap: 16px !important;
    }
    
    .bg-gradient-to-br.from-blue-50.to-indigo-100 .w-64 {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .bg-gradient-to-br.from-blue-50.to-indigo-100 .sticky {
        position: relative !important;
        top: 0 !important;
    }
}

/* 폼 그리드 반응형 */
@media (max-width: 768px) {
    /* 공통 폼의 그리드 레이아웃 */
    .grid.grid-cols-2,
    .grid.grid-cols-3,
    .grid.md\\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
    
    /* 폼 섹션 패딩 조정 */
    .form-section {
        padding: 16px !important;
    }
    
    /* 폼 그리드 간격 조정 */
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
}

/* 테이블 반응형 */
@media (max-width: 1023px) {
    /* 모든 테이블 컨테이너 */
    .list-table-container,
    .overflow-x-auto {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* 테이블 최소 너비 설정 */
    .list-table-container table,
    .overflow-x-auto table {
        min-width: 800px !important;
    }
    
    /* 테이블 셀 패딩 조정 */
    .list-table-container th,
    .list-table-container td,
    .overflow-x-auto th,
    .overflow-x-auto td {
        padding: 8px 12px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
    }
}

/* 검색 필터 반응형 - 768px 미만: 모든 요소 한 줄에 배치, 라벨 제거 */
@media (max-width: 767px) {
    /* 검색 필터 컨테이너 - 한 줄에 모든 요소 배치 */
    .search-filter-container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
        align-items: center !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* 검색 필터 라벨 제거 */
    .search-filter-label {
        display: none !important;
    }
    
    /* 검색 필터 아이템 - 한 줄에 배치 */
    .search-filter-item {
        display: flex !important;
        flex-direction: row !important;
        flex: 0 0 auto !important;
        min-width: 0 !important;
        max-width: none !important;
        align-items: center !important;
        gap: 0 !important;
    }
    
    /* 검색 필터 입력 필드 - 라벨 제거 후 크기 조정 */
    .search-filter-item .search-filter-select,
    .search-filter-item .search-filter-input,
    .search-filter-select,
    .search-filter-input {
        min-width: 70px !important;
        max-width: 120px !important;
        width: auto !important;
        padding: 6px 8px !important;
        font-size: 11px !important;
        flex: 0 0 auto !important;
    }
    
    /* 검색 버튼 래퍼 - 같은 줄에 배치 */
    .search-filter-button-wrapper {
        flex-shrink: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        gap: 6px !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }
    
    /* 검색 버튼 - 같은 줄에 배치 */
    .search-filter-button-wrapper .search-button {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        padding: 6px 10px !important;
        font-size: 11px !important;
        min-width: auto !important;
        width: auto !important;
    }
    
    /* 검색 영역 패딩 조정 */
    .search-compact {
        padding: 12px !important;
        overflow: hidden !important; /* 스크롤 방지 */
    }
}

/* 리스트 페이지 컨테이너 반응형 */
@media (max-width: 1023px) {
    .list-page-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* 검색 필터 컨테이너 반응형 - 768px 이상은 한 줄 유지 */
    .search-filter-container {
        flex-wrap: nowrap !important;
        gap: 12px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .search-filter-item {
        min-width: 0 !important;
        flex: 1 1 auto !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .search-filter-select,
    .search-filter-input {
        max-width: 100% !important;
        box-sizing: border-box !important;
        min-width: 100px !important;
    }
    
    /* 검색 버튼 그룹 - 같은 줄에 배치 */
    .search-filter-button-wrapper {
        flex-shrink: 0 !important;
        display: flex !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
    }
    
    .search-filter-button-wrapper .search-button {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        min-width: fit-content !important;
    }
    
    /* 검색 결과 정보 영역 */
    .list-page-container .mb-4.px-4 {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* 검색 결과 정보 내부 flex 레이아웃 */
    .list-page-container .flex.items-center.justify-between {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    
    /* 버튼 그룹 */
    .list-page-container .flex.gap-2 {
        width: 100% !important;
        flex-wrap: wrap !important;
    }
    
    .list-page-container .flex.gap-2 button {
        flex: 1 1 auto !important;
        min-width: 120px !important;
    }
}

/* 주문접수 폼 - 패널 간 간격 및 상단 여백 */
/* 모든 화면 크기에서 패널 간 간격 통일 */
.order-form .mb-1,
form .mb-1,
.order-form > div.mb-1,
form > div.mb-1 {
    margin-bottom: 4px !important; /* mb-1 = 4px */
}

/* 상단 패널 위쪽 여백 - 패널 간 간격과 동일하게 */
.order-form .mb-1:first-child,
form .mb-1:first-child,
.order-form > div.mb-1:first-child,
form > div.mb-1:first-child {
    margin-top: 4px !important; /* 패널 간 간격과 동일 */
}

@media (min-width: 760px) {
    /* 760px 이상: 추가 스타일 없음 (위의 기본 스타일 적용) */
}

/* 주문접수 폼 섹션 반응형 */
@media (max-width: 759px) {
    /* 패널 간 간격은 기본 스타일에서 이미 처리됨 */
    
    /* 주문자 정보 섹션 */
    section.bg-blue-50,
    section.bg-gray-50 {
        padding: 12px !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* 패널 내부 요소들이 패널 밖으로 나가지 않도록 */
    section.bg-blue-50 > *,
    section.bg-gray-50 > * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* 섹션 제목 */
    section h2 {
        font-size: 13px !important;
        margin-bottom: 12px !important;
    }
    
    /* 입력 필드 그룹 */
    section .grid.grid-cols-2 {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    /* 상단 버튼 그룹 (최근접수내역, 즐겨찾기) */
    section .flex.items-center.justify-between {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    
    section .flex.items-center.justify-between > div:last-child {
        flex: 1 1 100% !important;
        display: flex !important;
        gap: 8px !important;
        margin-top: 4px !important;
    }
    
    section .flex.items-center.justify-between > div:last-child button {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        white-space: nowrap !important;
        font-size: 11px !important;
        padding: 6px 8px !important;
    }
    
    /* 주소 검색 버튼과 입력 필드 */
    section .flex.space-x-2:has(button) {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        min-width: 0 !important;
    }
    
    section .flex.space-x-2:has(button) input {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    
    section .flex.space-x-2:has(button) button {
        flex-shrink: 0 !important;
        min-width: fit-content !important;
        white-space: nowrap !important;
        font-size: 12px !important;
        padding: 8px 12px !important;
    }
}

/* 작은 모바일 (480px 이하) */
@media (max-width: 480px) {
    /* 폰트 크기 조정 */
    .list-page-container,
    .form-section,
    section {
        font-size: 12px !important;
    }
    
    /* 입력 필드 */
    input[type="text"],
    input[type="tel"],
    input[type="email"],
    textarea,
    select {
        font-size: 14px !important;
        padding: 8px 10px !important;
    }
    
    /* 버튼 */
    button {
        font-size: 13px !important;
        padding: 8px 12px !important;
    }
    
    /* 상단 버튼 그룹 (최근접수내역, 즐겨찾기) - 작은 화면 */
    section .flex.items-center.justify-between > div:last-child button {
        font-size: 10px !important;
        padding: 5px 6px !important;
    }
    
    /* 주소 검색 버튼 - 작은 화면 */
    section .flex.space-x-2:has(button) button {
        font-size: 11px !important;
        padding: 6px 10px !important;
    }
    
    /* 테이블 */
    table {
        font-size: 11px !important;
    }
    
    th, td {
        padding: 6px 8px !important;
    }
}

/* 페이지네이션 반응형 */
@media (max-width: 768px) {
    .list-pagination,
    .pagination {
        flex-wrap: wrap !important;
        gap: 4px !important;
        justify-content: center !important;
    }
    
    .page-number,
    .nav-button {
        min-width: 32px !important;
        height: 32px !important;
        font-size: 12px !important;
        padding: 4px 8px !important;
    }
}

/* 메일룸 운송장 바코드 입력 필드 - 패널 범위 초과 방지 */
.bg-yellow-50 section,
section.bg-yellow-50 {
    overflow: hidden !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.bg-yellow-50 section > div,
section.bg-yellow-50 > div {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

#tracking_barcode {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* 작은 화면에서 바코드 입력 필드 레이아웃 조정 */
@media (max-width: 640px) {
    .bg-yellow-50 section > div.flex,
    section.bg-yellow-50 > div.flex {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    #tracking_barcode {
        width: 100% !important;
        max-width: 100% !important;
    }
}
