/* ==========================================
   기본 공통 스타일
========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================
   1. 로그인 페이지 전용 (login.html)
========================================== */
body.login-page {
    background-color: #f4f6f9;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 400px;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.login-card .logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 24px;
}

.login-card h2 { font-size: 1.25rem; color: #333333; margin-bottom: 8px; font-weight: 600; }
.login-card p { font-size: 0.9rem; color: #777777; margin-bottom: 32px; }

.input-group { position: relative; margin-bottom: 20px; }
.input-group input {
    width: 100%; padding: 14px 16px; font-size: 1rem; border: 1px solid #e1e5eb;
    border-radius: 8px; outline: none; transition: all 0.3s ease; background-color: #fafbfa;
}
.input-group input:focus {
    border-color: #0056b3; background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.login-card button {
    width: 100%; padding: 14px; font-size: 1rem; font-weight: 600; color: #ffffff;
    background-color: #0056b3; border: none; border-radius: 8px; cursor: pointer; transition: background-color 0.3s ease;
}
.login-card button:hover { background-color: #004494; }

/* ==========================================
   2. 대시보드 공통 레이아웃 (home.html, sales.html)
========================================== */
body.dashboard-page {
    background-color: #f4f6f9;
    display: flex;
    min-height: 100vh;
    color: #333;
}

/* 사이드바 */
.sidebar { width: 250px; background-color: #ffffff; box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05); padding: 20px 0; }
.logo-container { text-align: center; margin-bottom: 40px; }
.logo { max-width: 100px; }
.nav-menu { list-style: none; width: 100%; }
.nav-menu li { width: 100%; }
.nav-menu a { display: block; padding: 15px 25px; color: #777777; text-decoration: none; font-weight: 500; transition: all 0.3s ease; }
.nav-menu a:hover, .nav-menu a.active { background-color: rgba(0, 86, 179, 0.05); color: #0056b3; border-left: 4px solid #0056b3; }

.submenu { list-style: none; background-color: #f8f9fa; display: block; }
.submenu a { padding: 12px 25px 12px 40px; font-size: 0.9rem; border-left: none; }
.submenu a.sub-active { color: #0056b3; font-weight: bold; }

/* 메인 콘텐츠 헤더 */
.main-content { flex: 1; padding: 40px; overflow-y: auto; }
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.header h1 { font-size: 1.5rem; color: #333; }

/* 공통 버튼 */
.logout-btn, .btn-cancel {
    padding: 10px 20px; background-color: #e1e5eb; color: #333; text-decoration: none;
    border: none; border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: background 0.3s;
}
.logout-btn:hover, .btn-cancel:hover { background-color: #d1d5db; }
.btn-submit { background: #0056b3; color: white; border: none; padding: 10px 15px; border-radius: 6px; cursor: pointer; font-weight: bold; }
.btn-add { background: #0056b3; color: white; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-weight: bold; }

/* ==========================================
   3. 메인 대시보드 전용 (home.html)
========================================== */
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 30px; }
.card { background: #ffffff; padding: 25px; border-radius: 16px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03); }
.card h3 { font-size: 1rem; color: #777; margin-bottom: 10px; }
.card .amount { font-size: 1.8rem; font-weight: 700; color: #333; }
.amount.income { color: #28a745; }
.amount.expense { color: #dc3545; }
.amount.net { color: #0056b3; }
.chart-container { background: #ffffff; padding: 25px; border-radius: 16px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03); height: 400px; }

/* ==========================================
   4. 테이블 및 팝업 모달 전용 (sales.html)
========================================== */
.data-card { background: #ffffff; padding: 25px; border-radius: 16px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03); }
.table-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px; text-align: left; border-bottom: 1px solid #e1e5eb; }
th { color: #777; font-weight: 600; }
.action-btn { padding: 6px 12px; border: none; border-radius: 4px; cursor: pointer; font-size: 0.85rem; margin-right: 5px; }
.btn-edit { background: #ffc107; color: #333; }
.btn-del { background: #dc3545; color: white; text-decoration: none; }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); justify-content: center; align-items: center; }
.modal-content { background: white; padding: 30px; border-radius: 12px; width: 400px; }
.modal-content h3 { margin-bottom: 20px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; color: #555; }
.form-group input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ==========================================
   5. 검색 필터 및 차트 영역 (sales.html 추가 기능)
========================================== */
.filter-bar {
    background: #ffffff; padding: 20px; border-radius: 16px; 
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03); margin-bottom: 20px; 
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px;
}
.filter-inputs { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; }
.filter-group { display: flex; align-items: center; gap: 10px; }
.filter-group input { padding: 10px; border: 1px solid #ddd; border-radius: 6px; outline: none; }
.btn-action { background: #6c757d; color: white; border: none; padding: 10px 15px; border-radius: 6px; cursor: pointer; font-weight: bold; }
.btn-action:hover { background: #5a6268; }
.btn-download { background: #28a745; color: white; border: none; padding: 10px 15px; border-radius: 6px; cursor: pointer; font-weight: bold; }
.btn-download:hover { background: #218838; }

.chart-wrapper {
    background: #ffffff; padding: 25px; border-radius: 16px; 
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03); margin-bottom: 20px; 
    height: 350px; display: none; /* 초기에는 숨겨둠 */
}

