/* ==================== 全局重置 ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

#app { height: 100vh; }

/* ==================== 容器 ==================== */
.app-container { height: 100vh; }

/* ==================== 侧边栏 ==================== */
.sidebar {
    background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 25px 20px;
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 35px;
}
.sidebar-header h2 { font-size: 20px; font-weight: 600; }

.sidebar-menu { flex: 1; }

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 8px;
    font-size: 14px;
}
.menu-item:hover { background: rgba(255, 255, 255, 0.15); }
.menu-item.active { background: rgba(255, 255, 255, 0.25); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.menu-item .el-icon { font-size: 20px; width: 20px; height: 20px; }

.sidebar-stats {
    background: rgba(255, 255, 255, 0.12);
    padding: 18px 15px;
    border-radius: 10px;
    text-align: center;
    margin-top: auto;
}
.stats-icon { font-size: 24px; margin-bottom: 8px; }
.stats-label { font-size: 14px; color: rgba(255, 255, 255, 0.85); margin-bottom: 5px; }
.stats-value { font-size: 28px; font-weight: 600; }

/* ==================== 主内容区 ==================== */
.main-content {
    background: #f5f7fa;
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.page-wrapper {
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.page-header {
    background: white;
    padding: 25px 35px 20px;
    border-bottom: 1px solid #ebeef5;
}
.page-header h1 { font-size: 22px; color: #303133; font-weight: 600; margin-bottom: 6px; }
.page-subtitle { font-size: 14px; color: #909399; }

/* ==================== 工具栏 ==================== */
.toolbar {
    background: white;
    padding: 15px 35px;
    display: flex;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid #ebeef5;
    flex-wrap: wrap;
}
.search-input { width: 240px; }
.group-select { width: 160px; }
.toolbar-actions { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }

/* ==================== 表格 ==================== */
.table-wrapper {
    flex: 1;
    background: white;
    margin: 15px;
    border-radius: 8px;
    padding: 15px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.pagination-wrapper {
    background: white;
    padding: 15px 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #ebeef5;
}
.select-all-tip { font-size: 13px; color: #e6a23c; }

/* 账号单元格 */
.account-cell { display: flex; align-items: center; gap: 6px; width: 100%; }
.account-email { flex: 1; font-size: 13px; }
.account-pwd { flex: 1; font-family: monospace; font-size: 12px; }
.token-text { flex: 1; font-family: monospace; font-size: 12px; color: #606266; }
.copy-icon { cursor: pointer; color: #909399; transition: color 0.2s; flex-shrink: 0; }
.copy-icon:hover { color: #409eff; }

/* 分组标签 */
.group-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid;
}
.group-color-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

/* 权限单元格 */
.perm-cell { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.perm-badge { font-weight: bold; }
.perm-check { font-size: 12px; color: #67c23a; }

/* ==================== 导入对话框 ==================== */
.import-tips { background: #f4f4f5; padding: 12px 16px; border-radius: 6px; margin-bottom: 12px; }
.import-tips p { margin-bottom: 6px; font-size: 13px; color: #606266; }
.import-tips ul { padding-left: 20px; }
.import-tips li { font-size: 12px; color: #606266; margin-bottom: 4px; }
.import-hint { color: #e6a23c; font-size: 12px !important; }
.import-count { margin-top: 10px; font-size: 13px; color: #606266; }

/* ==================== 分组管理 ==================== */
.group-list {
    padding: 25px 35px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    overflow-y: auto;
}
.group-card {
    background: white;
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-left: 4px solid;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}
.group-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.group-color { width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0; }
.group-info { flex: 1; min-width: 0; }
.group-name { font-size: 15px; font-weight: 600; color: #303133; margin-bottom: 4px; }
.group-count { font-size: 13px; color: #909399; }

/* 颜色选择 */
.color-presets { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.color-dot {
    width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
    border: 2px solid transparent; transition: transform 0.15s;
}
.color-dot:hover { transform: scale(1.15); }
.color-dot.active { border-color: #303133; transform: scale(1.15); }

/* 删除分组 */
.delete-group-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-height: 300px; overflow-y: auto; }
.delete-group-item { padding: 10px 12px; border: 1px solid #ebeef5; border-radius: 6px; cursor: pointer; transition: all 0.2s; }
.delete-group-item:hover { background: #f5f7fa; }
.delete-group-item.selected { border-color: #f56c6c; background: #fef0f0; }

/* ==================== 总览 ==================== */
.stat-card { margin-bottom: 20px; }
.stat-content { display: flex; align-items: center; gap: 20px; }
.stat-icon {
    width: 64px; height: 64px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: white;
}
.stat-value { font-size: 28px; font-weight: 700; color: #303133; }
.stat-label { font-size: 14px; color: #909399; margin-top: 4px; }

.data-table-card { margin: 20px; }
.card-header { display: flex; justify-content: space-between; align-items: center; }

/* ==================== 邮件对话框 ==================== */
.email-toolbar { display: flex; gap: 12px; margin-bottom: 12px; }
.email-container {
    display: flex;
    height: 520px;
    border: 1px solid #ebeef5;
    border-radius: 6px;
    overflow: hidden;
}
.email-list {
    width: 300px;
    border-right: 1px solid #ebeef5;
    overflow-y: auto;
    background: #fafafa;
}
.email-item {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}
.email-item:hover { background: #ecf5ff; }
.email-item.active { background: #d9ecff; border-left: 3px solid #409eff; }
.email-sender { font-size: 14px; font-weight: 600; color: #303133; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-subject { font-size: 13px; color: #606266; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-meta { font-size: 12px; color: #909399; }
.email-detail {
    flex: 1;
    padding: 20px 28px;
    overflow-y: auto;
    background: white;
}
.email-detail.empty { display: flex; align-items: center; justify-content: center; }
.detail-header { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #ebeef5; }
.detail-header h3 { font-size: 18px; margin-bottom: 10px; color: #303133; }
.detail-meta { display: flex; gap: 20px; font-size: 13px; color: #909399; flex-wrap: wrap; }
.detail-body { font-size: 14px; color: #303133; line-height: 1.7; }
.detail-body img { max-width: 100%; }

/* ==================== 右键菜单 ==================== */
.context-menu {
    position: fixed;
    background: white;
    border: 1px solid #ebeef5;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    list-style: none;
    padding: 4px 0;
    z-index: 9999;
    min-width: 140px;
}
.context-menu li {
    padding: 8px 16px;
    font-size: 13px;
    color: #606266;
    cursor: pointer;
    transition: background 0.15s;
}
.context-menu li:hover { background: #ecf5ff; color: #409eff; }

/* Element Plus 全局调整 */
.el-dialog__body { padding-top: 10px; }
.el-button--small { padding: 7px 10px; }

/* 响应式 */
@media (max-width: 1200px) {
    .sidebar { width: 180px !important; flex: 0 0 180px !important; }
    .search-input { width: 180px; }
}
/* ============================================================
   邮箱管家 v20260903 | 作者：AI虎哥 | QQ：282865654 | https://3se.cc
   ============================================================ */

/* 作者信息横幅 */
.author-banner {
    background: linear-gradient(90deg, #fef3c7 0%, #fde68a 50%, #fef3c7 100%);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 10px 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #92400e;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.15);
}
.author-banner-icon {
    font-size: 18px;
    flex-shrink: 0;
}
.author-banner-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.author-link {
    color: #b45309;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dashed #f59e0b;
    padding: 0 2px;
    transition: all 0.2s;
}
.author-link:hover {
    color: #d97706;
    background: #fef9c3;
    border-bottom-color: #d97706;
    text-decoration: none;
}

@media (max-width: 768px) {
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar-actions { margin-left: 0; justify-content: flex-start; }
    .email-container { flex-direction: column; height: auto; }
    .email-list { width: 100%; height: 240px; border-right: none; border-bottom: 1px solid #ebeef5; }
    .author-banner { flex-direction: column; align-items: flex-start; gap: 4px; }
}
