:root {
  --bg: #ffffff;
  --bg-subtle: #f6f7f9;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
  --accent: #111827;
  --accent-hover: #374151;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --code-bg: #f9fafb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
a:hover {
  color: var(--text);
  text-decoration: underline;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-text-btn {
  font: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.9rem;
}

.nav-text-btn:hover {
  color: var(--text);
  text-decoration: underline;
}

.shell {
  max-width: 540px;
  margin: 0 auto;
  padding: 2rem 1.25rem 2.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  box-shadow: var(--shadow);
}

.card h1 {
  margin: 0 0 1.1rem;
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.sub {
  margin: 0.2rem 0 1.25rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.field {
  margin-bottom: 1rem;
}

.field-tight {
  margin-bottom: 0;
}

/* 查询区：与「邮件内容」分区一致，单独成框（略加深边界避免白叠白看不见） */
.query-panel {
  margin-top: 0.35rem;
  margin-bottom: 1.1rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  overflow: hidden;
  background: #f9fafb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.query-panel-head {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  background: #eef0f3;
}

.query-panel-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.query-panel-body {
  padding: 0.85rem 1rem 0.95rem;
  background: #fff;
}

.query-panel-body .field {
  margin-bottom: 0;
}

.query-panel-body .hint {
  margin-top: 0.45rem;
}

label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}
textarea {
  min-height: 6rem;
  resize: vertical;
  font-family: inherit;
  line-height: 1.45;
}
input:focus,
textarea:focus {
  border-color: #9ca3af;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.06);
}

.hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

/* 前台小米账号：与正文同源字体栈，避免浏览器对 <input> 使用默认 UI 字体；数字用 tabular 对齐更整齐 */
.query-panel-body .mi-input {
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* 仅缩小输入框内灰色 placeholder，不影响其它文案字号 */
.query-panel-body .mi-input::placeholder {
  font-size: 0.8125rem;
  color: #9ca3af;
  opacity: 1;
}

.inline-query {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.query-panel-body .inline-query .mi-input {
  width: clamp(168px, 38vw, 220px);
  max-width: 100%;
  flex: 0 0 auto;
}

.inline-query .btn-primary {
  padding: 0.55rem 0.85rem;
  white-space: nowrap;
  flex: 0 0 auto;
}

.row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.08s ease;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-ghost {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-subtle);
}

.btn-danger-ghost {
  color: var(--danger);
  border-color: #fecaca;
}

.btn-danger-ghost:hover:not(:disabled) {
  background: #fef2f2;
  color: #b91c1c;
}

.btn-danger-ghost:disabled {
  opacity: 0.45;
  color: var(--muted);
  border-color: var(--border);
}

/* 顶部浮层提示：不占版面，由 JS 控制约 3 秒后消失 */
#alert.alert.toast {
  position: fixed;
  top: 3.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(-0.35rem);
  z-index: 9999;
  max-width: min(92vw, 400px);
  width: max-content;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

#alert.alert.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.alert {
  margin: 0;
}

#alert.alert.toast.show.info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}
#alert.alert.toast.show.warn {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}
#alert.alert.toast.show.err {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
#alert.alert.toast.show.ok {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}

.mail-panel {
  margin-top: 1.1rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #f9fafb;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.mail-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.mail-panel-head .btn-tiny {
  flex-shrink: 0;
}

.mail-panel-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.mail-viewport {
  height: 220px;
  max-height: 42vh;
  background: #f9fafb;
  position: relative;
}

.mail-empty-state {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
  text-align: center;
}

.mail-empty-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: #9ca3af;
  max-width: 22rem;
}

.mail-filled-state {
  height: 100%;
  overflow: auto;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.mail-filled-state[hidden] {
  display: none !important;
}

.mail-empty-state[hidden] {
  display: none !important;
}

.mail-body {
  padding: 0.65rem 0.85rem 0.5rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text);
  background: #fff;
  flex: 1 1 auto;
  min-height: 0;
}

.mail-body .mail-link {
  color: #2563eb;
  text-decoration: none;
}
.mail-body .mail-link:hover {
  text-decoration: underline;
}

.mail-p {
  margin: 0 0 0.1rem;
}

.mail-p:last-child {
  margin-bottom: 0;
}

.mail-line1 {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.mail-gap {
  margin-bottom: 0.55rem;
}

.mail-dyn {
  font-weight: 600;
  color: var(--text);
}

.mail-code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  letter-spacing: 0.08em;
}

.mail-body-plain {
  display: flex;
  flex-direction: column;
}

.mail-plain-text {
  margin: 0;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: var(--text);
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(70vh, 28rem);
  overflow-y: auto;
}

.mail-code-offscreen {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mail-updated {
  margin: 0;
  padding: 0.4rem 0.85rem 0.55rem;
  font-size: 0.72rem;
  color: var(--muted);
  background: #fafafa;
  border-top: 1px solid var(--border);
  flex: 0 0 auto;
}

.mail-updated:empty {
  display: none;
}

.footer-note {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

/* Admin */
.admin-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 1.35rem;
  align-items: start;
}

@media (max-width: 900px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

.table-wrap {
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th,
td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-subtle);
}

tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}
.badge.on {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.badge.off {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.small {
  font-size: 0.82rem;
  color: var(--muted);
}

.actions-inline {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.btn-tiny {
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-tiny:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Admin auth */
.auth-card {
  max-width: 420px;
  margin: 0 auto;
}

.auth-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.auth-card-head h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1.35;
  flex: 1;
  min-width: 0;
}

.auth-card-actions {
  flex-shrink: 0;
  padding-top: 0.08rem;
}

.auth-card-link {
  font: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #4f46e5;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.auth-card-link:hover {
  color: #4338ca;
  text-decoration: underline;
}

.auth-lead {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.auth-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.auth-tab {
  flex: 1;
  padding: 0.45rem 0.5rem;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}

.auth-tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--text);
  border-color: #c4b5fd;
  box-shadow: 0 0 0 1px #ddd6fe;
}

.auth-msg {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: #b91c1c;
}

.auth-msg.preline {
  white-space: pre-line;
}

.auth-msg.ok {
  color: #047857;
}

.admin-userbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-box {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.25rem;
}

.modal-box h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.modal-lg {
  max-width: 520px;
}

.modal-confirm-box {
  max-width: 420px;
}

.modal-confirm-h2 {
  margin: 0 0 0.65rem;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.modal-confirm-text {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}

.btn-primary.btn-danger-solid {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-primary.btn-danger-solid:hover:not(:disabled) {
  background: #b91c1c;
  border-color: #b91c1c;
  filter: none;
}

.modal-sub {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.admin-wl-card {
  padding: 0;
  overflow: hidden;
}

.admin-wl-head {
  padding: 0.85rem 1.2rem 0.65rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.admin-wl-toolbar-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.admin-wl-search-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  flex: 1 1 14rem;
  min-width: 0;
}

.admin-wl-head-text {
  flex: 1;
  min-width: 0;
}

.admin-wl-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.admin-wl-lead {
  margin: 0.35rem 0 0;
}

.admin-wl-actions {
  margin: 0;
  flex-shrink: 0;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-wl-summary {
  margin: 0;
  white-space: nowrap;
}

.wl-bulk-menu-wrap {
  position: relative;
  display: inline-block;
}

.wl-bulk-menu-panel {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  min-width: 15.5rem;
  padding: 0.3rem 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  z-index: 45;
}

.wl-bulk-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.52rem 1rem;
  font: inherit;
  font-size: 0.87rem;
  line-height: 1.35;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text);
}

.wl-bulk-menu-item:hover {
  background: var(--bg-subtle);
}

.wl-bulk-menu-item[data-action="delete"] {
  color: var(--danger);
}

.wl-bulk-menu-item[data-action="delete"]:hover {
  background: #fef2f2;
}

/* —— 白名单顶栏：查询条 + 操作按钮 —— */
.wl-search-omnibar {
  display: flex;
  align-items: stretch;
  min-height: 2.65rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), inset 0 1px 0 #fff;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wl-search-omnibar:focus-within {
  border-color: #c7cdd8;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.06), 0 1px 3px rgba(15, 23, 42, 0.06);
}

.wl-search-omnibar--toolbar {
  flex: 1 1 12rem;
  max-width: min(28rem, 100%);
  min-width: min(11rem, 100%);
  min-height: 2.35rem;
}

.wl-search-omnibar-icon {
  flex: 0 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  background: no-repeat 50% 50% / 1.05rem
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-3.5-3.5'/%3E%3C/svg%3E");
}

.wl-search-omnibar .wl-search-input {
  flex: 1 1 8rem;
  min-width: 0;
  border: none;
  margin: 0;
  padding: 0.65rem 0.5rem 0.65rem 0;
  font: inherit;
  font-size: 0.92rem;
  color: var(--text);
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}

.wl-search-omnibar .wl-search-input::placeholder {
  color: #9ca3af;
}

.wl-search-omnibar .wl-search-input:focus {
  outline: none;
}

.wl-search-omnibar .wl-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.wl-search-btn-submit {
  flex-shrink: 0;
  margin: 0;
  padding: 0 1.35rem;
  border: none;
  border-left: 1px solid var(--border);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(180deg, #374151 0%, #1f2937 100%);
  cursor: pointer;
  transition: background 0.15s ease, filter 0.15s ease;
}

.wl-search-btn-submit:hover {
  filter: brightness(1.06);
}

.wl-search-btn-submit:active {
  filter: brightness(0.96);
}

.wl-search-link-back {
  flex-shrink: 0;
  margin: 0;
  padding: 0.2rem 0;
  font: inherit;
  font-size: 0.8rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color 0.15s ease;
}

.wl-search-link-back:hover {
  color: var(--text);
}

.wl-search-link-back--inline {
  padding: 0.35rem 0.5rem;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 0.8rem;
}

.wl-search-link-back--inline:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: var(--border);
  color: var(--text);
}

.wl-search-hint--below {
  width: 100%;
  margin: 0;
  padding: 0.1rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
  text-align: left;
}

.wl-search-hint--below.is-err {
  color: #b91c1c;
}

@media (max-width: 720px) {
  .admin-wl-toolbar-top {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-wl-actions.row {
    justify-content: flex-start;
  }

  .wl-search-omnibar--toolbar {
    max-width: none;
    min-width: 0;
  }
}

.admin-wl-table-wrap {
  border: none;
  border-radius: 0;
}

/* 白名单表格：固定列比例、加内边距，避免长串撑爆布局 */
.admin-wl-card table.admin-wl-table {
  table-layout: fixed;
  width: 100%;
  font-size: 0.9rem;
}

/* 列宽：见 admin.html <colgroup>（六列百分比之和为 100%） */
.admin-wl-card table.admin-wl-table col.wl-col-check {
  width: 6%;
}

.admin-wl-card table.admin-wl-table th,
.admin-wl-card table.admin-wl-table td {
  padding: 0.8rem 1rem;
  vertical-align: top;
  word-wrap: break-word;
}

.admin-wl-card table.admin-wl-table th {
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.admin-wl-card table.admin-wl-table .col-check {
  box-sizing: border-box;
  text-align: center;
  vertical-align: middle;
  padding: 0.65rem 0;
}

.admin-wl-card table.admin-wl-table .col-check input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  vertical-align: middle;
  margin: 0;
}

/* 状态列很窄；勿对「启用/禁用」断词，否则会变成两行 */
.admin-wl-card table.admin-wl-table .col-state {
  white-space: nowrap;
  word-wrap: normal;
  overflow-wrap: normal;
  vertical-align: middle;
  text-align: center;
}

.admin-wl-card table.admin-wl-table .col-state .badge {
  white-space: nowrap;
}

.cell-mi-text {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.86rem;
}

.mail-cell-inner {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.mail-inline-main {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.45;
}

.mail-masked-line {
  display: inline;
  word-break: keep-all;
}

.mail-inline-sep {
  color: var(--muted);
  font-weight: 500;
  padding: 0 0.1rem;
}

.mail-pair-label {
  display: inline;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.mail-pwd-masked {
  display: inline;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.8rem;
}

.mail-ready-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
}

.admin-wl-card table.admin-wl-table .col-actions {
  white-space: nowrap;
  word-wrap: normal;
  overflow-wrap: normal;
  vertical-align: middle;
}

.admin-wl-card table.admin-wl-table .col-actions .actions-inline {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
}

.admin-wl-card table.admin-wl-table .col-actions .btn-tiny {
  width: auto;
  flex: 0 0 auto;
  text-align: center;
}

.whitelist-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.65rem 1.2rem 0.85rem;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

.whitelist-pager-btns {
  display: flex;
  gap: 0.45rem;
}

.admin-aside-title {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 650;
}

.admin-aside-list {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.55;
}

.admin-aside-list li {
  margin-bottom: 0.5rem;
}

.admin-aside-list li:last-child {
  margin-bottom: 0;
}

.admin-import-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

@media (max-width: 520px) {
  .admin-import-choice {
    grid-template-columns: 1fr;
  }
}

.choice-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.choice-card:hover {
  border-color: #a78bfa;
  box-shadow: 0 0 0 1px #ddd6fe;
}

.choice-title {
  display: block;
  font-weight: 650;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.choice-desc {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.bulk-textarea {
  min-height: 12rem;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.8125rem;
}

.bulk-file-row {
  margin-bottom: 0.35rem;
}

.bulk-file-row input[type="file"] {
  width: 100%;
  font-size: 0.82rem;
}
