refactor: SQL 쿼리 관리 모듈화 및 메일 관리 UI/UX 고도화

This commit is contained in:
2026-03-17 14:27:25 +09:00
parent 74f11d3bd4
commit d0b33edea8
22 changed files with 851 additions and 1324 deletions

View File

@@ -1,477 +1,219 @@
/* Mail Manager Layout */
/* Mail Manager Layout (Vertical Split) */
.mail-wrapper {
display: flex;
height: calc(100vh - 36px);
margin-top: 36px;
background: #fff;
overflow: hidden;
}
.mail-sidebar {
display: none; /* 사이드바 삭제 */
display: flex; height: calc(100vh - var(--topbar-h));
margin-top: var(--topbar-h); background: #fff; overflow: hidden;
}
.mail-list-area {
width: 400px;
border-right: 1px solid var(--border-color);
display: flex;
flex-direction: column;
height: 100%;
background: #fff;
position: relative;
}
/* 탭 가로 배치 복구 */
.mail-tabs {
display: flex;
border-bottom: 1px solid var(--border-color);
background: #f8f9fa;
flex-shrink: 0;
width: 100%;
width: 400px; border-right: 1px solid var(--border-color);
display: flex; flex-direction: column; height: 100%; background: #fff; position: relative;
}
/* 1. Tabs & Search */
.mail-tabs { display: flex; border-bottom: 1px solid var(--border-color); background: #f8f9fa; flex-shrink: 0; }
.mail-tab {
flex: 1;
padding: 12px 0;
text-align: center;
cursor: pointer;
font-weight: 700;
color: #a0aec0;
font-size: 11px;
transition: all 0.2s ease;
border-bottom: 2px solid transparent;
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
flex: 1; padding: 12px 0; text-align: center; cursor: pointer;
font-weight: 700; color: #a0aec0; font-size: 11px; transition: all 0.2s ease;
border-bottom: 2px solid transparent; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.mail-tab:hover { background: #edf2f7; color: var(--primary-color); }
.mail-tab.active { color: var(--primary-color); border-bottom: 2px solid var(--primary-color); background: #fff; }
.mail-tab:hover {
background: #edf2f7;
color: var(--primary-color);
}
.search-bar { padding: 16px 24px; border-bottom: 1px solid var(--border-color); background: #fff; flex-shrink: 0; }
.mail-tab.active {
color: var(--primary-color);
border-bottom: 2px solid var(--primary-color);
background: #fff;
}
/* 검색창 여백 및 간격 조정 */
.search-bar {
padding: 16px 24px;
border-bottom: 1px solid var(--border-color);
background: #fff;
flex-shrink: 0;
margin-bottom: 20px;
}
/* 상단 선택 액션바 */
.mail-bulk-actions {
display: none;
padding: 8px 16px;
background: #f7fafc;
border-bottom: 1px solid var(--border-color);
align-items: center;
justify-content: space-between;
font-size: 12px;
display: none; padding: 8px 16px; background: #f7fafc;
border-bottom: 1px solid var(--border-color); align-items: center; justify-content: space-between; font-size: 12px;
}
.mail-bulk-actions.active { display: flex; }
.mail-bulk-actions.active {
display: flex;
}
/* 메일리스트 컨테이너 */
.mail-items-container {
flex: 1;
overflow-y: auto;
padding-bottom: 60px; /* 하단 고정 버튼 공간 확보 */
}
/* 메일 아이템 스타일 */
/* 2. Mail Items */
.mail-items-container { flex: 1; overflow-y: auto; padding-bottom: 60px; }
.mail-item {
padding: 16px;
border-bottom: 1px solid var(--border-color);
cursor: pointer;
transition: 0.2s;
display: flex;
align-items: flex-start;
padding: 16px; border-bottom: 1px solid var(--border-color); cursor: pointer;
display: flex; align-items: flex-start; transition: 0.2s;
}
.mail-item:hover { background: var(--bg-muted); }
.mail-item.active { background: var(--primary-lv-0); border-left: 4px solid var(--primary-color); }
.mail-item:hover {
background: var(--bg-muted);
}
.mail-item-checkbox { width: 16px; height: 16px; cursor: pointer; margin-right: 12px; margin-top: 2px; }
.mail-item-content { flex: 1; min-width: 0; }
.mail-item-info { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.mail-date { font-size: 11px; color: var(--text-sub); white-space: nowrap; }
.mail-item.active {
background: #E9EEED;
border-left: 4px solid var(--primary-color);
}
.mail-item-checkbox {
width: 16px;
height: 16px;
cursor: pointer;
margin-right: 12px;
margin-top: 2px;
}
.mail-item-content {
flex: 1;
min-width: 0;
}
.mail-item-info {
display: flex;
align-items: center;
gap: 12px;
}
.mail-date {
font-size: 11px;
color: var(--text-sub);
white-space: nowrap;
}
/* 텍스트형 삭제 버튼 스타일 */
.btn-mail-delete {
background: #f7fafc;
border: 1px solid var(--border-color);
color: #718096;
cursor: pointer;
font-size: 10px;
padding: 2px 8px;
transition: all 0.2s;
border-radius: 4px;
font-weight: 600;
background: #f7fafc; border: 1px solid var(--border-color); color: #718096;
font-size: 10px; padding: 2px 8px; border-radius: 4px; font-weight: 600;
}
.btn-mail-delete:hover { color: var(--error-color); background: #fff5f5; border-color: #feb2b2; }
.btn-mail-delete:hover {
color: #e53e3e;
background: #fff5f5;
border-color: #feb2b2;
}
/* 하단 버튼 고정 */
.address-book-footer {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
padding: 12px 16px;
border-top: 1px solid var(--border-color);
background: #fff;
flex-shrink: 0;
z-index: 5;
display: flex;
gap: 8px;
}
.mail-content-area {
flex: 1;
display: flex;
flex-direction: column;
overflow-y: auto;
border-right: 1px solid var(--border-color);
}
/* Mail Preview & Toggle Handle */
.mail-preview-area {
width: 0;
background: #f1f3f5;
display: flex;
flex-direction: column;
transition: all 0.3s ease;
overflow: visible;
position: relative;
border-left: 0px solid transparent;
}
.mail-preview-area.active {
width: 500px;
border-left: 1px solid var(--border-color);
}
.mail-preview-area > *:not(.preview-toggle-handle) {
opacity: 0;
transition: opacity 0.2s;
pointer-events: none;
}
.mail-preview-area.active > * {
opacity: 1;
pointer-events: auto;
}
.preview-toggle-handle {
position: absolute;
left: -20px;
top: 50%;
transform: translateY(-50%);
width: 20px;
height: 60px;
background: var(--primary-color);
color: #fff;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
border-radius: 8px 0 0 8px;
font-size: 10px;
box-shadow: -2px 0 5px rgba(0,0,0,0.1);
z-index: 10;
}
.preview-toggle-handle:hover {
background: var(--primary-lv-8);
}
.preview-header {
padding: 12px 16px;
background: #fff;
border-bottom: 1px solid var(--border-color);
display: flex;
justify-content: space-between;
align-items: center;
}
.preview-header h3 {
font-size: 14px;
font-weight: 700;
color: var(--primary-color);
}
.preview-content {
flex: 1;
padding: 20px;
overflow-y: auto;
display: flex;
justify-content: center;
align-items: flex-start;
}
.a4-container {
width: 100%;
background: #fff;
box-shadow: 0 0 20px rgba(0,0,0,0.1);
position: relative;
aspect-ratio: 1 / 1.414; /* A4 Ratio */
display: flex;
align-items: center;
justify-content: center;
}
.preview-placeholder {
color: var(--text-sub);
font-size: 13px;
text-align: center;
padding: 20px;
}
.preview-image {
max-width: 100%;
max-height: 100%;
object-fit: contain;
}
.mail-content-header {
padding: var(--space-lg);
border-bottom: 1px solid var(--border-color);
}
.mail-body {
padding: var(--space-lg);
line-height: 1.6;
min-height: 200px;
}
/* Attachments & AI Analysis */
.attachment-area {
padding: var(--space-lg);
border-top: 1px solid var(--border-color);
background: var(--bg-muted);
}
/* 3. Content Area */
.mail-content-area { flex: 1; display: flex; flex-direction: column; overflow-y: auto; border-right: 1px solid var(--border-color); }
.mail-content-header { padding: var(--space-lg); border-bottom: 1px solid var(--border-color); }
.mail-body { padding: var(--space-lg); line-height: 1.6; min-height: 200px; }
/* 4. Attachments & AI */
.attachment-area { padding: var(--space-lg); border-top: 1px solid var(--border-color); background: var(--bg-muted); }
.attachment-item {
display: flex;
align-items: center;
gap: var(--space-md);
background: #fff;
padding: var(--space-sm) var(--space-md);
border-radius: var(--radius-lg);
border: 1px solid var(--border-color);
margin-bottom: var(--space-sm);
cursor: pointer;
display: flex; align-items: center; gap: var(--space-md); background: #fff;
padding: 12px 20px; border-radius: var(--radius-lg);
border: 1px solid var(--border-color); margin-bottom: var(--space-sm); cursor: pointer;
transition: 0.2s;
}
.attachment-item:hover { border-color: var(--primary-color); box-shadow: var(--box-shadow); }
.attachment-item.active { background: var(--primary-lv-0); border-color: var(--primary-color); }
.attachment-item:hover {
border-color: var(--primary-color);
box-shadow: var(--box-shadow);
}
.attachment-item.active {
background: var(--primary-lv-0);
border-color: var(--primary-color);
}
.file-icon {
font-size: 20px;
flex-shrink: 0;
}
.file-details {
flex: 1;
overflow: hidden;
}
.file-name {
font-size: 12px;
font-weight: 700;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.file-size {
font-size: 10px;
color: var(--text-sub);
}
.file-details { flex: 1; min-width: 0; }
.file-name { font-size: 13px; font-weight: 700; max-width: 450px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 11px; color: var(--text-sub); }
.btn-group {
display: flex;
gap: var(--space-xs);
flex: 1;
justify-content: flex-end;
display: flex; align-items: center; gap: 12px; flex-shrink: 0; justify-content: flex-end;
}
.btn-upload {
padding: 6px 12px;
border-radius: 4px;
font-size: 11px;
font-weight: 700;
color: #fff;
padding: 6px 14px; border-radius: 6px; font-size: 11px; font-weight: 700;
color: #fff; border: none; cursor: pointer; transition: 0.2s; height: 32px;
}
.btn-ai {
background: var(--ai-gradient);
}
.btn-ai { background: var(--ai-gradient); }
.btn-ai:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-normal {
background: var(--primary-color);
}
.btn-normal { background: var(--primary-color); }
.btn-normal:hover { background: var(--primary-hover); transform: translateY(-1px); }
.ai-recommend {
font-size: 11px;
padding: 2px 6px;
border-radius: 4px;
font-weight: 700;
margin-left: 10px;
font-size: 11px; padding: 6px 12px; border-radius: 6px; font-weight: 600;
cursor: pointer; transition: 0.2s; display: inline-block;
max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ai-recommend.smart-mode { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.ai-recommend.manual-mode { background: #f1f5f9; color: #475569; border: 1px dashed #cbd5e1; }
.ai-recommend:hover { transform: scale(1.02); }
/* 5. Preview Area */
.mail-preview-area {
width: 0; background: #f8f9fa; display: flex; flex-direction: column;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative;
border-left: 0 solid transparent;
}
.ai-recommend.smart-mode {
background: linear-gradient(135deg, #f6f8ff 0%, #f0f4ff 100%);
color: #4a69bd;
border: 1px solid #d1d9ff;
.mail-preview-area.active {
width: 600px;
border-left: 1px solid var(--border-color);
visibility: visible;
}
.ai-recommend.manual-mode {
background: var(--hover-bg);
color: var(--text-sub);
border: 1px dashed var(--border-color);
font-weight: 400;
.preview-header {
height: 56px; padding: 0 24px; border-bottom: 1px solid var(--border-color);
display: flex; align-items: center; justify-content: space-between;
background: #fff; flex-shrink: 0;
}
.path-display {
cursor: pointer;
padding: 4px 10px;
border-radius: 6px;
transition: all 0.2s ease;
.preview-header h3 { font-size: 15px; font-weight: 800; color: var(--primary-color); margin: 0; }
#fullViewBtn {
background: var(--primary-lv-0) !important;
color: var(--primary-color) !important;
border: 1px solid var(--primary-lv-1) !important;
font-weight: 700 !important;
padding: 4px 16px !important;
border-radius: 4px !important;
font-size: 11px !important;
transition: 0.2s !important;
}
#fullViewBtn:hover { background: var(--primary-lv-1) !important; }
.preview-toggle-handle {
position: absolute; left: -20px; top: 50%; transform: translateY(-50%);
width: 20px; height: 60px; background: var(--primary-color); color: #fff;
display: flex; align-items: center; justify-content: center;
border-radius: 8px 0 0 8px; font-size: 10px; cursor: pointer;
box-shadow: -2px 0 5px rgba(0,0,0,0.1); z-index: 100;
}
.preview-toggle-handle:hover { background: var(--primary-hover); }
.a4-container {
flex: 1; padding: 30px; overflow-y: auto; background: #e9ecef;
display: flex; justify-content: center;
}
.a4-container iframe, .a4-container .preview-placeholder {
width: 100%; height: 100%; background: #fff;
box-shadow: 0 4px 20px rgba(0,0,0,0.08); border-radius: 4px;
}
.preview-placeholder {
display: flex; align-items: center; justify-content: center;
text-align: center; color: var(--text-sub); font-size: 13px; line-height: 1.6;
}
.mail-preview-area.active > * { opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; }
.mail-preview-area > *:not(.preview-toggle-handle) { opacity: 0; visibility: hidden; pointer-events: none; transition: 0.2s; }
/* 6. Footer & Others */
.address-book-footer {
position: absolute; bottom: 0; left: 0; width: 100%; padding: 12px 16px;
border-top: 1px solid var(--border-color); background: #fff; display: flex; gap: 8px; z-index: 5;
}
.file-log-area {
display: none;
width: 100%;
margin-top: 10px;
background: #1a202c;
border-radius: 4px;
padding: 12px;
font-family: monospace;
font-size: 11px;
color: #cbd5e0;
}
.file-log-area.active {
display: block;
}
.log-line {
margin-bottom: 2px;
}
.log-success {
color: #48bb78;
font-weight: 700;
}
.log-info {
color: #63b3ed;
}
/* Toggle Switch */
.switch {
position: relative;
display: inline-block;
width: 34px;
height: 20px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
display: none; width: 100%; margin-top: 10px; background: #1a202c;
border-radius: 4px; padding: 12px; font-family: monospace; font-size: 11px; color: #cbd5e0;
}
.file-log-area.active { display: block; }
.log-success { color: #48bb78; font-weight: 700; }
.switch { position: relative; display: inline-block; width: 34px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
transition: .4s;
border-radius: 20px;
position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
background-color: #ccc; transition: .4s; border-radius: 20px;
}
.slider:before {
position: absolute;
content: "";
height: 14px;
width: 14px;
left: 3px;
bottom: 3px;
background-color: white;
transition: .4s;
border-radius: 50%;
position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px;
background-color: white; transition: .4s; border-radius: 50%;
}
input:checked+.slider { background: var(--ai-gradient); }
input:checked+.slider:before { transform: translateX(14px); }
input:checked+.slider {
background: var(--ai-gradient);
}
input:checked+.slider:before {
transform: translateX(14px);
}
.ai-toggle-wrap {
/* Restore Path Selector Modal Specific Styles */
.select-group {
display: flex;
align-items: center;
gap: var(--space-sm);
font-size: 12px;
font-weight: 600;
color: var(--text-sub);
flex-direction: column;
gap: 8px;
}
input:checked~.ai-label {
color: #6d3dc2;
.select-group label {
font-size: 12px;
font-weight: 700;
color: var(--text-main);
}
.modal-select {
width: 100%;
height: 44px;
padding: 0 15px;
border: 1px solid var(--border-color);
border-radius: 8px;
background-color: #f9f9f9;
font-size: 14px;
color: #333;
outline: none;
transition: all 0.2s;
cursor: pointer;
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L2 4h8L6 8z'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 15px center;
}
.modal-select:focus {
border-color: var(--primary-color);
background-color: #fff;
box-shadow: 0 0 0 3px rgba(30, 81, 73, 0.1);
}
.modal-select option {
padding: 10px;
}