:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1a1d24;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger: #dc2626;
  --success: #16a34a;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100%;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  max-width: 100%;
}

a {
  color: var(--accent);
  word-break: break-all;
}

button,
input,
textarea {
  font: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 18px;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}

.btn:active {
  transform: scale(0.98);
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-copy {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--accent);
  padding: 10px 14px;
  min-height: 44px;
  font-weight: 700;
}

.btn-copy:hover {
  background: #dbeafe;
}

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

.btn-danger:hover {
  background: #fee2e2;
}

.input,
.textarea {
  width: 100%;
  padding: 14px 16px;
  min-height: 52px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  outline: none;
}

.input:focus,
.textarea:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 18px;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.row-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.row-copy .label {
  font-weight: 600;
  min-width: 56px;
}

.row-copy .value {
  flex: 1 1 200px;
  padding: 12px 14px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px dashed var(--border);
  word-break: break-all;
  font-size: 15px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(26, 29, 36, 0.92);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 2000;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 100;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  color: var(--muted);
}

.tab.active {
  background: #eff6ff;
  color: var(--accent);
  border-color: #bfdbfe;
}

.shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: 120px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

#panel-chat {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

table.grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.grid th,
table.grid td {
  border: 1px solid var(--border);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

table.grid th {
  background: #f3f4f6;
  white-space: nowrap;
}

table.grid tr.err {
  background: #fef2f2;
}

table.grid .cell-actions {
  white-space: nowrap;
}

table.grid .cell-actions .btn {
  margin: 4px 4px 4px 0;
  padding: 8px 10px;
  min-height: 40px;
  font-size: 13px;
}

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

.hidden {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1500;
}

.modal {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 420px;
  width: 100%;
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 6px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.chat-list .msg:last-child {
  scroll-margin-bottom: 88px;
}

.msg {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: #fafafa;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.msg-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px 8px;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
}

.msg-meta {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.msg-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  flex-shrink: 0;
}

.msg-body {
  word-break: break-word;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.4;
  min-width: 0;
  max-width: 100%;
}

.msg-body img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.card.chat-header-card {
  padding: 12px 14px;
  margin-bottom: 10px;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.chat-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.chat-header-row > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.chat-title {
  margin: 0;
  font-size: 18px;
}

.chat-hint {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.35;
}

.btn-chat-wide {
  padding: 6px 12px;
  min-height: 36px;
  font-size: 12px;
  box-shadow: none;
}

.btn-msg-inline {
  padding: 5px 10px;
  min-height: 34px;
  font-size: 12px;
  box-shadow: none;
}

.btn-chat-bar {
  padding: 6px 12px;
  min-height: 36px;
  font-size: 12px;
  box-shadow: none;
  flex-shrink: 0;
}

.btn-chat-bar.btn-chat-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  min-width: 36px;
  width: 36px;
  cursor: pointer;
}

.chat-upload-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.chat-thumb-wrap {
  position: relative;
  display: block;
  width: 100%;
  max-width: min(100%, 360px);
  height: 160px;
  margin-top: 6px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  background: #e5e7eb;
  box-sizing: border-box;
}

.chat-thumb-wrap:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.chat-thumb-wrap img.chat-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0;
  border-radius: 0;
}

@media (max-width: 520px) {
  .chat-thumb-wrap {
    height: 150px;
    max-width: 100%;
  }
}

.chat-thumb-meta {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-thumb-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) 12px env(safe-area-inset-bottom);
  box-sizing: border-box;
}

.img-lightbox.hidden {
  display: none !important;
}

.img-lightbox-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  cursor: pointer;
}

.img-lightbox-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: min(100vw - 24px, 960px);
  max-height: calc(100vh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  padding-top: 44px;
  box-sizing: border-box;
  pointer-events: none;
}

.img-lightbox-panel > * {
  pointer-events: auto;
}

.img-lightbox-close {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #111;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.img-lightbox-img-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: calc(100vh - 200px);
  touch-action: pinch-zoom;
}

.img-lightbox-full {
  max-width: 100%;
  max-height: calc(100vh - 200px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  -webkit-user-select: none;
  user-select: none;
}

.img-lightbox-footer {
  flex-shrink: 0;
  margin-top: 14px;
  text-align: center;
  max-width: 100%;
}

.img-lightbox-hint {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.img-lightbox-hint strong {
  color: #fff;
  font-weight: 700;
}

.chat-input-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
  z-index: 90;
}

.chat-input-inner {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  gap: 6px;
  align-items: flex-end;
  min-width: 0;
  box-sizing: border-box;
}

.chat-input-inner .textarea {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  max-height: 160px;
  padding: 10px 12px;
  font-size: 15px;
  box-sizing: border-box;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 400px;
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.captcha-row img {
  height: 48px;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  background: #fff;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

#panel-email.card {
  padding: 14px 16px;
}

.email-panel-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
}

.email-panel-lead {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.35;
}

#panel-email .email-parse-toolbar .btn-email-tool {
  cursor: pointer;
  padding: 6px 12px;
  min-height: 38px;
  font-size: 13px;
  box-shadow: none;
}

.textarea.email-parse-input {
  min-height: 140px;
  padding: 12px 14px;
}

.email-parse-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.btn-parse-run {
  min-height: 44px;
  padding-left: 20px;
  padding-right: 20px;
  font-size: 15px;
}

.email-results-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.email-results-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.email-results-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.email-results-stats {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.email-results-filter-row {
  margin: 0 0 10px;
}

.email-filter-input {
  box-sizing: border-box;
  width: 100%;
  max-width: 420px;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.email-filter-input::placeholder {
  color: var(--muted);
}

.email-filter-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent);
}

.email-filter-empty {
  margin: 8px 0 0;
  font-size: 13px;
}

.email-results-empty {
  margin: 0;
}

.email-batch-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.btn-email-batch {
  padding: 8px 12px;
  min-height: 40px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

.email-groups-list {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
}

.email-groups-pager {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f9fafb;
}

.email-groups-pager.hidden {
  display: none !important;
}

.email-pager-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.email-pager-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.email-pager-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.email-pager-label {
  font-size: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.email-pager-select {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
}

.btn-email-pager {
  padding: 5px 10px;
  min-height: 34px;
  font-size: 12px;
}

.email-list-item {
  border-bottom: 1px solid var(--border);
}

.email-list-item:last-child {
  border-bottom: none;
}

.email-list-item--warn .email-list-row {
  background: #fff8f8;
}

.email-list-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex-wrap: wrap;
}

.email-list-row:active {
  background: #f3f4f6;
}

.email-list-top {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 8px;
  align-items: center;
}

.email-list-serial {
  flex: 0 0 2.25em;
  min-width: 2.25em;
  text-align: right;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.email-row-chk {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--accent);
}

.email-list-email {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-list-row-actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.email-list-row-time {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  flex: 0 0 auto;
  min-width: 6.5em;
  max-width: 10rem;
  color: var(--muted);
  overflow: visible;
  text-overflow: clip;
}

.email-list-row-pass-date {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  flex-shrink: 0;
  min-width: 0;
}

.email-list-row-count {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.email-list-row-count-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.btn-email-inline {
  padding: 6px 10px;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-email-inline--small {
  min-height: 34px;
  padding: 5px 12px;
  font-size: 13px;
}

.btn-email-inline:active {
  background: #dbeafe;
}

.email-list-detail {
  padding: 8px 8px 10px 10px;
  background: #eef1f6;
  border-top: 1px solid var(--border);
}

.email-list-detail.hidden {
  display: none !important;
}

.email-list-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.btn-email-tiny {
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.btn-email-clear {
  margin-left: 0;
  padding: 6px 10px;
  min-height: 32px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.email-list-detail-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
  margin-top: 4px;
}

.email-list-detail-label {
  flex: 0 0 auto;
  min-width: 48px;
  font-weight: 700;
  font-size: 13px;
}

.email-list-detail-value {
  flex: 1 1 160px;
  min-width: 0;
  font-size: 13px;
  word-break: break-all;
  line-height: 1.35;
  color: var(--text);
}

@media (max-width: 520px) {
  html,
  body {
    overflow-x: hidden;
    max-width: 100%;
  }

  .shell {
    padding: 10px 10px 96px;
    max-width: 100%;
    overflow-x: hidden;
  }

  #panel-email.card {
    padding: 10px;
    max-width: 100%;
    overflow-x: hidden;
  }

  .email-panel-title {
    font-size: 16px;
    margin-bottom: 4px;
  }

  .email-panel-lead {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .topbar {
    padding: 8px 10px;
    gap: 8px;
    max-width: 100%;
    overflow-x: hidden;
  }

  .topbar .tabs {
    min-width: 0;
    flex: 1 1 auto;
  }

  .tab {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 8px;
  }

  .btn-topbar-logout {
    padding: 4px 8px;
    min-height: 30px;
    font-size: 11px;
    border-radius: 6px;
    box-shadow: none;
  }

  .card.chat-header-card {
    padding: 10px 12px;
    margin-bottom: 8px;
  }

  .chat-title {
    font-size: 16px;
  }

  .chat-hint {
    font-size: 12px;
  }

  .btn-msg-inline,
  .btn-chat-wide,
  .btn-chat-bar {
    padding: 4px 8px;
    min-height: 30px;
    font-size: 11px;
    border-radius: 6px;
  }

  .btn-chat-bar.btn-chat-upload {
    padding: 0;
    min-width: 30px;
    width: 30px;
    min-height: 30px;
  }

  .chat-upload-icon {
    width: 18px;
    height: 18px;
  }

  .chat-list {
    gap: 6px;
  }

  .chat-list .msg:last-child {
    scroll-margin-bottom: 82px;
  }

  .msg {
    padding: 6px 8px;
  }

  .msg-head {
    font-size: 11px;
    margin-bottom: 3px;
    gap: 6px;
    flex-direction: column;
    align-items: stretch;
  }

  .msg-meta {
    max-width: 100%;
  }

  .msg-actions {
    align-self: flex-end;
  }

  .msg-body {
    font-size: 13px;
  }

  .chat-input-bar {
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
  }

  .chat-input-inner .textarea {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .chat-thumb-wrap {
    height: 140px;
    margin-top: 4px;
  }

  .chat-thumb-hint {
    font-size: 11px;
  }

  .textarea.email-parse-input {
    min-height: 100px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .email-parse-toolbar {
    gap: 6px;
    margin-top: 6px;
  }

  #panel-email .email-parse-toolbar .btn-email-tool,
  #panel-email .email-parse-toolbar .btn-parse-run {
    min-height: 30px;
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 6px;
    box-shadow: none;
  }

  #panel-email .email-parse-toolbar .btn-parse-run {
    flex: 1;
    min-width: 0;
    padding-left: 12px;
    padding-right: 12px;
  }

  .email-results-block {
    margin-top: 10px;
    padding-top: 8px;
  }

  .email-results-heading {
    margin-bottom: 4px;
    gap: 6px 8px;
  }

  .email-results-title {
    font-size: 15px;
  }

  .email-results-stats {
    font-size: 11px;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
  }

  .email-results-filter-row {
    margin-bottom: 6px;
  }

  .email-filter-input {
    max-width: none;
    padding: 6px 10px;
    font-size: 13px;
  }

  .email-filter-empty {
    font-size: 11px;
  }

  .email-batch-toolbar {
    margin-bottom: 6px;
    gap: 6px;
  }

  .btn-email-batch {
    padding: 4px 8px;
    min-height: 30px;
    font-size: 11px;
    border-radius: 6px;
  }

  .email-list-row {
    padding: 4px 8px;
    min-height: 0;
    gap: 6px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .email-list-top {
    flex: 1 1 100%;
    min-width: 0;
    align-items: flex-start;
    gap: 6px;
  }

  .email-list-serial {
    flex: 0 0 1.85em;
    min-width: 1.85em;
    font-size: 11px;
    padding-top: 2px;
  }

  .email-list-email {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    font-size: 12px;
    font-weight: 600;
    white-space: normal;
    word-break: break-all;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.35;
  }

  .email-list-item {
    min-width: 0;
    overflow-x: hidden;
  }

  .email-groups-list {
    max-width: 100%;
    overflow-x: hidden;
  }

  .email-list-row-actions {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
    gap: 4px 6px;
    justify-content: flex-start;
    flex-wrap: wrap;
    align-items: center;
    overflow: visible;
  }

  .email-list-row-count {
    flex-shrink: 0;
  }

  .email-list-row-pass-date {
    gap: 4px;
    flex-wrap: wrap;
  }

  .email-list-row-time {
    font-size: 10px;
    font-weight: 600;
    min-width: 0;
    max-width: none;
    flex-shrink: 0;
  }

  .email-list-row-count-num {
    font-size: 11px;
  }

  .btn-email-tiny {
    width: 26px;
    height: 26px;
    font-size: 15px;
    border-radius: 6px;
  }

  .email-list-row-actions .btn-email-inline {
    padding: 3px 5px;
    min-height: 28px;
    font-size: 10px;
    border-radius: 6px;
    flex-shrink: 1;
    min-width: 0;
  }

  .btn-email-inline--small {
    min-height: 30px;
    padding: 3px 8px;
    font-size: 12px;
  }

  .email-groups-pager {
    margin-top: 6px;
    padding: 6px 8px;
  }

  .email-pager-meta {
    font-size: 11px;
  }

  .email-pager-select {
    font-size: 11px;
    padding: 3px 6px;
  }

  .btn-email-pager {
    padding: 4px 8px;
    min-height: 30px;
    font-size: 11px;
  }

  .email-list-detail {
    padding: 6px 6px 8px 8px;
  }

  .email-list-detail-meta {
    margin-bottom: 4px;
    gap: 4px;
  }

  .btn-email-clear {
    padding: 4px 8px;
    min-height: 30px;
    font-size: 12px;
  }

  .email-list-detail-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    column-gap: 6px;
    row-gap: 0;
    margin-top: 3px;
    align-items: start;
  }

  .email-list-detail-label {
    font-size: 12px;
    min-width: 0;
    grid-column: 1;
  }

  .email-list-detail-value {
    font-size: 12px;
    line-height: 1.32;
    grid-column: 2;
    min-width: 0;
  }

  .email-list-detail-row .btn-email-inline--small {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
  }

  .email-groups-list {
    border-radius: 8px;
  }
}

.btn-sm {
  padding: 8px 12px;
  min-height: 40px;
  min-width: 40px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
