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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #f5f5f5;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.app-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-excel {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-excel:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-add {
    background: white;
    color: #667eea;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.app-main {
    flex: 1;
    padding: 2rem;
    overflow-x: auto;
}

.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.task-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

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

.task-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.th-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.th-title {
    flex: 1;
    font-size: 0.9rem;
}

.filter-sort-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.7rem;
    padding: 0.25rem;
    border-radius: 3px;
    transition: all 0.2s ease;
    opacity: 0.7;
    width: 1.2rem;
    height: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-sort-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.filter-sort-btn.has-filter {
    opacity: 1;
    color: #ffd700;
}

.filter-sort-btn.has-sort {
    opacity: 1;
    font-weight: bold;
}

.task-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s ease;
}

.task-table tbody tr:hover {
    background-color: #f8f9fa;
}

.task-table tbody tr.completed {
    background-color: #e8f5e9;
}

.task-table tbody tr.completed:hover {
    background-color: #c8e6c9;
}


.task-table td {
    padding: 0.875rem 0.75rem;
    vertical-align: middle;
}

.status-clickable {
    cursor: pointer;
    color: #667eea;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.status-clickable:hover {
    color: #764ba2;
}

.request-content {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.btn-edit,
.btn-delete {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-edit:hover {
    background-color: #e3f2fd;
    transform: scale(1.1);
}

.btn-delete:hover {
    background-color: #ffebee;
    transform: scale(1.1);
}

.empty-message {
    text-align: center;
    padding: 3rem;
    color: #999;
    font-size: 1.1rem;
}

/* 모달 스타일 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 2rem;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.btn-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.task-form {
    padding: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.btn-cancel,
.btn-submit {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel {
    background: #e0e0e0;
    color: #333;
}

.btn-cancel:hover {
    background: #d0d0d0;
}

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

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

/* 상세 정보 모달 스타일 */
.detail-modal {
    max-width: 600px;
}

.detail-content {
    padding: 2rem;
}

.detail-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-section h3 {
    margin-bottom: 1rem;
    color: #667eea;
    font-size: 1.2rem;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-item label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.detail-item span {
    font-size: 1rem;
    color: #333;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

/* 필터 메뉴 스타일 */
.filter-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 2000;
}

.filter-menu-overlay.show {
    display: block;
}

.filter-menu {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-width: 250px;
    max-width: 300px;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    z-index: 2001;
}

.filter-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.filter-menu-header h3 {
    margin: 0;
    font-size: 1rem;
}

.filter-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.filter-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.filter-menu-content {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.filter-search {
    margin-bottom: 1rem;
}

.filter-search input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.filter-options {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.5rem;
}

.filter-option-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.filter-option-item:hover {
    background-color: #f5f5f5;
}

.filter-option-item input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

.filter-option-item span {
    flex: 1;
    font-size: 0.9rem;
}

.filter-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-sort-section,
.filter-check-section,
.filter-apply-section {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-sort-section label {
    font-size: 0.85rem;
    color: #666;
    margin-right: 0.5rem;
    align-self: center;
}

.filter-select-all,
.filter-clear,
.filter-apply,
.filter-reset,
.sort-menu-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    flex: 1;
}

.filter-select-all:hover,
.filter-clear:hover {
    background: #f5f5f5;
}

.filter-apply {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.filter-apply:hover {
    background: #5568d3;
}

.filter-reset {
    background: #f5f5f5;
    color: #666;
}

.filter-reset:hover {
    background: #e0e0e0;
}

.sort-menu-btn {
    background: #f8f9fa;
    border-color: #ddd;
}

.sort-menu-btn:hover {
    background: #e9ecef;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: 95vh;
    }
    
    .app-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .detail-row {
        gap: 0.75rem;
    }
    
    .filter-menu {
        max-width: 90vw;
    }
}
