Files
TK-FB-Project/web-ui/css/daily-work-report.css
Hyungi Ahn 397485e150 feat: 작업보고서 시간 입력 UX 개선 - 터치 최적화
작업보고서 작성 페이지의 시간 입력을 모바일/터치 환경에 최적화

주요 변경사항:
- 기존 number input → 큰 버튼 기반 팝오버 방식으로 전환
- 퀵 선택 버튼 5개 (30분, 1시간, 2시간, 4시간, 8시간)
- ±30분 미세 조정 버튼 추가
- 터치 타겟 최소 48-64px로 확대
- "8시간 30분" 형식으로 직관적 표시
- TBM 작업보고 및 수동 입력 모두 적용

기술 구현:
- Hidden input + display div 패턴으로 폼 호환성 유지
- 팝오버 오버레이 with ESC/클릭 외부 닫기
- CSS 애니메이션 추가
- 캐시 버스팅 (CSS v9, JS v24)

문서:
- 개발 로그: 개발 log/2026-01-27-time-input-ux-improvement.md
- 사용자 가이드: docs/guides/work-report-time-input-guide.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-27 13:29:38 +09:00

812 lines
15 KiB
CSS

/* daily-work-report.css - 일일 작업보고서 스타일 */
/* 탭 메뉴 스타일 */
.tab-menu {
display: flex;
gap: 0.5rem;
border-bottom: 2px solid var(--border-color, #e5e7eb);
margin-bottom: 1.5rem;
}
/* TBM 세션 그룹 스타일 */
.tbm-session-group {
margin-bottom: 2rem;
}
.tbm-session-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 0.75rem 1.5rem;
border-radius: 8px 8px 0 0;
display: flex;
align-items: center;
gap: 1rem;
font-size: 0.875rem;
}
.tbm-session-badge {
background-color: rgba(255, 255, 255, 0.3);
padding: 0.25rem 0.75rem;
border-radius: 12px;
font-weight: 600;
font-size: 0.75rem;
}
.tbm-session-date {
font-weight: 600;
font-size: 1rem;
}
.tbm-session-creator {
font-size: 0.8rem;
opacity: 0.9;
}
.tbm-session-count {
background-color: rgba(255, 255, 255, 0.2);
padding: 0.25rem 0.625rem;
border-radius: 12px;
font-weight: 600;
margin-left: auto;
}
.tbm-session-info {
opacity: 0.95;
font-size: 0.875rem;
}
/* TBM 작업 테이블 스타일 */
.tbm-table-container {
overflow-x: auto;
border: 1px solid var(--border-color, #e5e7eb);
border-radius: 0 0 8px 8px;
background: white;
}
.tbm-work-table {
width: 100%;
border-collapse: collapse;
font-size: 0.875rem;
}
.tbm-work-table thead {
background-color: #f9fafb;
border-bottom: 2px solid var(--border-color, #e5e7eb);
}
.tbm-work-table th {
padding: 0.75rem 0.5rem;
text-align: left;
font-weight: 600;
color: var(--text-secondary, #6b7280);
border-bottom: 2px solid var(--border-color, #e5e7eb);
white-space: nowrap;
font-size: 0.8rem;
}
.tbm-work-table td {
padding: 0.75rem 0.5rem;
border-bottom: 1px solid var(--border-light, #f3f4f6);
vertical-align: middle;
}
.tbm-work-table tbody tr:hover {
background-color: #f9fafb;
}
.tbm-work-table tbody tr:last-child td {
border-bottom: none;
}
.worker-cell {
min-width: 100px;
}
.worker-cell strong {
display: block;
color: var(--text-primary, #111827);
margin-bottom: 0.25rem;
}
.worker-job-type {
font-size: 0.75rem;
color: var(--text-secondary, #6b7280);
background-color: #f3f4f6;
padding: 0.125rem 0.5rem;
border-radius: 4px;
display: inline-block;
}
.workplace-cell div {
font-size: 0.8rem;
}
.workplace-cell div:first-child {
color: var(--text-secondary, #6b7280);
font-size: 0.75rem;
}
.form-input-compact {
width: 70px;
padding: 0.375rem 0.5rem;
border: 1px solid var(--border-color, #d1d5db);
border-radius: 4px;
font-size: 0.875rem;
text-align: center;
}
.form-input-compact:focus {
outline: none;
border-color: var(--primary, #3b82f6);
box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}
.form-input-compact[type="number"] {
-moz-appearance: textfield;
}
.form-input-compact[type="number"]::-webkit-outer-spin-button,
.form-input-compact[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
.btn-submit-compact {
padding: 0.5rem 1rem;
background-color: var(--primary, #3b82f6);
color: white;
border: none;
border-radius: 4px;
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s;
white-space: nowrap;
}
.btn-submit-compact:hover {
background-color: var(--primary-dark, #2563eb);
}
.btn-submit-compact:active {
transform: scale(0.98);
}
.btn-add-work {
padding: 0.625rem 1.25rem;
background-color: #10b981;
color: white;
border: none;
border-radius: 6px;
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s;
}
.btn-add-work:hover {
background-color: #059669;
}
.btn-delete-compact {
padding: 0.375rem 0.625rem;
background-color: #ef4444;
color: white;
border: none;
border-radius: 4px;
font-size: 0.875rem;
cursor: pointer;
transition: background-color 0.2s;
}
.btn-delete-compact:hover {
background-color: #dc2626;
}
.btn-map-select {
padding: 0.5rem 0.875rem;
background-color: #8b5cf6;
color: white;
border: none;
border-radius: 4px;
font-size: 0.8rem;
font-weight: 500;
cursor: pointer;
transition: background-color 0.2s;
white-space: nowrap;
}
.btn-map-select:hover {
background-color: #7c3aed;
}
/* 작업장소 선택 박스 hover 효과 */
.workplace-select-box {
transition: all 0.2s ease;
}
.workplace-select-box:hover {
background-color: #f3f4f6 !important;
border-color: #8b5cf6 !important;
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(139, 92, 246, 0.1);
}
.workplace-category-btn,
.workplace-btn {
padding: 0.75rem 1rem;
background-color: #f3f4f6;
border: 2px solid #e5e7eb;
border-radius: 6px;
cursor: pointer;
transition: all 0.2s;
font-size: 0.875rem;
font-weight: 500;
text-align: center;
}
.workplace-category-btn:hover,
.workplace-btn:hover {
background-color: #e0e7ff;
border-color: #818cf8;
color: #4338ca;
}
.workplace-category-btn:active,
.workplace-btn:active {
transform: scale(0.98);
}
/* 작업장소 선택 모달 */
#workplaceModal.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
align-items: center;
justify-content: center;
}
#workplaceModal .modal-content {
background-color: white;
margin: auto;
padding: 0;
border-radius: 8px;
max-width: 600px;
width: 90%;
max-height: 80vh;
overflow: hidden;
display: flex;
flex-direction: column;
}
#workplaceModal .modal-header {
padding: 1.5rem;
border-bottom: 1px solid #e5e7eb;
display: flex;
justify-content: space-between;
align-items: center;
}
#workplaceModal .modal-header h3 {
margin: 0;
font-size: 1.25rem;
color: #111827;
}
#workplaceModal .modal-close {
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
color: #6b7280;
padding: 0;
width: 2rem;
height: 2rem;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
}
#workplaceModal .modal-close:hover {
background-color: #f3f4f6;
color: #111827;
}
#workplaceModal .modal-body {
padding: 1.5rem;
overflow-y: auto;
}
.tab-btn {
padding: 0.75rem 1.5rem;
background: none;
border: none;
border-bottom: 3px solid transparent;
cursor: pointer;
font-weight: 500;
color: var(--text-secondary, #6b7280);
transition: all 0.2s;
}
.tab-btn:hover {
color: var(--primary, #3b82f6);
}
.tab-btn.active {
color: var(--primary, #3b82f6);
border-bottom-color: var(--primary, #3b82f6);
}
/* TBM 작업 카드 스타일 */
.tbm-work-card {
background: white;
border: 1px solid var(--border-color, #e5e7eb);
border-radius: 8px;
padding: 1.5rem;
margin-bottom: 1.5rem;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.tbm-work-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
padding-bottom: 1rem;
border-bottom: 2px solid var(--border-color, #e5e7eb);
}
.tbm-work-header h4 {
margin: 0;
font-size: 1.125rem;
color: var(--text-primary, #111827);
}
.tbm-work-date {
font-size: 0.875rem;
color: var(--text-secondary, #6b7280);
background: var(--bg-secondary, #f3f4f6);
padding: 0.25rem 0.75rem;
border-radius: 4px;
}
.tbm-work-info {
margin-bottom: 1.5rem;
}
.info-row {
display: flex;
padding: 0.5rem 0;
border-bottom: 1px solid var(--border-light, #f3f4f6);
}
.info-row:last-child {
border-bottom: none;
}
.info-row .label {
font-weight: 600;
color: var(--text-secondary, #6b7280);
min-width: 100px;
font-size: 0.875rem;
}
.info-row .value {
color: var(--text-primary, #111827);
flex: 1;
}
.tbm-work-input {
background: var(--bg-secondary, #f9fafb);
padding: 1.5rem;
border-radius: 6px;
margin-bottom: 1rem;
}
.tbm-work-input .form-group {
margin-bottom: 1rem;
}
.tbm-work-input .form-group:last-child {
margin-bottom: 0;
}
.tbm-work-input label {
display: block;
font-weight: 500;
font-size: 0.875rem;
color: var(--text-secondary, #6b7280);
margin-bottom: 0.5rem;
}
.tbm-work-input .form-input {
width: 100%;
padding: 0.625rem;
border: 1px solid var(--border-color, #d1d5db);
border-radius: 4px;
font-size: 1rem;
}
.tbm-work-input .form-input:focus {
outline: none;
border-color: var(--primary, #3b82f6);
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.tbm-work-input .form-input[readonly] {
background-color: #f3f4f6;
cursor: not-allowed;
}
/* 버튼 스타일 */
.btn-block {
width: 100%;
padding: 0.875rem;
font-size: 1rem;
font-weight: 500;
}
.btn-primary {
background-color: var(--primary, #3b82f6);
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
transition: background-color 0.2s;
}
.btn-primary:hover {
background-color: var(--primary-dark, #2563eb);
}
.btn-primary:disabled {
background-color: #9ca3af;
cursor: not-allowed;
}
/* 메시지 스타일 */
.message {
padding: 1rem;
border-radius: 6px;
margin-bottom: 1rem;
font-size: 0.875rem;
}
.message.error {
background-color: #fee2e2;
color: #991b1b;
border-left: 4px solid #dc2626;
}
.message.success {
background-color: #dcfce7;
color: #166534;
border-left: 4px solid #16a34a;
}
.message.info {
background-color: #dbeafe;
color: #1e40af;
border-left: 4px solid #3b82f6;
}
/* 완료된 보고서 카드 스타일 */
.completed-report-card {
background: white;
border: 1px solid var(--border-color, #e5e7eb);
border-radius: 8px;
padding: 1.5rem;
margin-bottom: 1.5rem;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.completed-report-card .report-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
padding-bottom: 1rem;
border-bottom: 2px solid var(--border-color, #e5e7eb);
}
.completed-report-card .report-header h4 {
margin: 0 0.5rem 0 0;
font-size: 1.125rem;
color: var(--text-primary, #111827);
display: inline-block;
}
.completed-report-card .report-date {
font-size: 0.875rem;
color: var(--text-secondary, #6b7280);
background: var(--bg-secondary, #f3f4f6);
padding: 0.25rem 0.75rem;
border-radius: 4px;
}
.completed-report-card .report-info {
margin-top: 1rem;
}
.tbm-badge {
display: inline-block;
background-color: #dbeafe;
color: #1e40af;
padding: 0.25rem 0.75rem;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 600;
margin-left: 0.5rem;
}
.manual-badge {
display: inline-block;
background-color: #f3f4f6;
color: #6b7280;
padding: 0.25rem 0.75rem;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 600;
margin-left: 0.5rem;
}
.form-group {
margin-bottom: 1rem;
}
.form-label {
display: block;
font-weight: 500;
font-size: 0.875rem;
color: var(--text-secondary, #6b7280);
margin-bottom: 0.5rem;
}
.form-input {
width: 100%;
padding: 0.625rem;
border: 1px solid var(--border-color, #d1d5db);
border-radius: 4px;
font-size: 1rem;
}
.form-input:focus {
outline: none;
border-color: var(--primary, #3b82f6);
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
/* 시간 입력 트리거 (클릭 가능한 영역) */
.time-input-trigger {
padding: 0.5rem 0.75rem;
background: #f9fafb;
border: 2px solid #e5e7eb;
border-radius: 6px;
cursor: pointer;
text-align: center;
font-weight: 600;
color: #374151;
min-height: 44px;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
user-select: none;
}
.time-input-trigger:hover {
background: #f3f4f6;
border-color: #3b82f6;
color: #3b82f6;
}
.time-input-trigger.has-value {
background: #eff6ff;
border-color: #3b82f6;
color: #1e40af;
}
.time-input-trigger.placeholder {
color: #9ca3af;
font-style: italic;
font-weight: 400;
}
/* 시간 선택 팝오버 */
.time-picker-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 2000;
display: flex;
align-items: center;
justify-content: center;
padding: 1rem;
}
.time-picker-popup {
background: white;
border-radius: 16px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
padding: 1.5rem;
max-width: 400px;
width: 100%;
animation: popupSlideIn 0.3s ease-out;
}
@keyframes popupSlideIn {
from {
opacity: 0;
transform: translateY(20px) scale(0.95);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
.time-picker-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.25rem;
}
.time-picker-header h3 {
margin: 0;
font-size: 1.125rem;
font-weight: 700;
color: #111827;
}
.time-picker-close {
background: none;
border: none;
font-size: 1.75rem;
color: #6b7280;
cursor: pointer;
padding: 0;
width: 2rem;
height: 2rem;
display: flex;
align-items: center;
justify-content: center;
border-radius: 4px;
transition: all 0.2s;
}
.time-picker-close:hover {
background: #f3f4f6;
color: #111827;
}
/* 퀵 선택 버튼 그리드 */
.quick-time-grid {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 0.5rem;
margin-bottom: 1.25rem;
}
.time-btn {
padding: 1rem 0.5rem;
background: #3b82f6;
color: white;
border: none;
border-radius: 10px;
cursor: pointer;
font-weight: 700;
font-size: 0.875rem;
min-height: 64px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
transition: all 0.2s ease;
box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}
.time-btn:hover {
background: #2563eb;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}
.time-btn:active {
transform: translateY(0) scale(0.98);
box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}
.time-btn .time-value {
font-size: 0.95rem;
}
/* 미세 조정 영역 */
.time-adjust-area {
background: #f9fafb;
border: 1px solid #e5e7eb;
border-radius: 10px;
padding: 1rem;
margin-bottom: 1rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.current-time-label {
font-size: 0.875rem;
color: #6b7280;
font-weight: 500;
}
.current-time-value {
font-size: 1.5rem;
color: #111827;
font-weight: 700;
display: block;
margin-bottom: 0.5rem;
}
.adjust-buttons {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.5rem;
}
.adjust-btn {
padding: 0.875rem 1rem;
background: #6b7280;
color: white;
border: none;
border-radius: 8px;
font-weight: 700;
font-size: 0.875rem;
cursor: pointer;
min-height: 48px;
transition: all 0.2s ease;
}
.adjust-btn:hover {
background: #4b5563;
transform: translateY(-1px);
}
.adjust-btn:active {
transform: translateY(0) scale(0.98);
}
/* 확인 버튼 */
.confirm-btn {
width: 100%;
padding: 1rem;
background: #10b981;
color: white;
border: none;
border-radius: 10px;
font-weight: 700;
font-size: 1rem;
cursor: pointer;
min-height: 52px;
transition: all 0.2s ease;
box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}
.confirm-btn:hover {
background: #059669;
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}
.confirm-btn:active {
transform: translateY(0) scale(0.98);
}