* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; max-width: 720px; margin: 0 auto; padding: 16px; color: #222; background: #fafafa; }
header h1 { margin: 0 0 4px; font-size: 20px; }
.hint { color: #888; font-size: 13px; margin: 4px 0 16px; }
.panel { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 20px; margin-bottom: 16px; }
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; border-radius: 4px; padding: 8px 14px; border: 1px solid transparent; }
button.primary { background: #1677ff; color: #fff; }
button.primary:hover { background: #4096ff; }
button.secondary { background: #fff; border-color: #d9d9d9; }
button.secondary:hover { border-color: #1677ff; color: #1677ff; }
button.small { padding: 4px 10px; font-size: 13px; }
button.big { padding: 16px 28px; font-size: 16px; width: 100%; }
.alias-box { display: flex; gap: 8px; margin-bottom: 8px; }
.alias-box input { flex: 1; padding: 10px; font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; font-size: 15px; border: 1px solid #d9d9d9; border-radius: 4px; }
.msg-list { list-style: none; padding: 0; margin: 8px 0; }
.msg-list li { padding: 10px; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
.msg-list li:hover { background: #f5f8ff; }
.msg-list .from { font-weight: 600; }
.msg-list .subj { color: #444; }
.msg-list .date { color: #999; font-size: 12px; }
.msg-list .empty { color: #999; text-align: center; padding: 30px; }
.msg-detail { margin-top: 12px; border-top: 1px solid #eee; padding-top: 12px; }
.meta { color: #666; font-size: 13px; }
.body { background: #fafafa; border: 1px solid #eee; padding: 10px; max-height: 400px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
iframe.body { width: 100%; height: 400px; }
.tab { background: transparent; border: none; padding: 6px 12px; border-bottom: 2px solid transparent; cursor: pointer; }
.tab.active { border-color: #1677ff; color: #1677ff; }

/* 持有页操作按钮换行 */
.actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.actions-row .label { color: #444; }

/* 令牌输入行 */
.token-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 4px; }
.token-row label { color: #444; font-size: 14px; }
.token-row input { flex: 1; min-width: 200px; padding: 8px 10px; border: 1px solid #d9d9d9; border-radius: 4px; font: inherit; font-family: ui-monospace, Menlo, Consolas, monospace; }

/* 表格在窄屏可横向滚动 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0; }
.table-wrap table { min-width: 720px; }

/* 手机端：表格改为卡片式 */
@media (max-width: 640px) {
  body { padding: 12px; }
  .panel { padding: 14px; }
  .alias-box { flex-direction: column; align-items: stretch; }
  .alias-box input { width: 100%; }
  .table-wrap table.admin-table { min-width: 0; border: 0; }
  .table-wrap table.admin-table thead { display: none; }
  .table-wrap table.admin-table tr {
    display: block; margin-bottom: 12px;
    border: 1px solid #ddd; border-radius: 6px;
    background: #fff; padding: 8px;
  }
  .table-wrap table.admin-table td {
    display: flex; justify-content: space-between; gap: 10px;
    border: 0; border-bottom: 1px dashed #f0f0f0; padding: 6px 4px;
    word-break: break-all;
  }
  .table-wrap table.admin-table td:last-child { border-bottom: 0; }
  .table-wrap table.admin-table td::before {
    content: attr(data-label);
    color: #888; font-size: 12px; flex-shrink: 0; min-width: 70px;
  }
  .row-actions { flex-wrap: wrap; }
}
