/* 전역 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
    font-size: 12px;
    color: #333;
    background-color: #f5f5f5;
}

/* 헤더 */
header {
    background: linear-gradient(to right, #4a4a4a, #2d2d2d);
    color: white;
    padding: 16px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.header-left {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.header-title {
    color: #ffd700;
    font-weight: bold;
    font-size: 20px;
    letter-spacing: 3px;
}

.header-subtitle {
    color: white;
    font-size: 13px;
    margin-left: -10px;
}

.header-date {
    color: #ffd700;
    font-size: 13px;
    margin-left: 4px;
    font-weight: 500;
}

.header-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.login-info {
    color: #ffd700;
    font-size: 12px;
    font-weight: 500;
    margin-right: 10px;
    padding-right: 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.header-menu-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.header-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-menu-btn.logout {
    background-color: #c41e3a;
    border-color: #c41e3a;
}

.header-menu-btn.logout:hover {
    background-color: #a01829;
    border-color: #a01829;
}

.header-right a {
    color: #6cb4e8;
    text-decoration: none;
    font-size: 11px;
}

.header-right a:hover {
    text-decoration: underline;
}

.logout-btn {
    background-color: #c41e3a;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    font-weight: bold;
}

.logout-btn:hover {
    background-color: #a01829;
}

/* 컨테이너 */
.container {
    display: flex;
    height: calc(100vh - 80px);
}

/* 사이드바 */
.sidebar {
    width: 80px;
    background-color: #3a3a3a;
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 5px;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid #555;
    font-size: 11px;
    text-align: center;
    line-height: 1.4;
    transition: background-color 0.3s;
}

.nav-item:hover {
    background-color: #4a4a4a;
}

.nav-item.active {
    background-color: #ff6600;
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 5px;
}

/* 메인 컨텐츠 */
.main-content {
    flex: 1;
    background-color: #f5f5f5;
    overflow-y: auto;
    padding: 15px;
}

/* 콘텐츠 프레임 */
.content-frame {
    background-color: white;
    border: 1px solid #ddd;
    margin-top: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* 프레임 헤더 */
.frame-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 15px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #ddd;
}

.frame-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.frame-header h2 {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.help-link {
    background: none;
    border: none;
    color: #5a8db8;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: color 0.2s;
}

.help-link:hover {
    color: #4a7da8;
    text-decoration: underline;
}

.detail-view-btn {
    background: linear-gradient(to bottom, #ff8c42, #ff6b1a);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(255, 107, 26, 0.3);
}

.detail-view-btn:hover {
    background: linear-gradient(to bottom, #ff9d5c, #ff7b2a);
    box-shadow: 0 3px 6px rgba(255, 107, 26, 0.4);
}

.detail-view-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(255, 107, 26, 0.3);
}

.checkbox-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 10px;
    color: #333;
    font-weight: bold;
}

.total-count {
    color: #666;
    font-size: 12px;
}

/* 상위 탭 네비게이션 */
.main-tabs {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 0;
    border-bottom: 3px solid #e0e0e0;
    background-color: #f5f5f5;
    padding: 5px 10px 0 10px;
}

.tabs-left {
    display: flex;
    gap: 3px;
}

.tabs-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.search-box {
    display: flex;
    align-items: center;
    position: relative;
}

.member-search-input {
    padding: 6px 35px 6px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 11px;
    width: 150px;
    background-color: white;
}

.member-search-input::placeholder {
    color: #999;
}

.search-icon-btn {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    color: #666;
}

.search-icon-btn:hover {
    color: #333;
}

.favorite-btn {
    padding: 6px 16px;
    background-color: #ffd700;
    color: #333;
    border: 1px solid #e6c200;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
}

.favorite-btn:hover {
    background-color: #ffed4e;
}

.main-tab {
    padding: 10px 20px;
    background-color: #e8e8e8;
    border: 1px solid #ccc;
    border-bottom: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    color: #555;
    transition: all 0.3s;
    border-radius: 5px 5px 0 0;
    position: relative;
}

.main-tab:hover {
    background-color: #d8d8d8;
}

.main-tab.active {
    background-color: white;
    color: #2c3e50;
    border-bottom: 3px solid white;
    margin-bottom: -3px;
    position: relative;
    z-index: 1;
    font-weight: bold;
    border-top: 3px solid #5a8db8;
    border-left: 2px solid #5a8db8;
    border-right: 2px solid #5a8db8;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.15);
}

/* 하위 탭 네비게이션 */
.sub-tabs {
    display: flex;
    gap: 3px;
    margin-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    padding: 10px 10px 5px 10px;
    background-color: #fafafa;
    flex-wrap: wrap;
}

.sub-tab {
    padding: 8px 15px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: none;
    cursor: pointer;
    font-size: 12px;
    color: #333;
    transition: all 0.3s;
    border-radius: 3px 3px 0 0;
    position: relative;
    font-weight: 500;
}

.sub-tab:hover {
    background-color: #e8e8e8;
    color: #222;
}

.sub-tab.active {
    background-color: white;
    color: #2c3e50;
    font-weight: bold;
    border-top: 3px solid #ff6600;
    border-left: 2px solid #ff6600;
    border-right: 2px solid #ff6600;
    box-shadow: 0 -1px 4px rgba(255, 102, 0, 0.2);
    z-index: 1;
}

/* 필터 섹션 */
.filter-section {
    background-color: #fafafa;
    border-bottom: 1px solid #ddd;
    padding: 15px;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-weight: bold;
    font-size: 12px;
    min-width: 80px;
    color: #333;
}

.checkbox-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    cursor: pointer;
    color: #555;
}

.checkbox-group input[type="radio"],
.checkbox-group input[type="checkbox"] {
    cursor: pointer;
}

.filter-select {
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
    background-color: white;
}

.calendar-btn {
    padding: 5px 10px;
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.calendar-btn:hover {
    background-color: #e8e8e8;
}

.filter-info {
    color: #666;
    font-size: 11px;
}

.filter-input {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
    width: 200px;
}

.page-size-select {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
    margin: 0 5px;
}

.action-btn {
    padding: 5px 15px;
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.action-btn:hover {
    background-color: #e8e8e8;
}

.action-select {
    padding: 5px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
}

/* 데이터 테이블 래퍼 */
.data-table-wrapper {
    overflow-x: auto;
}

.search-btn {
    padding: 5px 20px;
    background-color: #5e8fba;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.search-btn:hover {
    background-color: #4a7699;
}

/* 테이블 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.data-table thead {
    background-color: #607d8b;
    color: white;
}

.data-table th {
    padding: 10px 8px;
    text-align: center;
    font-weight: normal;
    border-right: 1px solid #78909c;
    white-space: nowrap;
}

.data-table th:last-child {
    border-right: none;
}

.data-table tbody td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    white-space: nowrap;
}

.data-table tbody td:last-child {
    border-right: none;
}

.data-table tbody .no-data {
    padding: 180px 20px;
    text-align: center;
    color: #666;
    background-color: #fafafa;
}

/* 회원명 링크 스타일 */
.member-link {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}

.member-link:hover {
    color: #1565c0;
    text-decoration: underline;
}

/* 검색요약 섹션 */
.summary-section {
    display: flex;
    align-items: stretch;
    border: 1px solid #ddd;
    margin-bottom: 8px;
    background-color: white;
    font-size: 13px;
}

.summary-label {
    background-color: #e8e8e8;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #2c3e50;
    border-right: 1px solid #ddd;
    min-width: 80px;
    font-size: 13px;
}

.summary-content {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 8px 12px;
    gap: 3px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 10px;
    border-right: 1px solid #e0e0e0;
}

.summary-item:last-child {
    border-right: none;
}

.item-label {
    color: #555;
    font-weight: 500;
    white-space: nowrap;
    font-size: 13px;
}

.item-value {
    color: #2c3e50;
    font-weight: bold;
    white-space: nowrap;
    font-size: 13px;
}

.item-value.red {
    color: #e53935;
    font-weight: bold;
}

.item-value.blue {
    color: #1e88e5;
    font-weight: bold;
}

/* 검색조건 섹션 */
.search-condition-section {
    display: flex;
    align-items: stretch;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    background-color: white;
    font-size: 13px;
}

.condition-label-box {
    background-color: #e8e8e8;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #333;
    border-right: 1px solid #ddd;
    min-width: 80px;
    font-size: 13px;
}

.condition-content {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 8px 12px;
    gap: 6px;
}

.filter-tag {
    padding: 4px 10px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-tag:hover {
    background-color: #f0f0f0;
}

.filter-tag.active {
    background-color: white;
}

.filter-tag.status {
    background-color: #fff9e6;
    border-color: #e6d68a;
}

.search-select {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    background-color: white;
    min-width: 100px;
}

.search-select-wide {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    background-color: white;
    min-width: 200px;
}

.search-input {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    flex: 1;
    max-width: 250px;
}

.search-submit-btn {
    padding: 5px 20px;
    background-color: #5a8db8;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
}

.search-submit-btn:hover {
    background-color: #4a7da8;
}

.right-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.control-select {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    background-color: white;
    min-width: 80px;
}

.control-btn {
    padding: 4px 12px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
}

.control-btn:hover {
    background-color: #f0f0f0;
}

/* 일괄변경 메뉴 버튼 */
.batch-menu-btn {
    padding: 8px 16px;
    background-color: white;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.batch-menu-btn:hover {
    background-color: #f8f8f8;
    border-color: #5a8db8;
    color: #5a8db8;
}

.batch-menu-btn.active {
    background: linear-gradient(135deg, #5a8db8 0%, #4a7a9e 100%);
    border-color: #5a8db8;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(90, 141, 184, 0.3);
}

.batch-menu-btn.active:hover {
    background: linear-gradient(135deg, #4a7a9e 0%, #3a6a8e 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(90, 141, 184, 0.4);
}

.frame-header-right {
    display: flex;
    align-items: center;
    gap: 0;
}

/* 모달 스타일 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideUp 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.modal-footer button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-footer button:first-child:hover {
    background: #f8f9fa;
    border-color: #999;
}



/* 결제분석 섹션 */
.payment-analysis {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 8px 12px;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    margin-bottom: 8px;
    font-size: 11px;
}

.analysis-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 8px;
    border-right: 1px solid #ddd;
}

.analysis-item:last-child {
    border-right: none;
}

.analysis-label {
    color: #333;
    font-weight: normal;
}

.analysis-value {
    color: #333;
    font-weight: normal;
}

.analysis-value.red {
    color: #d32f2f;
    font-weight: bold;
}

.analysis-value.blue {
    color: #1976d2;
    font-weight: bold;
}

/* 검색조건 섹션 */
.search-condition {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.condition-row {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.condition-row:last-child {
    margin-bottom: 0;
}

.condition-label {
    min-width: 60px;
    font-size: 11px;
    color: #333;
    font-weight: normal;
}

.condition-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.radio-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 11px;
    color: #333;
}

.radio-inline input[type="radio"] {
    margin: 0;
}

.radio-inline span {
    white-space: nowrap;
}

.condition-select {
    padding: 3px 6px;
    border: 1px solid #ccc;
    border-radius: 2px;
    font-size: 11px;
    background-color: white;
    min-width: 90px;
}

.condition-select-small {
    padding: 3px 6px;
    border: 1px solid #ccc;
    border-radius: 2px;
    font-size: 11px;
    background-color: white;
    min-width: 60px;
}

.condition-input {
    padding: 3px 8px;
    border: 1px solid #ccc;
    border-radius: 2px;
    font-size: 11px;
    flex: 1;
    max-width: 250px;
}

.condition-input-small {
    padding: 3px 8px;
    border: 1px solid #ccc;
    border-radius: 2px;
    font-size: 11px;
    width: 100px;
    text-align: center;
}

.condition-search-btn {
    padding: 4px 16px;
    background-color: #5a8db8;
    color: white;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
}

.condition-search-btn:hover {
    background-color: #4a7da8;
}

/* 청구납입내역 - 년도 선택기 */
.year-selector-label {
    font-weight: 500;
    color: #333;
    margin-right: 5px;
}

.year-selector {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    background-color: white;
    min-width: 80px;
    cursor: pointer;
}

.month-nav-btn {
    padding: 5px 12px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    margin-left: 5px;
}

.month-nav-btn:hover {
    background-color: #f0f0f0;
}

.excel-btn {
    background-color: #28a745 !important;
    color: white !important;
}

.excel-btn:hover {
    background-color: #218838 !important;
}

/* 월별 데이터 테이블 */
.monthly-table-wrapper {
    margin-top: 12px;
    overflow-x: auto;
}

.monthly-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background-color: white;
    border: 1px solid #ddd;
}

.monthly-data-table thead {
    background: linear-gradient(to bottom, #546e7a, #607d8b);
    color: white;
}

.monthly-data-table th {
    padding: 12px 10px;
    text-align: center;
    font-weight: 600;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.monthly-data-table th:last-child {
    border-right: none;
}

.monthly-data-table tbody td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    border-right: 1px solid #f0f0f0;
    background-color: white;
}

.monthly-data-table tbody td:last-child {
    border-right: none;
}

.monthly-data-table tbody tr:hover td {
    background-color: #f8f9fa;
}

.monthly-data-table .category-col {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

.monthly-data-table .total-col {
    background-color: #f0f0f0;
    font-weight: 600;
    color: #2c3e50;
}

/* 차트 컨테이너 */
.chart-container {
    margin-top: 20px;
    padding: 20px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    height: 400px;
}

/* 푸터 */
footer {
    background-color: #3a3a3a;
    color: white;
    padding: 10px 30px 10px 95px;
    font-size: 11px;
}

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

.footer-left {
    display: flex;
    align-items: center;
    color: #ffd700;
    font-size: 11px;
}

.footer-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-right span {
    color: #ccc;
    font-size: 10px;
}

/* 반응형 */
@media (max-width: 1024px) {
    .sidebar {
        width: 70px;
    }
    
    .nav-item {
        font-size: 10px;
        padding: 12px 3px;
    }
    
    .nav-icon {
        font-size: 18px;
    }
    
    footer {
        padding-left: 85px;
        padding-right: 25px;
    }
    
    .footer-left {
        font-size: 10px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
    }
    
    .sidebar-nav {
        flex-direction: row;
    }
    
    footer {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .header-left,
    .header-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .main-tabs {
        overflow-x: auto;
    }
    
    .sub-tabs {
        overflow-x: auto;
    }
    
    .search-row,
    .filter-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .footer-left {
        font-size: 9px;
    }
}
