/* ============================================================
xmail 全局样式
- 主题 / 强调色 / 密度 / 字体 / 字号 / 行高 / 内容宽度全部通过 CSS 变量控制
- 由 theme.ts 在运行时写入 <html> 的 dataset 与 CSS 变量
============================================================ */
/* ---------- 设计令牌 ---------- */
:root {
--font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei',
'Helvetica Neue', Arial, sans-serif;
--font-serif: Georgia, 'Songti SC', 'SimSun', 'Times New Roman', serif;
--bg: #f5f6f8;
--bg-panel: #ffffff;
--bg-subtle: #eef1f5;
--bg-hover: #e9edf2;
--border: #e2e6ec;
--border-strong: #d2d8e1;
--text: #232a35;
--text-2: #5a6474;
--text-3: #8a93a2;
--danger: #d0524f;
--danger-soft: rgba(208, 82, 79, 0.12);
--success: #2f8a52;
--radius-sm: 8px;
--radius: 12px;
--radius-lg: 16px;
--shadow-sm: 0 1px 2px rgba(22, 28, 40, 0.05);
--shadow: 0 1px 2px rgba(22, 28, 40, 0.05), 0 10px 26px rgba(22, 28, 40, 0.07);
--shadow-lg: 0 24px 60px rgba(16, 22, 34, 0.22);
--line-height: 1.6;
--content-max: 900px;
--space-card: 20px;
--row-y: 11px;
--nav-y: 9px;
--accent: #5b6ef2;
--accent-strong: #4a5ce0;
--accent-soft: rgba(91, 110, 242, 0.14);
--accent-contrast: #ffffff;
color-scheme: light;
}
html[data-theme='dark'] {
--bg: #131519;
--bg-panel: #1a1d22;
--bg-subtle: #22262d;
--bg-hover: #272c34;
--border: #2b3038;
--border-strong: #3a414c;
--text: #e6eaf1;
--text-2: #a6aebc;
--text-3: #737d8c;
--danger: #e07a76;
--danger-soft: rgba(224, 122, 118, 0.14);
--success: #5ec08a;
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
--shadow: 0 1px 2px rgba(0, 0, 0, 0.32), 0 12px 30px rgba(0, 0, 0, 0.34);
--shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
color-scheme: dark;
}
html[data-density='compact'] {
--space-card: 14px;
--row-y: 7px;
--nav-y: 6px;
}
/* ---------- 基础重置 ---------- */
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body,
#root {
height: 100%;
}
html {
font-size: 15px;
}
body {
margin: 0;
font-family: var(--font-sans);
font-size: 1rem;
line-height: var(--line-height);
color: var(--text);
background:
radial-gradient(1100px 620px at 8% -14%, var(--accent-soft), transparent 60%),
radial-gradient(900px 520px at 100% -8%, rgba(120, 140, 180, 0.09), transparent 55%),
var(--bg);
background-attachment: fixed;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
html[data-theme='dark'] body {
background:
radial-gradient(1100px 620px at 8% -14%, rgba(91, 110, 242, 0.09), transparent 62%),
radial-gradient(900px 520px at 100% -8%, rgba(90, 105, 135, 0.08), transparent 55%),
var(--bg);
background-attachment: fixed;
}
html[data-font='serif'] body {
font-family: var(--font-serif);
}
button,
input,
select,
textarea {
font: inherit;
color: inherit;
}
button {
cursor: pointer;
}
button:disabled {
cursor: not-allowed;
opacity: 0.55;
}
a {
color: var(--accent-strong);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
h1,
h2,
h3,
p {
margin: 0;
}
:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 1px;
}
::-webkit-scrollbar {
width: 9px;
height: 9px;
}
::-webkit-scrollbar-thumb {
background: var(--border-strong);
border-radius: 999px;
border: 2px solid transparent;
background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
background: var(--text-3);
background-clip: content-box;
}
::-webkit-scrollbar-track {
background: transparent;
}
/* ---------- 通用按钮 ---------- */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 7px;
height: 36px;
padding: 0 14px;
font-size: 13.5px;
font-weight: 550;
color: var(--text);
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: 10px;
transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease,
box-shadow 0.15s ease, transform 0.1s ease;
white-space: nowrap;
}
.btn:hover {
background: var(--bg-subtle);
border-color: var(--border-strong);
box-shadow: var(--shadow-sm);
}
.btn:active {
transform: translateY(1px);
}
.btn-primary {
color: var(--accent-contrast);
background: linear-gradient(135deg, var(--accent), var(--accent-strong));
border-color: transparent;
box-shadow: 0 1px 2px rgba(20, 26, 40, 0.12), 0 6px 16px var(--accent-soft);
}
.btn-primary:hover {
background: linear-gradient(135deg, var(--accent-strong), var(--accent-strong));
border-color: transparent;
box-shadow: 0 2px 4px rgba(20, 26, 40, 0.16), 0 10px 22px var(--accent-soft);
}
.btn-small {
height: 30px;
padding: 0 10px;
font-size: 12.5px;
border-radius: 8px;
gap: 5px;
}
.btn-ghost {
background: transparent;
border-color: transparent;
}
.btn-ghost:hover {
background: var(--bg-subtle);
}
.btn-icon {
width: 34px;
height: 34px;
padding: 0;
border-radius: 9px;
}
.danger-text {
color: var(--danger) !important;
}
.danger-text:hover {
background: var(--danger-soft) !important;
border-color: transparent !important;
}
.spacer {
flex: 1;
}
/* ---------- 表单 ---------- */
.field {
display: flex;
flex-direction: column;
gap: 6px;
min-width: 0;
}
.field > label {
font-size: 12.5px;
font-weight: 600;
color: var(--text-2);
}
.field-hint {
font-size: 12px;
color: var(--text-3);
line-height: 1.5;
}
.input {
width: 100%;
height: 40px;
padding: 0 13px;
font-size: 14px;
color: var(--text);
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: 11px;
transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.input:hover {
border-color: var(--border-strong);
}
.input:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-soft);
}
select.input {
padding-right: 28px;
appearance: none;
background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%),
linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px;
background-size: 5px 5px, 5px 5px;
background-repeat: no-repeat;
}
.textarea {
height: auto;
min-height: 96px;
padding: 10px 12px;
line-height: 1.65;
resize: vertical;
}
.inline-error {
padding: 8px 11px;
font-size: 12.5px;
color: var(--danger);
background: var(--danger-soft);
border-radius: var(--radius-sm);
overflow-wrap: anywhere;
}
.form-error {
font-size: 13px;
color: var(--danger);
background: var(--danger-soft);
padding: 9px 12px;
border-radius: 10px;
}
.grid-2,
.grid-3 {
display: grid;
gap: 14px;
}
.grid-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.form-actions {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
margin-top: 4px;
}
.inline-hint {
margin-left: auto;
text-align: right;
}
.input-with-action {
display: flex;
gap: 8px;
}
.input-with-action .input {
flex: 1;
}
.number-row {
display: flex;
align-items: center;
gap: 8px;
}
.number-input {
width: 88px;
}
.number-input.wide {
width: 118px;
}
.number-unit {
font-size: 13px;
color: var(--text-3);
}
.inline-toggle {
display: inline-flex;
align-items: center;
gap: 7px;
font-size: 13px;
color: var(--text-2);
white-space: nowrap;
}
/* ---------- 开关 ---------- */
.toggle {
position: relative;
width: 40px;
height: 22px;
padding: 0;
background: var(--border-strong);
border: none;
border-radius: 999px;
transition: background 0.18s ease;
flex: none;
}
.toggle::after {
content: '';
position: absolute;
top: 3px;
left: 3px;
width: 16px;
height: 16px;
background: #fff;
border-radius: 50%;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
transition: transform 0.18s ease;
}
.toggle.on {
background: var(--accent);
}
.toggle.on::after {
transform: translateX(18px);
}
/* ---------- 分段选择器 ---------- */
.segmented {
display: inline-flex;
gap: 2px;
padding: 3px;
background: var(--bg-subtle);
border-radius: 10px;
flex-wrap: wrap;
}
.segmented > button {
min-height: 30px;
padding: 0 12px;
font-size: 12.5px;
font-weight: 500;
color: var(--text-2);
background: transparent;
border: none;
border-radius: 8px;
transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.segmented > button:hover {
color: var(--text);
}
.segmented > button.active {
color: var(--text);
background: var(--bg-panel);
box-shadow: var(--shadow-sm);
}
/* ---------- 滑块 ---------- */
.slider-row {
display: flex;
align-items: center;
gap: 12px;
}
.slider-row input[type='range'] {
width: 180px;
accent-color: var(--accent);
}
.slider-value {
min-width: 46px;
font-size: 12.5px;
color: var(--text-3);
font-variant-numeric: tabular-nums;
text-align: right;
}
/* ---------- 颜色选择 ---------- */
.swatches {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.swatch {
position: relative;
width: 30px;
height: 30px;
padding: 0;
border: 2px solid transparent;
border-radius: 50%;
box-shadow: 0 0 0 1px var(--border) inset;
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.swatch:hover {
transform: scale(1.08);
}
.swatch.active {
border-color: var(--bg-panel);
box-shadow: 0 0 0 2px var(--text);
}
.swatch-check {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
color: #fff;
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
/* ---------- 卡片 / 选择卡 ---------- */
.card {
padding: var(--space-card);
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-sm);
display: flex;
flex-direction: column;
gap: 16px;
transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
border-color: var(--border-strong);
box-shadow: var(--shadow);
}
.card-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
}
.card-title {
font-size: 14.5px;
font-weight: 680;
letter-spacing: -0.005em;
}
.card-desc {
margin-top: 5px;
font-size: 12.5px;
color: var(--text-3);
line-height: 1.58;
}
.choice-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
gap: 10px;
}
.choice {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 6px;
padding: 13px 14px;
font-size: 13.5px;
color: var(--text-2);
text-align: left;
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: 12px;
transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.choice:hover {
border-color: var(--border-strong);
background: var(--bg-subtle);
}
.choice.active {
color: var(--accent-strong);
background: var(--accent-soft);
border-color: var(--accent);
}
.choice-desc {
font-size: 12px;
font-weight: 400;
color: var(--text-3);
line-height: 1.5;
}
.choice.active .choice-desc {
color: var(--accent-strong);
opacity: 0.85;
}
/* ---------- 设置行 ---------- */
.setting-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 18px;
padding: 9px 0;
border-bottom: 1px dashed var(--border);
}
.setting-row:last-child {
border-bottom: none;
padding-bottom: 0;
}
.setting-label-wrap {
min-width: 0;
}
.setting-label {
font-size: 13.5px;
font-weight: 550;
}
.setting-hint {
margin-top: 3px;
font-size: 12px;
color: var(--text-3);
line-height: 1.5;
}
.setting-control {
display: flex;
align-items: center;
gap: 10px;
flex: none;
}
/* ---------- 空状态 / 加载 ---------- */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
padding: 46px 20px;
text-align: center;
}
.empty-icon {
display: flex;
align-items: center;
justify-content: center;
width: 52px;
height: 52px;
margin-bottom: 4px;
color: var(--text-3);
background: var(--bg-subtle);
border-radius: 16px;
}
.empty-title {
font-size: 14.5px;
font-weight: 600;
}
.empty-desc {
max-width: 320px;
font-size: 12.5px;
color: var(--text-3);
line-height: 1.6;
}
.empty-state .btn {
margin-top: 8px;
}
.spinner {
display: inline-block;
border: 2px solid var(--border-strong);
border-top-color: var(--accent);
border-radius: 50%;
animation: xmail-spin 0.7s linear infinite;
flex: none;
}
@keyframes xmail-spin {
to {
transform: rotate(360deg);
}
}
.panel-loading {
display: flex;
align-items: center;
justify-content: center;
padding: 32px;
}
/* ---------- 品牌标识 ---------- */
.brand-logo {
display: flex;
align-items: center;
justify-content: center;
width: 34px;
height: 34px;
color: #fff;
background: linear-gradient(135deg, var(--accent), var(--accent-strong));
border-radius: 10px;
box-shadow: var(--shadow-sm);
flex: none;
}
.brand-logo.large {
width: 46px;
height: 46px;
border-radius: 14px;
}
/* ---------- 弹窗 ---------- */
.modal-backdrop {
position: fixed;
inset: 0;
z-index: 60;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
background: rgba(14, 18, 27, 0.45);
backdrop-filter: blur(3px);
animation: xmail-fade 0.16s ease;
}
@keyframes xmail-fade {
from {
opacity: 0;
}
}
.modal {
display: flex;
flex-direction: column;
width: min(560px, 100%);
max-height: 88vh;
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: 20px;
box-shadow: var(--shadow-lg);
overflow: hidden;
animation: xmail-pop 0.18s ease;
}
.modal.wide {
width: min(780px, 100%);
}
@keyframes xmail-pop {
from {
opacity: 0;
transform: translateY(10px) scale(0.985);
}
}
.modal-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 16px 18px;
border-bottom: 1px solid var(--border);
}
.modal-head h2 {
font-size: 15.5px;
font-weight: 650;
}
.modal-body {
display: flex;
flex-direction: column;
gap: 14px;
padding: 18px;
overflow-y: auto;
}
.modal-foot {
display: flex;
align-items: center;
gap: 10px;
padding: 14px 18px;
border-top: 1px solid var(--border);
background: var(--bg-subtle);
}
/* ---------- Toast ---------- */
.toast-stack {
position: fixed;
left: 50%;
bottom: 26px;
z-index: 80;
display: flex;
flex-direction: column;
gap: 8px;
transform: translateX(-50%);
pointer-events: none;
}
.toast {
padding: 10px 16px;
font-size: 13px;
color: var(--accent-contrast);
background: #2b3240;
border-radius: 10px;
box-shadow: var(--shadow);
animation: xmail-toast 0.2s ease;
max-width: min(560px, 90vw);
}
.toast.error {
background: var(--danger);
}
@keyframes xmail-toast {
from {
opacity: 0;
transform: translateY(8px);
}
}
/* ---------- 启动页 / 登录页 ---------- */
.splash {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 18px;
height: 100%;
background: var(--bg);
}
.login-page {
display: flex;
align-items: center;
justify-content: center;
min-height: 100%;
padding: 24px;
background: radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), transparent 70%), var(--bg);
}
.login-card {
position: relative;
display: flex;
flex-direction: column;
gap: 16px;
width: min(408px, 100%);
padding: 32px 30px;
overflow: hidden;
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: 22px;
box-shadow: var(--shadow);
}
.login-card::before {
content: '';
position: absolute;
top: -90px;
right: -70px;
width: 200px;
height: 200px;
background: var(--accent-soft);
border-radius: 50%;
pointer-events: none;
}
.login-card > * {
position: relative;
z-index: 1;
}
.login-brand {
display: flex;
align-items: center;
gap: 12px;
}
.login-name {
font-size: 19px;
font-weight: 700;
letter-spacing: 0.01em;
}
.login-tagline {
font-size: 12px;
color: var(--text-3);
}
.login-title {
margin-top: 4px;
font-size: 20px;
font-weight: 650;
}
.login-subtitle {
margin-top: -10px;
font-size: 13px;
color: var(--text-3);
}
.login-submit {
height: 40px;
margin-top: 4px;
}
.login-tip {
font-size: 12px;
color: var(--text-3);
text-align: center;
}
/* ---------- 邮件主界面 ---------- */
.mail-app {
display: grid;
grid-template-columns: 256px 372px minmax(0, 1fr);
height: 100vh;
height: 100dvh;
min-height: 0;
overflow: hidden;
background: transparent;
}
/* 侧边栏 */
.sidebar {
display: flex;
flex-direction: column;
gap: 14px;
min-height: 0;
padding: 18px 14px;
background: var(--bg-panel);
border-right: 1px solid var(--border);
overflow: hidden;
}
.brand {
display: flex;
align-items: center;
gap: 11px;
padding: 2px 6px 6px;
}
.brand-name {
font-size: 16px;
font-weight: 700;
letter-spacing: 0.01em;
}
.brand-sub {
font-size: 11px;
color: var(--text-3);
}
.compose-btn {
width: 100%;
height: 42px;
margin-bottom: 2px;
font-weight: 600;
border-radius: 11px;
}
.folder-list {
display: flex;
flex-direction: column;
gap: 2px;
}
.folder-item,
.account-item {
display: flex;
align-items: center;
gap: 11px;
width: 100%;
padding: var(--nav-y) 12px;
font-size: 13.5px;
color: var(--text-2);
text-align: left;
background: transparent;
border: none;
border-radius: 11px;
transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.folder-item:hover,
.account-item:hover {
background: var(--bg-subtle);
color: var(--text);
}
.folder-item.active,
.account-item.active {
color: var(--accent-strong);
background: var(--accent-soft);
font-weight: 600;
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.folder-item.active svg,
.account-item.active svg {
color: var(--accent);
}
.folder-item .badge {
margin-left: auto;
}
.badge {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 20px;
height: 20px;
padding: 0 6px;
font-size: 11px;
font-weight: 600;
color: var(--accent-contrast);
background: var(--accent);
border-radius: 999px;
font-variant-numeric: tabular-nums;
}
.sidebar-section-title {
padding: 8px 11px 0;
font-size: 10.5px;
font-weight: 600;
letter-spacing: 0.07em;
text-transform: uppercase;
color: var(--text-3);
}
.account-list {
display: flex;
flex-direction: column;
gap: 2px;
min-height: 0;
overflow-y: auto;
}
.account-dot {
width: 8px;
height: 8px;
border-radius: 50%;
box-shadow: 0 0 0 3px var(--bg-subtle);
flex: none;
}
.account-name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.add-account {
color: var(--text-3);
border: 1px dashed var(--border-strong);
margin-top: 4px;
justify-content: center;
}
.sidebar-footer {
display: flex;
flex-direction: column;
gap: 2px;
margin-top: auto;
padding-top: 12px;
border-top: 1px solid var(--border);
}
.sidebar-action {
display: flex;
align-items: center;
gap: 10px;
padding: 8px 11px;
font-size: 13px;
color: var(--text-2);
text-align: left;
background: transparent;
border: none;
border-radius: 9px;
}
.sidebar-action:hover {
background: var(--bg-subtle);
color: var(--text);
}
.sidebar-user {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 11px 2px;
font-size: 11.5px;
color: var(--text-3);
min-width: 0;
}
.sidebar-user-avatar {
display: inline-flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
font-size: 11px;
font-weight: 700;
color: var(--accent-strong);
background: var(--accent-soft);
border-radius: 50%;
flex: none;
}
.sidebar-user-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* 邮件列表 */
.list-pane {
display: flex;
flex-direction: column;
min-width: 0;
min-height: 0;
overflow: hidden;
background: var(--bg-panel);
border-right: 1px solid var(--border);
}
.list-head {
display: flex;
flex: none;
flex-direction: column;
gap: 11px;
padding: 16px 18px 14px;
border-bottom: 1px solid var(--border);
}
.list-title-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
}
.list-title-main {
display: flex;
align-items: center;
gap: 8px;
min-width: 0;
}
.mobile-menu-btn {
display: none;
flex: none;
}
.sidebar-backdrop {
display: none;
}
.list-title {
display: flex;
align-items: center;
gap: 8px;
font-size: 17px;
font-weight: 680;
letter-spacing: -0.01em;
}
.list-count {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 22px;
height: 20px;
padding: 0 7px;
font-size: 11px;
font-weight: 600;
color: var(--text-3);
background: var(--bg-subtle);
border-radius: 999px;
font-variant-numeric: tabular-nums;
}
.list-sub {
margin-top: 3px;
font-size: 11.5px;
color: var(--text-3);
}
.search-box {
display: flex;
align-items: center;
gap: 8px;
height: 36px;
padding: 0 11px;
color: var(--text-3);
background: var(--bg-subtle);
border: 1px solid transparent;
border-radius: 11px;
transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.search-box:focus-within {
background: var(--bg-panel);
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-box input {
flex: 1;
min-width: 0;
height: 100%;
font-size: 13px;
background: transparent;
border: none;
outline: none;
}
.search-clear {
display: inline-flex;
padding: 2px;
color: var(--text-3);
background: transparent;
border: none;
border-radius: 5px;
}
.search-clear:hover {
color: var(--text);
background: var(--bg-hover);
}
.filter-chip {
display: inline-flex;
align-items: center;
gap: 6px;
align-self: flex-start;
padding: 4px 9px;
font-size: 12px;
color: var(--accent-strong);
background: var(--accent-soft);
border-radius: 999px;
}
.filter-chip button {
display: inline-flex;
padding: 1px;
color: inherit;
background: transparent;
border: none;
border-radius: 50%;
}
.filter-chip button:hover {
background: rgba(0, 0, 0, 0.08);
}
/* 列表筛选 / 批量选择 */
.list-filters {
display: flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
}
.filter-tabs {
display: inline-flex;
gap: 2px;
padding: 3px;
background: var(--bg-subtle);
border-radius: 9px;
}
.filter-tab {
display: inline-flex;
align-items: center;
gap: 5px;
height: 26px;
padding: 0 10px;
font-size: 12px;
font-weight: 550;
color: var(--text-2);
background: transparent;
border: none;
border-radius: 7px;
transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.filter-tab:hover {
color: var(--text);
}
.filter-tab.active {
color: var(--text);
background: var(--bg-panel);
box-shadow: var(--shadow-sm);
}
.filter-count {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 16px;
height: 16px;
padding: 0 4px;
font-size: 10.5px;
font-weight: 600;
color: var(--text-3);
background: var(--bg-panel);
border-radius: 999px;
font-variant-numeric: tabular-nums;
}
.filter-tab.active .filter-count {
color: var(--accent-strong);
background: var(--accent-soft);
}
.select-mode-btn {
color: var(--text-2);
}
.batch-bar {
display: flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
padding: 7px 9px;
background: var(--accent-soft);
border-radius: 10px;
}
.batch-count {
font-size: 12px;
font-weight: 600;
color: var(--accent-strong);
white-space: nowrap;
}
.msg-check {
display: flex;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
margin-top: 9px;
color: #fff;
background: var(--bg-panel);
border: 1.5px solid var(--border-strong);
border-radius: 6px;
flex: none;
transition: background 0.15s ease, border-color 0.15s ease;
}
.msg-check.checked {
background: var(--accent);
border-color: var(--accent);
}
.message-item.selecting {
cursor: pointer;
}
.message-item.selected {
background: var(--accent-soft);
border-color: var(--accent);
}
.message-item.selected .msg-avatar {
box-shadow: 0 0 0 2px var(--bg-panel);
}
.message-list {
flex: 1;
min-height: 0;
padding: 8px 8px 12px;
overflow-y: auto;
overscroll-behavior: contain;
}
.list-loading {
display: flex;
align-items: center;
justify-content: center;
padding: 40px;
}
/* 邮箱同步 / 文件夹拉取失败提示 */
.sync-error-banner {
display: flex;
flex: none;
flex-direction: column;
gap: 8px;
margin: 10px 12px 0;
padding: 11px 12px;
background: var(--danger-soft);
border-radius: 12px;
}
.sync-error-head {
display: flex;
align-items: center;
gap: 6px;
font-size: 12.5px;
color: var(--danger);
}
.sync-error-close {
display: inline-flex;
margin-left: auto;
padding: 2px;
color: var(--text-3);
background: transparent;
border: none;
border-radius: 5px;
}
.sync-error-close:hover {
color: var(--text);
background: var(--bg-subtle);
}
.sync-error-list {
display: flex;
flex-direction: column;
gap: 4px;
max-height: 88px;
margin: 0;
padding: 0;
overflow-y: auto;
font-size: 12px;
line-height: 1.5;
color: var(--text-2);
list-style: none;
}
.sync-error-list li {
display: flex;
gap: 6px;
min-width: 0;
}
.sync-error-name {
flex: none;
font-weight: 600;
color: var(--danger);
}
.sync-error-message {
min-width: 0;
overflow-wrap: anywhere;
}
.sync-error-actions {
display: flex;
align-items: center;
gap: 10px;
}
.sync-error-hint {
flex: 1;
font-size: 11.5px;
color: var(--text-3);
}
/* 邮件右键操作菜单 */
.context-menu {
position: fixed;
z-index: 80;
min-width: 184px;
padding: 5px;
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: 11px;
box-shadow: var(--shadow-lg);
}
.context-menu-item {
display: flex;
align-items: center;
gap: 9px;
width: 100%;
height: 34px;
padding: 0 10px;
font-size: 13px;
text-align: left;
color: var(--text);
background: transparent;
border: none;
border-radius: 7px;
}
.context-menu-item:hover {
background: var(--bg-subtle);
}
.context-menu-sep {
height: 1px;
margin: 5px 6px;
background: var(--border);
}
.message-item {
position: relative;
display: flex;
align-items: flex-start;
gap: 11px;
width: 100%;
margin: 2px 0;
padding: 11px 12px;
text-align: left;
color: var(--text);
background: transparent;
border: 1px solid transparent;
border-radius: 12px;
transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.message-item:hover {
background: var(--bg-subtle);
border-color: var(--border);
}
.message-item.active {
background: var(--accent-soft);
border-color: transparent;
box-shadow: inset 3px 0 0 var(--accent);
}
.message-item.unread .msg-from,
.message-item.unread .msg-subject {
font-weight: 650;
color: var(--text);
}
.msg-avatar {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
font-size: 13px;
font-weight: 700;
letter-spacing: -0.01em;
border-radius: 50%;
flex: none;
}
.message-item.unread .msg-avatar {
box-shadow: 0 0 0 2px var(--accent-soft);
}
/* 未读邮件:左侧圆点 + 淡强调色底 + 更重的标题,已读则整体弱化 */
.message-item.unread:not(.active):not(.selected) {
background: linear-gradient(90deg, var(--accent-soft), transparent 58%);
}
.message-item.unread:not(.active):not(.selected):hover {
background: linear-gradient(90deg, var(--accent-soft), var(--bg-hover) 58%);
}
.message-item.unread::before {
content: '';
position: absolute;
top: 50%;
left: 4px;
width: 6px;
height: 6px;
background: var(--accent);
border-radius: 50%;
transform: translateY(-50%);
}
.message-item.unread.selecting::before {
display: none;
}
.message-item.unread .msg-from {
font-weight: 600;
}
.message-item.unread .msg-subject {
font-weight: 700;
}
.message-item.unread .msg-date {
color: var(--accent-strong);
font-weight: 600;
}
.message-item.unread .msg-snippet {
color: var(--text-2);
}
.message-item:not(.unread) .msg-from {
color: var(--text-3);
}
.message-item:not(.unread) .msg-subject {
color: var(--text-2);
}
.msg-main {
display: block;
flex: 1;
min-width: 0;
}
.msg-top {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 10px;
min-width: 0;
}
.msg-from-wrap {
display: flex;
align-items: center;
gap: 6px;
min-width: 0;
}
.msg-account-dot {
width: 6px;
height: 6px;
border-radius: 50%;
opacity: 0.85;
flex: none;
}
.msg-from {
display: block;
min-width: 0;
overflow: hidden;
font-size: 13px;
color: var(--text-2);
text-overflow: ellipsis;
white-space: nowrap;
}
.msg-date {
flex: none;
font-size: 11px;
color: var(--text-3);
font-variant-numeric: tabular-nums;
}
.msg-subject-row {
display: flex;
align-items: center;
gap: 6px;
min-width: 0;
margin-top: 3px;
}
.msg-subject {
min-width: 0;
overflow: hidden;
font-size: 13.5px;
color: var(--text);
letter-spacing: -0.005em;
text-overflow: ellipsis;
white-space: nowrap;
}
.msg-clip {
flex: none;
color: var(--text-3);
}
.msg-snippet {
display: block;
margin-top: 3px;
overflow: hidden;
font-size: 12px;
line-height: 1.45;
color: var(--text-3);
text-overflow: ellipsis;
white-space: nowrap;
}
.load-more-wrap {
display: flex;
justify-content: center;
padding: 14px;
}
/* 阅读区 */
.reader {
display: flex;
flex-direction: column;
min-width: 0;
min-height: 0;
overflow: hidden;
background: var(--bg-panel);
}
.reader-empty {
display: flex;
flex: 1;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
color: var(--text-3);
}
.reader-empty-icon {
display: flex;
align-items: center;
justify-content: center;
width: 62px;
height: 62px;
margin-bottom: 6px;
color: var(--text-3);
background: var(--bg-subtle);
border-radius: 20px;
}
.reader-empty-title {
font-size: 14.5px;
font-weight: 600;
color: var(--text-2);
}
.reader-empty-desc {
font-size: 12.5px;
}
.reader-toolbar {
display: flex;
flex: none;
align-items: center;
gap: 6px;
padding: 10px 18px;
border-bottom: 1px solid var(--border);
}
.reader-toolbar-date {
font-size: 11.5px;
color: var(--text-3);
}
.reader-scroll {
flex: 1;
min-height: 0;
overflow-y: auto;
}
.reader-inner {
width: 100%;
max-width: var(--content-max);
margin: 0 auto;
padding: 32px 36px 64px;
}
.reader-subject {
font-size: 1.5rem;
font-weight: 680;
line-height: 1.32;
letter-spacing: -0.02em;
}
.reader-meta {
display: flex;
align-items: center;
gap: 12px;
margin-top: 18px;
padding: 14px 16px;
background: var(--bg-subtle);
border: 1px solid var(--border);
border-radius: 14px;
}
.avatar {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
font-size: 15px;
font-weight: 700;
color: var(--accent-strong);
background: var(--accent-soft);
border-radius: 50%;
flex: none;
}
.reader-meta-main {
min-width: 0;
}
.reader-from {
display: flex;
align-items: center;
gap: 6px;
font-size: 13.5px;
flex-wrap: wrap;
}
.reader-addr {
font-size: 12px;
color: var(--text-3);
}
.reader-account-tag {
display: inline-flex;
align-items: center;
gap: 5px;
height: 20px;
padding: 0 8px;
font-size: 11px;
font-weight: 600;
border-radius: 999px;
}
.reader-account-dot {
width: 6px;
height: 6px;
border-radius: 50%;
flex: none;
}
.reader-recipients {
margin-top: 4px;
font-size: 12px;
color: var(--text-3);
overflow-wrap: anywhere;
}
.attachment-bar {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 16px;
}
.attachment-chip {
display: inline-flex;
align-items: center;
gap: 7px;
max-width: 100%;
padding: 7px 10px;
font-size: 12.5px;
color: var(--text-2);
background: var(--bg-subtle);
border: 1px solid var(--border);
border-radius: 9px;
}
.attachment-chip:hover {
color: var(--text);
border-color: var(--border-strong);
text-decoration: none;
}
.attachment-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.attachment-size {
font-size: 11px;
color: var(--text-3);
flex: none;
}
.chip-remove {
display: inline-flex;
padding: 1px;
color: var(--text-3);
background: transparent;
border: none;
border-radius: 50%;
}
.chip-remove:hover {
color: var(--danger);
background: var(--danger-soft);
}
.mail-frame {
display: block;
width: 100%;
height: 64vh;
min-height: 380px;
margin-top: 20px;
background: #fff;
border: 1px solid var(--border);
border-radius: 12px;
}
.reader-text {
margin-top: 18px;
font-family: inherit;
font-size: 1rem;
line-height: var(--line-height);
color: var(--text);
white-space: pre-wrap;
word-break: break-word;
}
/* ---------- 写邮件 ---------- */
.compose {
display: flex;
flex-direction: column;
gap: 10px;
}
.compose-row {
display: flex;
align-items: center;
gap: 10px;
}
.compose-label {
width: 42px;
flex: none;
font-size: 12.5px;
color: var(--text-3);
}
.compose-row .input {
flex: 1;
}
.compose-select {
max-width: 320px;
}
.compose-row-actions {
display: flex;
gap: 8px;
}
.link-btn {
padding: 0;
font-size: 12.5px;
color: var(--accent-strong);
background: transparent;
border: none;
}
.link-btn:hover {
text-decoration: underline;
}
.compose-body {
width: 100%;
min-height: 260px;
padding: 12px 14px;
color: var(--text);
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: 10px;
resize: vertical;
}
.compose-body:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px var(--accent-soft);
}
.compose-toolbar {
display: flex;
align-items: center;
gap: 10px;
}
.compose-size {
font-size: 12px;
color: var(--text-3);
}
/* ---------- 设置页 ---------- */
.settings-page {
display: grid;
grid-template-columns: 244px minmax(0, 1fr);
height: 100vh;
height: 100dvh;
min-height: 0;
background: transparent;
}
.settings-sidebar {
display: flex;
flex-direction: column;
gap: 8px;
min-height: 0;
padding: 18px 14px;
background: var(--bg-panel);
border-right: 1px solid var(--border);
overflow: hidden;
}
.settings-sidebar-head {
display: flex;
align-items: center;
gap: 8px;
padding: 2px 4px 10px;
}
.settings-sidebar-title {
font-size: 14.5px;
font-weight: 650;
}
.settings-nav {
display: flex;
flex-direction: column;
gap: 2px;
overflow-y: auto;
}
.settings-nav-item {
display: flex;
align-items: center;
gap: 10px;
width: 100%;
padding: 10px 12px;
font-size: 13.5px;
color: var(--text-2);
text-align: left;
background: transparent;
border: none;
border-radius: 11px;
transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.settings-nav-item:hover {
background: var(--bg-subtle);
color: var(--text);
}
.settings-nav-item.active {
color: var(--accent-strong);
background: var(--accent-soft);
font-weight: 600;
box-shadow: inset 3px 0 0 var(--accent);
}
.settings-nav-item.active svg {
color: var(--accent);
}
.settings-sidebar-foot {
display: flex;
flex-direction: column;
gap: 4px;
margin-top: auto;
padding-top: 10px;
border-top: 1px solid var(--border);
}
.settings-user {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 8px;
min-width: 0;
}
.settings-user-avatar {
display: flex;
align-items: center;
justify-content: center;
width: 26px;
height: 26px;
font-size: 12px;
font-weight: 650;
color: var(--accent-strong);
background: var(--accent-soft);
border-radius: 50%;
flex: none;
}
.settings-user-name {
overflow: hidden;
font-size: 12.5px;
font-weight: 600;
text-overflow: ellipsis;
white-space: nowrap;
}
.settings-main {
min-width: 0;
min-height: 0;
overflow-y: auto;
}
.settings-content {
display: flex;
flex-direction: column;
gap: 18px;
width: 100%;
max-width: var(--content-max);
margin: 0 auto;
padding: 34px 36px 80px;
}
.panel-heading {
padding: 2px 2px 4px;
}
.panel-heading h2 {
display: flex;
align-items: center;
gap: 10px;
font-size: 22px;
font-weight: 700;
letter-spacing: -0.02em;
}
.panel-heading h2::before {
content: '';
width: 3px;
height: 20px;
background: linear-gradient(180deg, var(--accent), var(--accent-strong));
border-radius: 999px;
}
.panel-heading p {
margin-top: 6px;
font-size: 13px;
color: var(--text-3);
line-height: 1.65;
max-width: 660px;
}
.settings-empty {
padding: 26px;
font-size: 13px;
color: var(--text-3);
text-align: center;
}
/* 邮箱账号卡片 */
.account-cards {
display: flex;
flex-direction: column;
gap: 10px;
}
.account-card {
display: flex;
flex-direction: column;
gap: 12px;
padding: 16px;
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: 14px;
transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.account-card:hover {
background: var(--bg-panel);
border-color: var(--border-strong);
box-shadow: var(--shadow-sm);
}
.account-card-main {
display: flex;
align-items: flex-start;
gap: 12px;
min-width: 0;
}
.account-avatar {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
font-size: 14px;
font-weight: 700;
color: var(--accent-strong);
background: var(--accent-soft);
border-radius: 12px;
flex: none;
}
.account-card-info {
min-width: 0;
flex: 1;
}
.account-card-title {
display: flex;
align-items: baseline;
gap: 8px;
flex-wrap: wrap;
font-size: 14px;
font-weight: 650;
}
.account-card-email {
font-size: 12px;
font-weight: 400;
color: var(--text-3);
overflow-wrap: anywhere;
}
.account-card-meta {
margin-top: 3px;
font-size: 12px;
color: var(--text-3);
overflow-wrap: anywhere;
}
.account-card-actions {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: 8px;
}
/* 服务器配置块 */
.server-group {
display: flex;
flex-direction: column;
gap: 7px;
}
.server-group-title {
font-size: 12.5px;
font-weight: 600;
color: var(--text-2);
}
.server-row {
display: grid;
grid-template-columns: minmax(0, 1fr) 96px auto;
align-items: center;
gap: 8px;
}
.port-input {
text-align: center;
}
.test-result {
display: flex;
flex-direction: column;
gap: 6px;
font-size: 12.5px;
}
.test-ok {
display: flex;
align-items: center;
gap: 6px;
color: var(--success);
}
.test-fail {
display: flex;
align-items: center;
gap: 6px;
color: var(--danger);
overflow-wrap: anywhere;
}
/* 备份:文件列表与范围 */
.file-list {
display: flex;
flex-direction: column;
gap: 6px;
max-height: 260px;
overflow-y: auto;
}
.file-item {
display: flex;
align-items: center;
gap: 9px;
padding: 9px 11px;
font-size: 13px;
color: var(--text-2);
border: 1px solid var(--border);
border-radius: 10px;
cursor: pointer;
transition: border-color 0.15s ease, background 0.15s ease;
}
.file-item:hover {
background: var(--bg-subtle);
}
.file-item.active {
color: var(--accent-strong);
background: var(--accent-soft);
border-color: var(--accent);
}
.file-item input {
accent-color: var(--accent);
}
.file-name {
flex: 1;
min-width: 0;
overflow: hidden;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
}
.file-meta {
flex: none;
font-size: 11.5px;
color: var(--text-3);
font-variant-numeric: tabular-nums;
}
.restore-mode {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.scope-block {
display: flex;
flex-direction: column;
gap: 8px;
padding-top: 10px;
border-top: 1px dashed var(--border);
}
.scope-title {
font-size: 12.5px;
font-weight: 600;
color: var(--text-2);
}
.scope-list {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 6px 16px;
}
.scope-item {
display: flex;
align-items: center;
gap: 8px;
font-size: 13px;
color: var(--text-2);
min-width: 0;
}
.scope-item input {
accent-color: var(--accent);
flex: none;
}
.scope-email {
font-size: 11.5px;
color: var(--text-3);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* 预览 */
.preview-mail {
padding: 18px;
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: 12px;
}
.preview-subject {
margin-bottom: 10px;
font-size: 1.08em;
font-weight: 650;
line-height: 1.4;
}
.preview-from {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 10px;
font-size: 0.85em;
color: var(--text-3);
}
.preview-avatar {
display: inline-flex;
align-items: center;
justify-content: center;
width: 26px;
height: 26px;
font-size: 0.75em;
font-weight: 700;
border-radius: 50%;
flex: none;
}
.preview-body {
color: var(--text-2);
}
.preview-signature {
margin: 12px 0 0;
padding-top: 10px;
font-family: inherit;
font-size: 0.92em;
color: var(--text-3);
border-top: 1px dashed var(--border);
white-space: pre-wrap;
}
/* 账户信息 / 用户管理 */
.info-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
}
.info-item {
display: flex;
flex-direction: column;
gap: 4px;
}
.info-label {
font-size: 12px;
color: var(--text-3);
}
.info-value {
font-size: 14px;
font-weight: 550;
overflow-wrap: anywhere;
}
.tag {
display: inline-flex;
align-items: center;
height: 21px;
padding: 0 8px;
font-size: 11px;
font-weight: 600;
color: var(--text-3);
background: var(--bg-subtle);
border-radius: 999px;
white-space: nowrap;
}
.tag-accent {
color: var(--accent-strong);
background: var(--accent-soft);
}
.tag-muted {
color: var(--text-3);
background: transparent;
border: 1px solid var(--border);
}
.user-list {
display: flex;
flex-direction: column;
}
.user-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 14px;
padding: 11px 0;
border-bottom: 1px solid var(--border);
flex-wrap: wrap;
}
.user-row:last-child {
padding-bottom: 0;
border-bottom: none;
}
.user-row-main {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
}
.user-info {
min-width: 0;
}
.user-name {
font-size: 13.5px;
font-weight: 600;
}
.user-meta {
margin-top: 2px;
font-size: 11.5px;
color: var(--text-3);
}
.user-actions {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
/* 同步状态 */
.sync-banner {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 12px;
font-size: 13px;
color: var(--accent-strong);
background: var(--accent-soft);
border-radius: 10px;
}
.status-list {
display: flex;
flex-direction: column;
}
.status-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 10px 0;
border-bottom: 1px solid var(--border);
}
.status-row:last-child {
padding-bottom: 0;
border-bottom: none;
}
.status-main {
display: flex;
flex-direction: column;
min-width: 0;
}
.status-name {
font-size: 13.5px;
font-weight: 600;
}
.status-email {
font-size: 11.5px;
color: var(--text-3);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.status-meta {
flex: none;
max-width: 55%;
font-size: 12px;
color: var(--text-3);
text-align: right;
overflow-wrap: anywhere;
}
.status-error {
color: var(--danger);
}
/* 关于 */
.about-hero {
display: flex;
align-items: center;
gap: 14px;
}
.about-name {
font-size: 20px;
font-weight: 700;
letter-spacing: 0.01em;
}
.about-version {
margin-top: 2px;
font-size: 12px;
color: var(--text-3);
}
.about-text {
font-size: 13.5px;
color: var(--text-2);
line-height: 1.75;
}
.about-footer {
padding: 12px 0 4px;
font-size: 12px;
color: var(--text-3);
text-align: center;
}
/* ---------- 响应式(桌面优先,窄屏时压缩侧栏) ---------- */
@media (max-width: 1180px) {
.mail-app {
grid-template-columns: 220px 330px minmax(0, 1fr);
}
.settings-page {
grid-template-columns: 210px minmax(0, 1fr);
}
.settings-content {
padding: 24px 22px 70px;
}
}
@media (max-width: 940px) {
.grid-2,
.grid-3 {
grid-template-columns: minmax(0, 1fr);
}
.choice-grid,
.restore-mode,
.scope-list {
grid-template-columns: minmax(0, 1fr);
}
.setting-row {
flex-direction: column;
align-items: flex-start;
gap: 8px;
}
.mail-app {
grid-template-columns: 190px 290px minmax(0, 1fr);
}
.reader-inner {
padding: 20px 18px 48px;
}
.settings-sidebar {
padding: 12px 8px;
}
.settings-nav-item {
font-size: 12.5px;
}
}
/* ---------- 平板与手机自适应 ---------- */
@media (max-width: 1024px) {
.mail-app {
grid-template-columns: 210px 320px minmax(0, 1fr);
}
.settings-page {
grid-template-columns: 210px minmax(0, 1fr);
}
}
@media (max-width: 820px) {
.mail-app {
display: block;
position: relative;
height: 100dvh;
overflow: hidden;
}
/* 侧边栏改为抽屉 */
.sidebar {
position: fixed;
top: 0;
bottom: 0;
left: 0;
z-index: 45;
width: 282px;
max-width: 84vw;
transform: translateX(-100%);
transition: transform 0.22s ease;
box-shadow: var(--shadow-lg);
border-right: 1px solid var(--border);
}
.sidebar.open {
transform: translateX(0);
}
.sidebar-backdrop {
display: block;
position: fixed;
inset: 0;
z-index: 40;
background: rgba(14, 18, 27, 0.45);
opacity: 0;
visibility: hidden;
transition: opacity 0.2s ease, visibility 0.2s ease;
backdrop-filter: blur(2px);
}
.sidebar-backdrop.open {
opacity: 1;
visibility: visible;
}
.mobile-menu-btn {
display: inline-flex;
}
.list-pane {
height: 100dvh;
border-right: none;
}
/* 阅读区在手机上以全屏层展示 */
.reader {
display: none;
}
.reader.reader-open {
display: flex;
position: fixed;
inset: 0;
z-index: 50;
height: 100dvh;
}
.reader-toolbar {
padding: 8px 10px;
}
.reader-toolbar-date {
display: none;
}
.reader-inner {
padding: 20px 18px 48px;
}
.reader-subject {
font-size: 1.35rem;
}
.mail-frame {
height: 58vh;
min-height: 300px;
}
/* 设置页:顶部横向菜单 + 单列内容 */
.settings-page {
display: flex;
flex-direction: column;
height: 100dvh;
}
.settings-sidebar {
flex: none;
flex-direction: column;
padding: 10px 12px;
border-right: none;
border-bottom: 1px solid var(--border);
overflow: visible;
}
.settings-sidebar-head {
padding: 0 0 8px;
}
.settings-nav {
flex-direction: row;
gap: 4px;
overflow-x: auto;
overflow-y: hidden;
padding-bottom: 2px;
}
.settings-nav-item {
width: auto;
flex: none;
white-space: nowrap;
padding: 8px 10px;
font-size: 12.5px;
}
.settings-nav-item.active {
box-shadow: inset 0 -2px 0 var(--accent);
}
.settings-sidebar-foot {
display: none;
}
.settings-main {
flex: 1;
min-height: 0;
overflow-y: auto;
}
.settings-content {
padding: 18px 14px 56px;
gap: 14px;
}
.panel-heading h2 {
font-size: 19px;
}
.card {
padding: 16px;
border-radius: 14px;
gap: 14px;
}
.grid-2,
.grid-3 {
grid-template-columns: minmax(0, 1fr);
}
.modal-backdrop {
padding: 10px;
}
.modal {
width: 100%;
max-height: 92vh;
border-radius: 18px;
}
.modal-body {
padding: 14px;
}
.modal-head,
.modal-foot {
padding: 12px 14px;
}
.server-row {
grid-template-columns: minmax(0, 1fr) 88px;
}
.server-row .inline-toggle {
grid-column: 1 / -1;
}
.compose-row {
flex-wrap: wrap;
}
.compose-label {
width: 100%;
}
.info-grid {
grid-template-columns: 1fr;
}
.list-head {
padding: 12px 14px;
}
.message-list {
padding: 6px;
}
.toast-stack {
left: 12px;
right: 12px;
bottom: 16px;
transform: none;
}
}
@media (max-width: 520px) {
.sidebar {
width: 86vw;
}
.reader-inner {
padding: 16px 14px 40px;
}
.reader-subject {
font-size: 1.25rem;
}
.mail-frame {
height: 54vh;
}
.list-filters {
gap: 4px;
}
.filter-tab {
padding: 0 8px;
}
.batch-bar {
gap: 4px;
}
.account-card-actions {
justify-content: flex-start;
}
.login-card {
padding: 24px 18px;
}
.login-title {
font-size: 18px;
}
.settings-sidebar-title {
font-size: 13px;
}
}