/* MailHub 自定义样式（Tailwind 补充） */

* { box-sizing: border-box; }
html, body { height: 100%; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
::-webkit-scrollbar-track { background: transparent; }

/* 富文本编辑器 */
.rte { min-height: 220px; outline: none; }
.rte:empty::before { content: attr(data-placeholder); color: #94a3b8; }
.rte p { margin: 0 0 8px; }
.rte ul { list-style: disc; padding-left: 1.4em; margin: 0 0 8px; }
.rte ol { list-style: decimal; padding-left: 1.4em; margin: 0 0 8px; }
.rte a { color: #4f46e5; text-decoration: underline; }

/* 邮件内容预览 iframe */
.mail-body iframe { width: 100%; border: 0; background: #fff; border-radius: 0.5rem; }

/* 动画 */
@keyframes mh-fade { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none;} }
.mh-fade { animation: mh-fade .18s ease-out; }

/* 邮件列表行 hover */
.mail-row:hover { background: #f8fafc; }
.mail-row.active { background: #eef2ff; }

/* 侧边栏导航项 */
.nav-item { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border-radius: .55rem; font-size: .875rem; color: #475569; cursor: pointer; transition: all .15s; }
.nav-item:hover { background: #f1f5f9; color: #1e293b; }
.nav-item.active { background: #eef2ff; color: #4338ca; font-weight: 600; }
.nav-item .ic { width: 1.05rem; height: 1.05rem; flex-shrink: 0; }

/* 徽章 */
.mh-badge { display: inline-flex; align-items: center; padding: .1rem .5rem; border-radius: 9999px; font-size: .7rem; font-weight: 500; }

/* 表格通用 */
.mh-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; font-weight: 600; }
.mh-table td { font-size: .875rem; }

/* toast 动画 */
@keyframes mh-toast { from { opacity: 0; transform: translateX(16px);} to { opacity: 1; transform: none;} }
.mh-toast { animation: mh-toast .2s ease-out; }

/* 开关 */
.mh-switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.mh-switch input { opacity: 0; width: 0; height: 0; }
.mh-switch .track { position: absolute; inset: 0; background: #cbd5e1; border-radius: 9999px; transition: .2s; cursor: pointer; }
.mh-switch .track::before { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.mh-switch input:checked + .track { background: #4f46e5; }
.mh-switch input:checked + .track::before { transform: translateX(16px); }
