feat: 메일 관리 UI 개편 및 시스템 구조 최적화

- UI/UX: 메일 관리 레이아웃 고도화 및 미리보기 토글 핸들 도입
- 기능: 주소록 CRUD 기능 추가 및 모달 인터페이스 개선
- 구조: CSS 파일 기능별 분리 및 Jinja2 템플릿 엔진 도입
- 백엔드: OCR 비동기 처리 및 CSV 파싱(BOM) 안정화
- 데이터: 2026.03.04 기준 최신 프로젝트 현황 업데이트
This commit is contained in:
2026-03-04 17:58:54 +09:00
parent ff9146cfee
commit d246b08799
20 changed files with 2074 additions and 1138 deletions

281
style/common.css Normal file
View File

@@ -0,0 +1,281 @@
:root {
/* Design Tokens */
--primary-color: #1E5149;
--primary-lv-0: #e9eeed;
--primary-lv-1: #D2DCDB;
--primary-lv-8: #193833;
--bg-default: #FFFFFF;
--bg-muted: #F9FAFB;
--text-main: #2D3748;
--text-sub: #718096;
--border-color: #E2E8F0;
--hover-bg: #F7FAFC;
--header-gradient: linear-gradient(90deg, #193833 0%, #1e5149 100%);
--ai-gradient: linear-gradient(180deg, #da8cf1 0%, #8bb1f2 100%);
--space-xs: 4px;
--space-sm: 8px;
--space-md: 16px;
--space-lg: 32px;
--space-xl: 64px;
--radius-sm: 4px;
--radius-lg: 8px;
--fz-h1: 20px;
--fz-h2: 16px;
--fz-body: 13px;
--box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
--box-shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
}
/* Base Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Pretendard', sans-serif;
font-size: var(--fz-body);
color: var(--text-main);
background: var(--bg-default);
min-height: 100vh;
}
/* 메일 관리자 전용: 전체 스크롤 방지 */
body:has(.mail-wrapper) {
height: 100vh;
overflow: hidden;
}
input, select, textarea, button {
font-family: 'Pretendard', sans-serif;
}
a {
text-decoration: none;
color: inherit;
}
button {
cursor: pointer;
border: none;
font-family: inherit;
transition: all 0.2s ease;
}
/* Layout Utilities */
.flex-center {
display: flex;
align-items: center;
justify-content: center;
}
.flex-between {
display: flex;
align-items: center;
justify-content: space-between;
}
/* Components: Topbar */
.topbar {
width: 100%;
background: var(--header-gradient);
color: #fff;
padding: 0 var(--space-lg);
position: fixed;
top: 0;
height: 36px;
display: flex;
align-items: center;
z-index: 1000;
}
.topbar-header {
margin-right: 60px;
font-weight: 700;
}
.topbar-header h2 {
font-size: 16px;
color: white;
}
.nav-list {
display: flex;
list-style: none;
gap: var(--space-sm);
}
.nav-item {
padding: 4px 8px;
border-radius: 4px;
color: rgba(255, 255, 255, 0.8);
transition: 0.2s;
font-size: 14px;
cursor: pointer;
}
.nav-item:hover {
background: var(--primary-lv-1);
color: #fff;
}
.nav-item.active {
background: var(--primary-lv-0);
color: var(--primary-color) !important;
font-weight: 700;
}
/* Modals */
.modal-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.6);
z-index: 2000;
justify-content: center;
align-items: center;
}
.modal-content {
background: white;
padding: 24px;
border-radius: 12px;
width: 90%;
max-width: 500px;
box-shadow: var(--box-shadow-lg);
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
border-bottom: 1px solid var(--border-color);
padding-bottom: 12px;
}
.modal-header h3 {
margin: 0;
font-size: 16px;
}
.modal-close {
cursor: pointer;
font-size: 20px;
}
/* Modal Form Elements */
.select-group {
margin-bottom: 16px;
text-align: left;
}
.select-group label {
display: block;
font-size: 12px;
font-weight: 700;
color: var(--text-sub);
margin-bottom: 6px;
}
.modal-select {
width: 100%;
padding: 10px;
border: 1px solid var(--border-color);
border-radius: 6px;
font-size: 14px;
background: #fff;
outline: none;
}
.modal-select:focus {
border-color: var(--primary-color);
}
/* Data Tables inside Modals */
.data-table {
width: 100%;
border-collapse: collapse;
font-size: 12px;
}
.data-table th,
.data-table td {
padding: 10px 8px;
border-bottom: 1px solid var(--border-color);
text-align: left;
}
.data-table th {
color: var(--text-sub);
font-weight: 600;
background: var(--bg-muted);
}
.data-table tr:hover {
background: var(--hover-bg);
}
/* Utils: Buttons */
._button-xsmall {
padding: 2px 8px;
font-size: 11px;
border-radius: 4px;
background: var(--bg-muted);
border: 1px solid var(--border-color);
}
._button-small {
padding: 6px 14px;
font-size: 12px;
border-radius: 6px;
background: var(--primary-color);
color: #fff;
font-weight: 600;
}
._button-medium {
padding: 10px 20px;
background: var(--primary-color);
color: #fff;
border-radius: 6px;
font-weight: 700;
}
.btn-confirm {
width: 100%;
padding: 12px;
background: var(--primary-color);
color: white;
border: none;
border-radius: 8px;
font-weight: 700;
cursor: pointer;
margin-top: 10px;
}
/* Spinner */
.spinner {
display: none;
width: 16px;
height: 16px;
border: 2px solid rgba(255, 255, 255, .3);
border-radius: 50%;
border-top-color: #fff;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
.badge {
background: #eee;
padding: 2px 6px;
border-radius: 4px;
font-size: 11px;
}

264
style/dashboard.css Normal file
View File

@@ -0,0 +1,264 @@
/* Portal (Index) */
.portal-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: calc(100vh - 36px);
background: var(--bg-muted);
padding: var(--space-lg);
margin-top: 36px;
}
.portal-header {
text-align: center;
margin-bottom: 50px;
}
.portal-header h1 {
font-size: 28px;
color: var(--primary-color);
margin-bottom: 10px;
}
.portal-header p {
color: var(--text-sub);
font-size: 15px;
}
.button-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 30px;
width: 100%;
max-width: 800px;
}
.portal-card {
background: #fff;
border: 1px solid var(--border-color);
border-radius: 12px;
padding: 40px;
text-align: center;
transition: 0.3s;
width: 100%;
box-shadow: var(--box-shadow);
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
}
.portal-card:hover {
transform: translateY(-5px);
border-color: var(--primary-color);
box-shadow: var(--box-shadow-lg);
}
.portal-card .icon {
font-size: 32px;
width: 64px;
height: 64px;
background: var(--bg-muted);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
transition: 0.3s;
}
.portal-card:hover .icon {
background: var(--primary-color);
color: #fff;
}
.portal-card h2 {
font-size: 20px;
font-weight: 700;
}
.portal-card p {
color: var(--text-sub);
font-size: 14px;
line-height: 1.5;
}
@media screen and (max-width: 600px) {
.button-grid {
grid-template-columns: 1fr;
}
}
/* Dashboard List & Console */
.log-console {
background: #000;
color: #0f0;
font-family: monospace;
padding: 15px;
margin-bottom: 20px;
border-radius: 4px;
max-height: 200px;
overflow-y: auto;
font-size: 12px;
line-height: 1.5;
}
.log-console-header {
color: #fff;
border-bottom: 1px solid #333;
margin-bottom: 10px;
padding-bottom: 5px;
font-weight: bold;
}
.accordion-container {
border-top: 1px solid var(--border-color);
}
.accordion-list-header,
.accordion-header {
display: grid;
grid-template-columns: 2.5fr 1fr 1fr 0.8fr 2fr;
gap: var(--space-md);
padding: var(--space-md) var(--space-lg);
align-items: center;
cursor: pointer;
}
.accordion-list-header {
font-size: 11px;
font-weight: 700;
color: var(--text-sub);
border-bottom: 1px solid var(--text-main);
cursor: default;
}
.accordion-item {
border-bottom: 1px solid var(--border-color);
}
.accordion-item:hover {
background: var(--primary-lv-0);
}
.repo-title {
font-weight: 700;
color: var(--primary-color);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.repo-files {
text-align: center;
font-weight: 600;
}
.repo-log {
font-size: 11px;
color: var(--text-sub);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.accordion-body {
display: none;
padding: var(--space-lg);
background: var(--bg-muted);
border-top: 1px solid var(--border-color);
}
.accordion-item.active .accordion-body {
display: block;
}
.status-warning {
background: #fff9e6;
}
.status-error {
background: #fee9e7;
}
.warning-text {
color: #f21d0d !important;
font-weight: 700;
}
/* Accordion Multi-level (Continent/Country) */
.continent-group,
.country-group {
margin-bottom: 10px;
}
.continent-header,
.country-header {
background: #fff;
padding: 12px 20px;
border: 1px solid var(--border-color);
border-radius: 8px;
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
font-weight: 700;
transition: all 0.2s;
}
.continent-header {
background: var(--primary-color);
color: white;
border: none;
font-size: 15px;
}
.country-header {
font-size: 14px;
color: var(--text-main);
margin-top: 5px;
}
.continent-body,
.country-body {
display: none;
padding: 10px 0 10px 20px;
}
.active>.continent-body,
.active>.country-body {
display: block;
}
/* Detail Views */
.detail-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
.detail-section h4 {
font-size: 13px;
margin-bottom: 10px;
color: var(--text-main);
border-left: 3px solid var(--primary-color);
padding-left: 8px;
}
.data-table {
width: 100%;
border-collapse: collapse;
font-size: 12px;
}
.data-table th,
.data-table td {
padding: 8px;
border-bottom: 1px solid var(--border-color);
text-align: left;
}
.data-table th {
color: var(--text-sub);
font-weight: 600;
}

404
style/mail.css Normal file
View File

@@ -0,0 +1,404 @@
/* Mail Manager Layout */
.mail-wrapper {
display: flex;
height: calc(100vh - 36px);
margin-top: 36px;
background: #fff;
overflow: hidden;
}
.mail-sidebar {
display: none; /* 사이드바 삭제 */
}
.mail-list-area {
width: 320px;
border-right: 1px solid var(--border-color);
display: flex;
flex-direction: column;
height: 100%;
background: #fff;
}
.mail-tabs {
display: flex;
border-bottom: 1px solid var(--border-color);
background: #f8f9fa;
flex-shrink: 0;
width: 100%;
}
.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;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4px;
}
.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;
}
.search-bar {
padding: var(--space-md);
border-bottom: 1px solid var(--border-color);
background: #fff;
flex-shrink: 0;
margin-bottom: 8px; /* 하단 리스트와 간격 추가 */
}
.mail-items-container {
flex: 1;
overflow-y: auto;
}
.mail-item {
padding: var(--space-md);
border-bottom: 1px solid var(--border-color);
cursor: pointer;
transition: 0.2s;
}
.mail-item:hover {
background: var(--bg-muted);
}
.mail-item.active {
background: #E9EEED;
border-left: 4px solid var(--primary-color);
}
.address-book-footer {
padding: 12px;
border-top: 1px solid var(--border-color);
background: #fff;
flex-shrink: 0;
}
.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);
}
.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;
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);
}
.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);
}
.btn-group {
display: flex;
gap: var(--space-xs);
flex: 1;
justify-content: flex-end;
}
.btn-upload {
padding: 6px 12px;
border-radius: 4px;
font-size: 11px;
font-weight: 700;
color: #fff;
}
.btn-ai {
background: var(--ai-gradient);
}
.btn-normal {
background: var(--primary-color);
}
.ai-recommend {
font-size: 11px;
padding: 2px 6px;
border-radius: 4px;
font-weight: 700;
margin-left: 10px;
}
.ai-recommend.smart-mode {
background: linear-gradient(135deg, #f6f8ff 0%, #f0f4ff 100%);
color: #4a69bd;
border: 1px solid #d1d9ff;
}
.ai-recommend.manual-mode {
background: var(--hover-bg);
color: var(--text-sub);
border: 1px dashed var(--border-color);
font-weight: 400;
}
.path-display {
cursor: pointer;
padding: 4px 10px;
border-radius: 6px;
transition: all 0.2s ease;
}
.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;
}
.slider {
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%;
}
input:checked+.slider {
background: var(--ai-gradient);
}
input:checked+.slider:before {
transform: translateX(14px);
}
.ai-toggle-wrap {
display: flex;
align-items: center;
gap: var(--space-sm);
font-size: 12px;
font-weight: 600;
color: var(--text-sub);
}
input:checked~.ai-label {
color: #6d3dc2;
}

View File

@@ -1,123 +1,3 @@
:root {
/* Design Tokens */
--primary-color: #1E5149; --primary-lv-0: #e9eeed; --primary-lv-1: #D2DCDB; --primary-lv-8: #193833;
--bg-default: #FFFFFF; --bg-muted: #F9FAFB;
--text-main: #2D3748; --text-sub: #718096; --border-color: #E2E8F0;
--header-gradient: linear-gradient(90deg, #193833 0%, #1e5149 100%);
--ai-gradient: linear-gradient(180deg, #da8cf1 0%, #8bb1f2 100%);
--space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 32px; --space-xl: 64px;
--radius-sm: 4px; --radius-lg: 8px;
--fz-h1: 20px; --fz-h2: 16px; --fz-body: 13px;
}
/* Base Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Pretendard', sans-serif; font-size: var(--fz-body); color: var(--text-main); background: var(--bg-default); min-height: 100vh; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: inherit; }
/* Components: Topbar */
.topbar { width: 100%; background: var(--header-gradient); color: #fff; padding: 0 var(--space-lg); position: fixed; top: 0; height: 36px; display: flex; align-items: center; z-index: 1000; }
.topbar-header { margin-right: 60px; font-weight: 700; }
.nav-list { display: flex; list-style: none; gap: var(--space-sm); }
.nav-item { padding: 4px 8px; border-radius: 4px; color: rgba(255,255,255,0.8); transition: 0.2s; font-size: 14px; }
.nav-item:hover { background: var(--primary-lv-1); color: #fff; }
.nav-item.active { background: var(--primary-lv-0); color: var(--primary-color) !important; font-weight: 700; }
/* Global Layout */
.main-content { margin-top: 36px; padding: var(--space-lg) var(--space-xl); max-width: 1400px; margin-left: auto; margin-right: auto; }
header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: var(--space-lg); padding-bottom: var(--space-sm); border-bottom: 1px solid var(--border-color); }
header h1 { font-size: var(--fz-h1); color: var(--primary-color); }
/* Portal (Index) */
.portal-container { display: flex; flex-direction: column; align-items: center; justify-content: center; height: calc(100vh - 36px); background: var(--bg-muted); padding: var(--space-lg); }
.portal-card { background: #fff; border: 1px solid var(--border-color); border-radius: 12px; padding: 40px; text-align: center; transition: 0.3s; width: 100%; max-width: 380px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.portal-card:hover { transform: translateY(-5px); border-color: var(--primary-color); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.portal-card .icon { font-size: 32px; margin-bottom: 20px; width: 64px; height: 64px; background: var(--bg-muted); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: 0.3s; margin-left: auto; margin-right: auto; }
.portal-card:hover .icon { background: var(--primary-color); color: #fff; }
/* Dashboard List & Console */
.log-console { background:#000; color:#0f0; font-family:monospace; padding:15px; margin-bottom:20px; border-radius:4px; max-height:200px; overflow-y:auto; font-size:12px; }
.accordion-container { border-top: 1px solid var(--border-color); }
.accordion-list-header, .accordion-header { display: grid; grid-template-columns: 2.5fr 1fr 1fr 0.8fr 2fr; gap: var(--space-md); padding: var(--space-md) var(--space-lg); align-items: center; }
.accordion-list-header { font-size: 11px; font-weight: 700; color: var(--text-sub); border-bottom: 1px solid var(--text-main); }
.accordion-item { border-bottom: 1px solid var(--border-color); }
.accordion-item:hover { background: var(--primary-lv-0); }
.repo-title { font-weight: 700; color: var(--primary-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-files { text-align: center; font-weight: 600; }
.repo-log { font-size: 11px; color: var(--text-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.accordion-body { display: none; padding: var(--space-lg); background: var(--bg-muted); border-top: 1px solid var(--border-color); }
.accordion-item.active .accordion-body { display: block; }
.status-warning { background: #fff9e6; } .status-error { background: #fee9e7; }
.warning-text { color: #f21d0d !important; font-weight: 700; }
/* Mail Manager Refined */
.mail-wrapper { display: flex; height: calc(100vh - 36px); margin-top: 36px; background: #fff; overflow: hidden; }
.mail-sidebar { width: 240px; border-right: 1px solid var(--border-color); padding: var(--space-md); background: var(--bg-muted); }
.project-select { width: 100%; padding: var(--space-sm); border-radius: var(--radius-sm); border: 1px solid var(--border-color); margin-bottom: var(--space-lg); font-weight: 700; background: #fff; }
.folder-item { padding: var(--space-sm) var(--space-md); border-radius: 4px; cursor: pointer; margin-bottom: 2px; font-weight: 500; display: flex; justify-content: space-between; }
.folder-item:hover { background: var(--primary-lv-0); }
.folder-item.active { background: var(--primary-color); color: #fff; }
.mail-list-area { width: 380px; border-right: 1px solid var(--border-color); display: flex; flex-direction: column; }
.search-bar { padding: var(--space-md); border-bottom: 1px solid var(--border-color); background: var(--bg-muted); }
.search-bar input { width: 100%; padding: 8px; border-radius: 4px; border: 1px solid var(--border-color); margin-bottom: var(--space-sm); }
.mail-item { padding: var(--space-md); border-bottom: 1px solid var(--border-color); cursor: pointer; transition: 0.2s; }
.mail-item:hover { background: var(--bg-muted); }
.mail-item.active { background: #E9EEED; border-left: 4px solid var(--primary-color); }
.mail-content-area { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }
.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; }
.attachment-area { padding: var(--space-lg); border-top: 1px solid var(--border-color); background: var(--bg-muted); }
.attachment-item { display: flex; align-items: center; justify-content: space-between; 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); }
.file-info { display: flex; align-items: center; gap: var(--space-sm); flex: 1; }
.ai-recommend { font-size: 11px; color: #6d3dc2; background: #f1ecf9; padding: 2px 6px; border-radius: 4px; font-weight: 700; margin-left: 10px; }
.ai-log-console {
margin-top: var(--space-md);
background: #1a202c; /* dark gray */
color: #a0aec0;
padding: var(--space-md);
border-radius: var(--radius-lg);
font-family: 'Courier New', Courier, monospace;
font-size: 11px;
line-height: 1.5;
max-height: 150px;
overflow-y: auto;
}
.ai-log-console .log-entry { margin-bottom: 4px; border-left: 2px solid #4a5568; padding-left: 8px; }
.ai-log-console .highlight { color: #63b3ed; font-weight: 700; }
.ai-log-console .success { color: #48bb78; }
.btn-group { display: flex; gap: var(--space-xs); }
.btn-upload { padding: 6px 12px; border-radius: 4px; font-size: 11px; font-weight: 700; color: #fff; }
.btn-ai { background: var(--ai-gradient); }
.btn-normal { background: var(--primary-color); }
.btn-upload:hover { opacity: 0.9; transform: translateY(-1px); }
/* File-specific Log Accordion */
.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; }
.slider { 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%; }
input:checked + .slider { background: var(--ai-gradient); }
input:checked + .slider:before { transform: translateX(14px); }
.ai-toggle-wrap { display: flex; align-items: center; gap: var(--space-sm); font-size: 12px; font-weight: 600; color: var(--text-sub); }
input:checked ~ .ai-label { color: #6d3dc2; }
/* Utils */
.sync-btn { background: var(--primary-color); color: #fff; padding: 8px 16px; border-radius: var(--radius-lg); font-weight: 700; }
.badge { background: #eee; padding: 2px 6px; border-radius: 4px; font-size: 11px; }
.toggle-icon { transition: 0.2s; }
.active > .continent-header .toggle-icon, .active > .country-header .toggle-icon { transform: rotate(180deg); }
@import url('common.css');
@import url('dashboard.css');
@import url('mail.css');