/* 기본 스타일 - 미니멀하고 깔끔한 디자인 */
:root {
    /* 심플한 색상 팔레트 */
    --primary: rgb(96, 131, 222);
    --primary-dark: rgb(76, 111, 202);
    --primary-light: rgb(116, 151, 242);
    
    /* 기본 색상 */
    --white: #ffffff;
    --bg: #F5F5F5;
    --gray-50: #F5F5F5;
    --gray-100: #E8E8E8;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* 상태 색상 */
    --success: rgb(33, 207, 134);
    --warning: #F59E0B;
    --error: #EF4444;
    
    /* 그림자 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* 라운드 */
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--bg);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 헤더 */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo i {
    font-size: 1.75rem;
    color: var(--primary);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-link {
    color: var(--gray-600);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.nav-link.active {
    background: var(--primary);
    color: var(--white);
}

.nav-link i {
    font-size: 1rem;
}

/* 사용자 정보 표시 */
.user-info {
    display: flex;
    align-items: center;
    margin-left: auto;
    padding: 0 1rem;
}

.user-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.user-name i {
    color: var(--primary);
    font-size: 1.1rem;
}

.user-name #headerUserNameText {
    color: var(--gray-800);
}

/* 사용자 드롭다운 */
.user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid var(--gray-200);
}

.user-dropdown .nav-link {
    padding: 0.5rem 1rem;
}

.user-dropdown .nav-link#logout-link {
    color: var(--error);
}

.user-dropdown .nav-link#logout-link:hover {
    background: #FEE2E2;
}

/* 메인 콘텐츠 */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    font-size: 1.875rem;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-align: left;
}

.page-header p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

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

.header-actions {
    display: flex;
    gap: 0.75rem;
}

/* 통계 카드 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5개를 한 줄에 표시 */
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.pending {
    background: #FEF3C7;
    color: var(--warning);
}

.stat-icon.approved {
    background: #D1FAE5;
    color: var(--success);
}

.stat-icon.used {
    background: #DBEAFE;
    color: #6083de;
}

.stat-icon.total {
    background: #E0E7FF;
    color: var(--primary);
}

.stat-icon.annual {
    background: #E0E7FF;
    color: #6366F1;
}

.stat-icon.welfare {
    background: #D1FAE5;
    color: #10B981;
}

.stat-icon.welfare-used {
    background: #E0E7FF;
    color: #6366F1;
}

.stat-content h3 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-content p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.stat-trend {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 대시보드 카드 */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.dashboard-card.large {
    grid-column: span 1;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.card-title i {
    color: var(--primary);
    font-size: 1.125rem;
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s;
}

.view-all:hover {
    color: var(--primary-dark);
}

.card-content {
    padding: 1.5rem;
}

/* 버튼 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
}

.btn-danger {
    background: var(--error);
    color: var(--white);
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: rgb(28, 187, 114);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 207, 134, 0.3);
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 1.5rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.close-btn,
.close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    transition: color 0.2s;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
}

.close-btn:hover,
.close:hover {
    color: var(--gray-900);
    background: var(--gray-100);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background-color: var(--gray-50);
}

/* 연차 승인 목록 스타일 */
.pending-approval-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.approval-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    padding: 1.25rem;
    transition: all 0.2s;
}

.approval-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.approval-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.employee-info {
    display: flex;
    align-items: center;
}

.employee-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
}

.leave-type-badge {
    margin-left: 0.5rem;
}

.request-date {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.approval-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-700);
    font-size: 0.9375rem;
}

.approval-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.approval-actions .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .approval-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .approval-actions {
        width: 100%;
    }
    
    .approval-actions .btn {
        flex: 1;
    }
}

/* 폼 */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: all 0.2s;
    background: var(--white);
    color: var(--gray-800);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* 빠른 작업 */
.quick-actions {
    margin-top: 2rem;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.section-header p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.action-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.action-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius);
    background: var(--gray-100);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.action-content h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900);
}

.action-content p {
    font-size: 0.8125rem;
    color: var(--gray-600);
}

/* 요청 목록 */
.request-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.request-item {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.employee-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.request-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.status {
    padding: 0.25rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status.pending {
    background: #FEF3C7;
    color: #92400E;
}

.status.approved {
    background: #D1FAE5;
    color: #065F46;
}

.status.rejected {
    background: #FEE2E2;
    color: #991B1B;
}

/* 월별 통계 */
.monthly-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.month-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-icon-small {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.stat-icon-small.used {
    background: #DBEAFE;
    color: #6083de;
}

.stat-icon-small.scheduled {
    background: #D1FAE5;
    color: var(--success);
}

.stat-icon-small.pending {
    background: #FEF3C7;
    color: var(--warning);
}

.stat-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-info .label {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.stat-info .value {
    font-weight: 600;
    color: var(--gray-900);
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.875rem;
}

/* 유틸리티 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* 반응형 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .user-info {
        margin-left: 0;
        padding: 0.5rem 0;
    }
    
    .user-name {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }
    
    .user-dropdown {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
    }
    
    .stats-grid,
    .stats-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-card.large {
        grid-column: span 1;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .action-grid {
        grid-template-columns: 1fr;
    }
}
