Files
TK-FB-Project/web-ui/css/system-dashboard.css
Hyungi Ahn 2a3feca45b feat: 시스템 관리자 대시보드 개선
- 시스템 관리자 전용 웹페이지 구현 (system.html)
- 깔끔한 흰색 배경의 올드스쿨 스타일 적용
- 반응형 그리드 레이아웃으로 카드 배치 개선
- ES6 모듈 방식으로 JavaScript 구조 개선
- 이벤트 리스너 방식으로 버튼 클릭 처리 변경
- 시스템 상태, 사용자 통계, 계정 관리 기능 구현
- 시스템 로그 조회 기능 추가
- 나머지 관리 기능들 스켈레톤 구현 (개발 중 상태)
- 인코딩 문제 해결을 위한 영어 로그 메시지 적용
- hyungi 계정을 system 권한으로 설정
- JWT 토큰에 role 필드 추가
- 시스템 전용 API 엔드포인트 구현

주요 변경사항:
- web-ui/pages/dashboard/system.html: 시스템 관리자 전용 페이지
- web-ui/css/system-dashboard.css: 시스템 대시보드 전용 스타일
- web-ui/js/system-dashboard.js: 시스템 대시보드 로직
- api.hyungi.net/controllers/systemController.js: 시스템 API 컨트롤러
- api.hyungi.net/routes/systemRoutes.js: 시스템 API 라우트
- api.hyungi.net/controllers/authController.js: 시스템 권한 로그인 처리
- api.hyungi.net/services/auth.service.js: JWT 토큰에 role 필드 추가
2025-08-18 11:16:18 +09:00

790 lines
14 KiB
CSS

/* 시스템 대시보드 전용 스타일 */
/* 시스템 대시보드 배경 - 깔끔한 흰색 */
.main-layout .content-wrapper {
background: #ffffff;
min-height: calc(100vh - 80px);
padding: 2rem;
border-left: 1px solid #e0e0e0;
}
.page-header {
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 2rem;
color: #333;
border-bottom: 2px solid #f0f0f0;
padding-bottom: 1rem;
}
.page-header h1 {
margin: 0;
font-size: 1.8rem;
font-weight: 500;
color: #2c3e50;
}
/* 시스템 배지 */
.system-badge {
background: #e74c3c;
color: white;
padding: 0.2rem 0.6rem;
border-radius: 4px;
font-size: 0.75rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.5px;
border: 1px solid #c0392b;
}
.header-right {
display: flex;
align-items: center;
}
.user-info {
display: flex;
align-items: center;
gap: 1rem;
}
.logout-btn {
background: #e74c3c;
color: white;
border: none;
padding: 0.5rem 1rem;
border-radius: 8px;
cursor: pointer;
font-size: 0.9rem;
transition: all 0.3s ease;
}
.logout-btn:hover {
background: #c0392b;
transform: translateY(-2px);
box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}
/* 메인 컨텐츠 */
.main-content {
max-width: 1200px;
margin: 0 auto;
padding: 0;
display: flex;
flex-direction: column;
gap: 2rem;
width: 100%;
}
/* 시스템 상태 개요 */
.system-overview {
margin-bottom: 2rem;
}
.system-overview h2 {
color: #2c3e50;
margin-bottom: 1.5rem;
font-size: 1.4rem;
font-weight: 500;
display: flex;
align-items: center;
gap: 0.5rem;
border-bottom: 1px solid #ecf0f1;
padding-bottom: 0.5rem;
}
.status-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 1rem;
margin-bottom: 2rem;
}
.status-card {
background: #ffffff;
border: 1px solid #e0e0e0;
border-radius: 8px;
padding: 1.5rem;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
transition: box-shadow 0.2s ease;
}
.status-card:hover {
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.status-icon {
width: 60px;
height: 60px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
background: linear-gradient(45deg, #3498db, #2980b9);
color: white;
}
.status-info h3 {
margin: 0 0 0.5rem 0;
color: #2c3e50;
font-size: 1rem;
font-weight: 500;
}
.status-value {
font-size: 1.3rem;
font-weight: 600;
margin: 0.5rem 0;
}
.status-value.online {
color: #27ae60;
}
.status-value.warning {
color: #f39c12;
}
.status-value.error {
color: #e74c3c;
}
.status-info small {
color: #7f8c8d;
font-size: 0.85rem;
}
/* 관리 섹션 */
.management-section {
margin-bottom: 2rem;
}
.management-section h2 {
color: #2c3e50;
margin-bottom: 1.5rem;
font-size: 1.4rem;
font-weight: 500;
display: flex;
align-items: center;
gap: 0.5rem;
border-bottom: 1px solid #ecf0f1;
padding-bottom: 0.5rem;
}
.management-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 1rem;
}
.management-card {
background: #ffffff;
border: 1px solid #e0e0e0;
border-radius: 8px;
padding: 1.5rem;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
transition: box-shadow 0.2s ease;
display: flex;
flex-direction: column;
height: 100%;
}
.management-card:hover {
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.management-card.primary {
border-left: 4px solid #3498db;
}
.card-header {
display: flex;
align-items: center;
gap: 0.8rem;
margin-bottom: 1rem;
padding-bottom: 0.5rem;
border-bottom: 1px solid #f0f0f0;
}
.card-header i {
font-size: 1.2rem;
color: #3498db;
}
.card-header h3 {
margin: 0;
color: #2c3e50;
font-size: 1.1rem;
font-weight: 500;
}
.card-content {
display: flex;
flex-direction: column;
height: 100%;
}
.card-content p {
color: #7f8c8d;
margin-bottom: 1.5rem;
line-height: 1.5;
font-size: 0.9rem;
flex: 1;
}
.card-actions {
display: flex;
gap: 0.8rem;
margin-top: auto;
}
.btn {
padding: 0.6rem 1rem;
border: 1px solid #ddd;
border-radius: 4px;
cursor: pointer;
font-size: 0.9rem;
font-weight: 500;
transition: all 0.2s ease;
display: flex;
align-items: center;
gap: 0.5rem;
background: #ffffff;
text-decoration: none;
}
.btn-primary {
background: #3498db;
color: white;
border-color: #2980b9;
}
.btn-primary:hover {
background: #2980b9;
}
.btn-secondary {
background: #95a5a6;
color: white;
border-color: #7f8c8d;
}
.btn-secondary:hover {
background: #7f8c8d;
}
/* 최근 활동 */
.recent-activity {
margin-bottom: 2rem;
}
.recent-activity h2 {
color: white;
margin-bottom: 1.5rem;
font-size: 1.8rem;
font-weight: 600;
display: flex;
align-items: center;
gap: 0.5rem;
}
.activity-container {
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 16px;
padding: 1.5rem;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.activity-list {
max-height: 400px;
overflow-y: auto;
}
.activity-item {
display: flex;
align-items: center;
gap: 1rem;
padding: 1rem;
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
transition: background-color 0.3s ease;
}
.activity-item:hover {
background: rgba(52, 152, 219, 0.05);
}
.activity-item:last-child {
border-bottom: none;
}
.activity-icon {
width: 40px;
height: 40px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(45deg, #3498db, #2980b9);
color: white;
font-size: 1rem;
}
.activity-info h4 {
margin: 0 0 0.3rem 0;
color: #2c3e50;
font-size: 1rem;
font-weight: 600;
}
.activity-info p {
margin: 0;
color: #7f8c8d;
font-size: 0.9rem;
}
.activity-time {
margin-left: auto;
color: #95a5a6;
font-size: 0.8rem;
}
/* 모달 */
.modal {
display: none;
position: fixed;
z-index: 2000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(5px);
}
.modal-content {
background: white;
margin: 5% auto;
padding: 0;
border-radius: 16px;
width: 90%;
max-width: 800px;
max-height: 80vh;
overflow: hidden;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.modal-header {
background: linear-gradient(45deg, #3498db, #2980b9);
color: white;
padding: 1.5rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-header h3 {
margin: 0;
font-size: 1.3rem;
font-weight: 600;
}
.close-btn {
background: none;
border: none;
color: white;
font-size: 1.5rem;
cursor: pointer;
padding: 0;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: background-color 0.3s ease;
}
.close-btn:hover {
background: rgba(255, 255, 255, 0.2);
}
.modal-body {
padding: 2rem;
max-height: 60vh;
overflow-y: auto;
}
/* 반응형 디자인 */
@media (max-width: 1200px) {
.status-grid {
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.management-grid {
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
}
@media (max-width: 768px) {
.main-layout .content-wrapper {
padding: 1rem;
}
.page-header {
flex-direction: column;
align-items: flex-start;
gap: 0.5rem;
}
.page-header h1 {
font-size: 1.5rem;
}
.status-grid,
.management-grid {
grid-template-columns: 1fr;
gap: 0.8rem;
}
.status-card,
.management-card {
padding: 1rem;
}
.modal-content {
width: 95%;
margin: 5% auto;
}
.system-overview h2,
.management-section h2,
.recent-activity h2 {
font-size: 1.2rem;
}
}
@media (max-width: 480px) {
.main-layout .content-wrapper {
padding: 0.5rem;
}
.status-card,
.management-card {
padding: 0.8rem;
}
.btn {
padding: 0.5rem 0.8rem;
font-size: 0.8rem;
}
}
/* 계정 관리 스타일 */
.account-management {
padding: 1rem;
}
.account-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.5rem;
padding-bottom: 1rem;
border-bottom: 2px solid #ecf0f1;
}
.account-header h4 {
margin: 0;
color: #2c3e50;
font-size: 1.3rem;
font-weight: 600;
}
.account-filters {
display: flex;
gap: 1rem;
margin-bottom: 1.5rem;
flex-wrap: wrap;
}
.account-filters input,
.account-filters select {
padding: 0.7rem;
border: 2px solid #ecf0f1;
border-radius: 8px;
font-size: 0.9rem;
transition: border-color 0.3s ease;
}
.account-filters input:focus,
.account-filters select:focus {
outline: none;
border-color: #3498db;
}
.users-table {
overflow-x: auto;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.users-table table {
width: 100%;
border-collapse: collapse;
background: white;
}
.users-table th,
.users-table td {
padding: 1rem;
text-align: left;
border-bottom: 1px solid #ecf0f1;
}
.users-table th {
background: linear-gradient(45deg, #3498db, #2980b9);
color: white;
font-weight: 600;
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.users-table tr:hover {
background: rgba(52, 152, 219, 0.05);
}
.role-badge {
padding: 0.3rem 0.8rem;
border-radius: 20px;
font-size: 0.75rem;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.role-badge.role-system {
background: linear-gradient(45deg, #e74c3c, #c0392b);
color: white;
}
.role-badge.role-admin {
background: linear-gradient(45deg, #f39c12, #e67e22);
color: white;
}
.role-badge.role-leader {
background: linear-gradient(45deg, #9b59b6, #8e44ad);
color: white;
}
.role-badge.role-user {
background: linear-gradient(45deg, #95a5a6, #7f8c8d);
color: white;
}
.status-badge {
padding: 0.3rem 0.8rem;
border-radius: 20px;
font-size: 0.75rem;
font-weight: bold;
text-transform: uppercase;
}
.status-badge.active {
background: linear-gradient(45deg, #27ae60, #2ecc71);
color: white;
}
.status-badge.inactive {
background: linear-gradient(45deg, #e74c3c, #c0392b);
color: white;
}
.action-buttons {
display: flex;
gap: 0.5rem;
}
.btn-small {
padding: 0.4rem 0.6rem;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 0.8rem;
transition: all 0.3s ease;
}
.btn-edit {
background: linear-gradient(45deg, #3498db, #2980b9);
color: white;
}
.btn-edit:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}
.btn-delete {
background: linear-gradient(45deg, #e74c3c, #c0392b);
color: white;
}
.btn-delete:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}
.loading-spinner {
text-align: center;
padding: 3rem;
color: #7f8c8d;
}
.loading-spinner i {
font-size: 2rem;
margin-bottom: 1rem;
}
.error-message {
text-align: center;
padding: 3rem;
color: #e74c3c;
}
.error-message i {
font-size: 3rem;
margin-bottom: 1rem;
}
.error-message p {
margin: 1rem 0;
font-size: 1.1rem;
}
/* 알림 스타일 */
.notification {
position: fixed;
top: 20px;
right: 20px;
padding: 1rem 1.5rem;
border-radius: 8px;
color: white;
font-weight: 500;
z-index: 3000;
animation: slideIn 0.3s ease;
}
.notification-info {
background: linear-gradient(45deg, #3498db, #2980b9);
}
.notification-success {
background: linear-gradient(45deg, #27ae60, #2ecc71);
}
.notification-warning {
background: linear-gradient(45deg, #f39c12, #e67e22);
}
.notification-error {
background: linear-gradient(45deg, #e74c3c, #c0392b);
}
@keyframes slideIn {
from {
transform: translateX(100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
/* 사용자 폼 스타일 */
.user-edit-form,
.user-create-form {
padding: 1.5rem;
}
.user-edit-form h4,
.user-create-form h4 {
margin: 0 0 2rem 0;
color: #2c3e50;
font-size: 1.3rem;
font-weight: 600;
display: flex;
align-items: center;
gap: 0.5rem;
}
.form-group {
margin-bottom: 1.5rem;
}
.form-group label {
display: block;
margin-bottom: 0.5rem;
color: #2c3e50;
font-weight: 500;
font-size: 0.9rem;
}
.form-group input,
.form-group select {
width: 100%;
padding: 0.8rem;
border: 2px solid #ecf0f1;
border-radius: 8px;
font-size: 0.9rem;
transition: border-color 0.3s ease;
box-sizing: border-box;
}
.form-group input:focus,
.form-group select:focus {
outline: none;
border-color: #3498db;
box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}
.form-group input:disabled {
background: #f8f9fa;
color: #6c757d;
cursor: not-allowed;
}
.form-actions {
display: flex;
gap: 1rem;
justify-content: flex-end;
margin-top: 2rem;
padding-top: 1.5rem;
border-top: 2px solid #ecf0f1;
}
/* 스크롤바 스타일링 */
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0.1);
border-radius: 4px;
}
::-webkit-scrollbar-thumb {
background: linear-gradient(45deg, #3498db, #2980b9);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: linear-gradient(45deg, #2980b9, #3498db);
}