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

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 로그인 페이지 */
.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.login-box h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    color: #666;
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea,
.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: 'Noto Sans KR', sans-serif;
    box-sizing: border-box;
}

.form-group textarea,
textarea.form-control {
    resize: vertical;
    min-height: 150px;
    line-height: 1.5;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input[type="checkbox"] {
    margin-right: 8px;
}

.btn-login, .btn-init, .btn-primary, .btn-secondary, .btn-danger {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-login, .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-login:hover, .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.btn-init, .btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-init:hover, .btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.help-text {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.help-text p {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

/* 알림 메시지 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    background: #27ae60;
}

.notification.error {
    background: #e74c3c;
}

.notification.info {
    background: #3498db;
}

/* 대시보드 */
.dashboard {
    width: 100%;
    min-height: 100vh;
    background: #f5f7fa;
    padding: 0;
}

.header {
    background: white;
    padding: 20px 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.btn-back {
    height: 34px;
    padding: 0 16px;
    background: #f7f9fc;
    color: #666;
    border: 1px solid #e5e8eb;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-back:hover {
    background: #00c73c;
    color: white;
    border-color: #00c73c;
    transform: translateX(-2px);
}

.btn-home {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #00c73c;
    border-radius: 8px;
    font-size: 24px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-home:hover {
    background: #00c73c;
    transform: scale(1.05);
}

.btn-home:hover span {
    color: white !important;
}

.header h1 {
    font-size: 18px;
    color: #333;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 연차관리 페이지는 대시보드와 동일한 header-btn, header-actions 클래스 사용 */

.header-info .btn-logout:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

/* 알림 아이콘 */
.notification-icon {
    position: relative;
    cursor: pointer;
    padding: 3px;
    border-radius: 50%;
    transition: all 0.3s;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    flex-shrink: 0;
}

.notification-icon:hover {
    background: rgba(0, 0, 0, 0.05);
}

.notification-icon i {
    font-size: 20px;
    color: #333;
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #e74c3c;
    color: white;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    padding: 0 5px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 알림 드롭다운 */
.notification-dropdown {
    position: absolute;
    top: 60px;
    right: 40px;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.notification-dropdown.active {
    display: block;
    animation: dropdownSlide 0.3s ease-out;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-header {
    padding: 15px 20px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.mark-all-read {
    font-size: 12px;
    color: #667eea;
    cursor: pointer;
    text-decoration: none;
}

.mark-all-read:hover {
    text-decoration: underline;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #f0f5ff;
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
}

.notification-item-content {
    margin-left: 10px;
}

.notification-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.notification-item-message {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.notification-item-time {
    font-size: 11px;
    color: #999;
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

.notification-empty p {
    margin: 0;
    font-size: 14px;
}

/* 알림 배너 */
.alert-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.alert-banner.success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.alert-banner.danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.alert-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-banner-icon {
    font-size: 24px;
}

.alert-banner-text h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
}

.alert-banner-text p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}

.alert-banner-action {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.alert-banner-action:hover {
    background: white;
    color: #667eea;
}

.content {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* 통계 카드 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transition: transform 0.5s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.35);
}

.stat-card:hover::before {
    transform: scale(1.2);
}

.stat-card h3 {
    font-size: 15px;
    color: rgba(255, 255, 255, 1);
    margin-bottom: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .value {
    font-size: 48px;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.stat-card p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    margin-top: 10px;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.stat-card.annual {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card.substitute {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card.total {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* 대기중인 신청 카드 - 주황색 */
.stat-card[style*="border-left: 4px solid #ff9800"] {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    border: none !important;
}

/* 테이블 */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow-x: auto;  /* 가로 스크롤 허용 */
    overflow-y: visible;  /* 세로는 잘리지 않도록 */
}

.table-header {
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h2 {
    font-size: 20px;
    color: #333;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.btn-add {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-add:hover {
    background: #5568d3;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f8f9fa;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

td {
    padding: 15px;
    border-top: 1px solid #f0f0f0;
    font-size: 14px;
    color: #666;
}

tbody tr:hover {
    background: #f8f9fa;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.btn-edit, .btn-delete, .btn-small {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s;
    min-width: 45px;
    text-align: center;
}

.btn-edit {
    background: #3498db;
    color: white;
}

.btn-edit:hover {
    background: #2980b9;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background: #c0392b;
}

.btn-small {
    background: #667eea;
    color: white;
}

.btn-small:hover {
    background: #5568d3;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 22px;
    color: #333;
}

.btn-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 28px;
}

.btn-close:hover {
    color: #333;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-footer button {
    width: auto;
    padding: 10px 20px;
    margin-top: 0;
}

/* 휴가 기록 섹션 */
.leave-records-section {
    margin-top: 30px;
}

.record-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.record-info {
    flex: 1;
}

.record-info strong {
    color: #333;
    margin-right: 10px;
}

.record-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 10px;
}

.record-type.annual {
    background: #e3f2fd;
    color: #2196f3;
}

.record-type.substitute {
    background: #fff3e0;
    color: #ff9800;
}

.record-type.earn {
    background: #e8f5e9;
    color: #4caf50;
}

.record-type.use {
    background: #ffebee;
    color: #f44336;
}

/* 반응형 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .header-left {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .btn-back {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .btn-home {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .header h1 {
        font-size: 16px;
    }
    
    .header-info {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .header-info .btn-secondary,
    .header-info .btn-logout {
        padding: 8px 12px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .header-info .user-info {
        font-size: 14px;
    }
    
    .header img {
        height: 25px !important;
    }
    
    .content {
        padding: 20px;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

/* 로딩 스피너 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    font-size: 16px;
    margin-top: 10px;
}
