/* static/style.css (브랜딩 2차 수정본) */

/* 1. 전체 페이지 기본 설정 */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: #FAF8F5; 
    color: #3D352E;
    margin: 0;
    padding: 0;
    display: grid;
    place-items: center;
    min-height: 100vh;
}

/* 2. 헤더 (대시보드, 관리자용) */
header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #DCD3C9;
    padding: 15px 30px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

header .logo img {
    height: 24px;  
    width: auto;   
    display: block;
}

header .user-welcome {
    font-size: 1.1em;
    font-weight: 500; 
}

header a {
    text-decoration: none;
    color: #5C4939;
    font-weight: 600;
    font-size: 0.9em;
    border: 2px solid #5C4939;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.3s ease;
}
header a:hover {
    background-color: #5C4939;
    color: white;
}

/* 3. 메인 컨텐츠 영역 (대시보드, 관리자용) */
.container {
    width: 100%;
    max-width: 1400px;
    padding: 20px;
    margin-top: 80px; 
    display: block;
}

/* 4. 로그인 페이지 전용 */
.login-container {
    width: 100%;
    display: grid;
    place-items: center;
    padding: 20px;
}

.login-box {
    background: #fff;
    border: 2px solid #DCD3C9;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 450px;
}

.login-box .logo {
    text-align: center;
    margin-bottom: 30px;
}
.login-box .logo img {
    max-height: 48px; 
    width: auto;
}

.login-box .footer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.9em;
    color: #aaa;
}

/* 5. 공통 카드 (박스) 디자인 */
.card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.card h2 {
    margin-top: 0;
    border-bottom: 2px solid #DCD3C9;
    padding-bottom: 10px;
    color: #5C4939;
    font-weight: 700;
}

/* 6. 폼 요소 (input, button 등) */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.1em;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-family: 'Pretendard', sans-serif; 
    font-size: 1em;
    transition: border-color 0.3s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #5C4939;
    outline: none;
}
.form-group textarea {
    min-height: 100px;
}

/* ⭐️ 메인 버튼 글로벌 스타일 */
button,
.filter-btn {
    width: 100%;
    padding: 14px;
    background: #5C4939; 
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    font-family: 'Pretendard', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(92, 73, 57, 0.3); 
}
button:hover,
.filter-btn:hover {
    transform: translateY(-2px);
    background-color: #4a3b2d; 
    box-shadow: 0 6px 12px rgba(92, 73, 57, 0.5);
}

.csv-btn {
    background: #4ECDC4; 
    box-shadow: 0 4px 8px rgba(78, 205, 196, 0.3);
}
.csv-btn:hover {
    background-color: #40b3aa;
    box-shadow: 0 6px 12px rgba(78, 205, 196, 0.5);
}

/* 7. 테이블 디자인 (내역, 관리자) */
.history-table,
.request-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-top: 15px;
}
.history-table th,
.request-table th {
    background-color: #FAF8F5; 
    padding: 12px;
    text-align: left;
    font-size: 1em;
    font-weight: 700;
    color: #5C4939; 
    border-bottom: 2px solid #DCD3C9; 
}
.history-table td,
.request-table td {
    background: #fff;
    border: 1px solid #f0f0f0;
    padding: 14px;
    font-size: 1em;
    font-weight: 500;
}
.history-table tr td:first-child,
.request-table tr td:first-child { border-radius: 10px 0 0 10px; }
.history-table tr td:last-child,
.request-table tr td:last-child { border-radius: 0 10px 10px 0; }
.history-table tr:hover td,
.request-table tr:hover td {
    background-color: #FAF8F5;
}

.center { text-align: center; }

/* 8. 상태 태그 (파스텔톤 유지) */
.status {
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 0.9em;
}
.status-pending { color: #856404; background-color: #FFF3CD; border: 1px solid #FFEBA8; }
.status-approved { color: #155724; background-color: #D4EDDA; border: 1px solid #C3E6CB; }
.status-rejected { color: #721C24; background-color: #F8D7DA; border: 1px solid #F5C6CB; }
.status-cancelled { color: #495057; background-color: #E2E3E5; border: 1px solid #D6D8DB; text-decoration: line-through; }

/* 9. 관리자 필터 폼 */
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 20px;
}
.filter-group { flex: 1; min-width: 150px; }
.filter-group label { font-size: 0.9em; color: #555; }
.filter-group input, .filter-group select {
    padding: 10px;
    font-size: 1em;
}

.filter-btn,
.csv-btn {
    width: auto;
    padding: 10px 18px;
    font-size: 1em;
    flex-grow: 0;
}

/* ⭐️ 9-1. 테이블 내 작은 액션 버튼들 (수정/삭제 등) */
.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    font-family: 'Pretendard', sans-serif;
    box-shadow: none !important; /* ⭐️ 글로벌 버튼 그림자 강제 제거 */
    transform: none !important;  /* ⭐️ 호버시 들썩임 방지 */
    transition: opacity 0.2s ease;
}
.action-btn:hover {
    opacity: 0.8;
    box-shadow: none !important;
    transform: none !important;
}
.btn-approve { background-color: #28a745; }
.btn-reject { background-color: #dc3545; }

.cancel-btn {
    background: none;
    border: none;
    color: #dc3545;
    text-decoration: underline;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    font-family: 'Pretendard', sans-serif;
    box-shadow: none !important;
    transform: none !important;
}

/* 10. Flash 메시지 */
.flash-messages {
    width: 100%;
    max-width: 1400px;
    padding: 0 20px;
    margin-top: 90px;
    position: absolute;
    top: 0;
}
.flash-message {
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.1em;
    border-width: 2px;
    border-style: solid;
}
.flash-success { background-color: #D4EDDA; color: #155724; border-color: #C3E6CB; }
.flash-error { background-color: #F8D7DA; color: #721C24; border-color: #F5C6CB; }

/* 11. 대시보드 - 연차 현황 */
.pto-info .big-number {
    font-size: 3.5em;
    font-weight: 700;
    color: #5C4939;
    margin: 10px 0;
}
.pto-info .small-text {
    font-size: 1.2em;
    color: #666;
    margin: 5px 0;
}
.pto-info strong, .user-info strong {
    min-width: 80px;
    display: inline-block;
    color: #333;
    font-weight: 600;
}
.user-info p {
    font-size: 1.2em;
    margin: 10px 0;
}

/* 12. 비밀번호 변경 (접기/펼치기) */
.password-change h2 {
    cursor: pointer; 
    user-select: none; 
}
.password-change h2 span {
    font-size: 0.8em;
    font-weight: 500;
    color: #888;
    margin-left: 10px;
}

/* 13. Footer (대시보드 / 관리자용) */
.footer-container {
    width: 100%;
    max-width: 1400px; 
    padding: 30px 20px 20px 20px;
    margin-top: 30px; 
    text-align: center;
    border-top: 2px solid #DCD3C9; 
}

.footer-container .slogan-img {
    max-height: 12px; 
    width: auto;
    margin-bottom: 2px;
}

.footer-container .copyright {
    font-size: 0.9em;
    color: #aaa;
    margin-top: 10px;
}

/* 14. 직원 계정 관리 - 수정/삭제 버튼 */
.user-action-cell {
    white-space: nowrap; 
}

.btn-user-edit, .btn-user-delete {
    display: inline-block;
    width: 48px;            
    padding: 6px 0;         
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    border: none;           
    font-family: 'Pretendard', sans-serif;
    transition: opacity 0.2s ease;
    box-shadow: none !important; /* ⭐️ 그림자 제거 */
    transform: none !important;  /* ⭐️ 들썩임 방지 */
}

.btn-user-edit {
    background-color: #007bff;
    color: white !important; 
}

.btn-user-delete {
    background-color: #dc3545;
    color: white;
    margin-left: 4px;       
}

.btn-user-edit:hover, .btn-user-delete:hover {
    opacity: 0.8;           
    box-shadow: none !important;
    transform: none !important;
}

/* 15. 관리자 페이지 네비게이션 스타일 */
.admin-nav { 
    display: flex; 
    gap: 15px; 
    padding: 15px; 
    background-color: #fff;
    margin-bottom: 25px;
}

.nav-link { 
    padding: 12px 20px; 
    text-decoration: none; 
    font-weight: 600; 
    border-radius: 8px; 
    color: #5C4939; 
    transition: all 0.3s ease;
}

.nav-link.active { 
    background-color: #FAF8F5; 
    color: #5C4939;
    border: 1px solid #DCD3C9;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.nav-link:hover { 
    background-color: #f3f0ec; 
}

/* 16. 로고 링크 예외 처리 */
header .logo a {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}
header .logo a:hover {
    background: transparent !important;
}

/* 17. 신규 추가: KPI 목록 버튼 통일 (상세/수정, 삭제) */
.btn-kpi-action {
    display: inline-block;
    width: 75px; 
    text-align: center;
    box-sizing: border-box;
    padding: 6px 0;
    margin: 0 2px;
}