﻿@font-face {
  font-family: "Candara";
  src: url("/static/fonts/candara-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Candara";
  src: url("/static/fonts/candara-bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Candara";
  src: url("/static/fonts/candara-italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: "Candara";
  src: url("/static/fonts/candara-bold-italic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
}

@font-face {
  font-family: "Montserrat";
  src: url("/static/fonts/montserrat-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Montserrat";
  src: url("/static/fonts/montserrat-semibold.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "Montserrat";
  src: url("/static/fonts/montserrat-bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
}

:root {
  --font-candara: Candara, "Segoe UI", Arial, sans-serif;
  --font-montserrat: Montserrat, "Segoe UI", Arial, sans-serif;}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;}

body.modal-open {
  overflow: hidden;
}


button,
input,
textarea,
select {
  font: inherit;
}

button,
.ghost-btn,
.text-link {
  transition: 0.18s ease;
}

.shell {
  display: grid;
  min-height: 100vh;}


.brand {
  display: flex;
  align-items: center;}

.brand-mark {
  display: grid;
  place-items: center;}


.brand-sub,
.user-meta {
  font-size: 0.92rem;}


.sidebar-footer {
  display: grid;}


.page-login {
  display: grid;
  place-items: center;}

.hero-card,
.panel,
.stat-card,
.list-card {
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);}

.hero-card,
.panel {
  padding: 26px;}

.login-card {
  width: min(560px, 100%);
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 22px;}


.section-header h1,
.section-header h2,
.panel h2 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;}


.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}


.stat-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
}


.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.list-stack {
  display: grid;
  gap: 12px;
}

.list-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;}

.list-card.plain {
  align-items: start;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.88rem;
  white-space: nowrap;}

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));}

.full-span {
  grid-column: 1 / -1;
}

.single-form {
  grid-template-columns: 1fr;
}

.grid-form label,
.checkbox-field {
  display: grid;}

.grid-form span {
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);}

textarea {
  resize: vertical;}

button,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 128px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: linear-gradient(135deg, #149172, #0e7a63);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

button:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  border-color: rgba(17, 17, 17, 0.12);
  box-shadow: 0 8px 20px rgba(17, 17, 17, 0.06);
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 128px;
  padding: 12px 18px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(17, 17, 17, 0.06);
}


.secondary-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.01);
}

.text-link {
  color: var(--accent);
  font-weight: 700;
}

.template-change-button {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.template-change-button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.62;
}

.campaign-template-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.92rem;}

.tip-box {
  margin-top: 18px;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 18px;}

.compact-box {
  margin-top: 0;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.choice-card {
  position: relative;
  display: grid;
  gap: 8px;
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.94);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;}

.choice-card:hover {
  transform: translateY(-1px);
  border-color: rgba(14, 122, 99, 0.24);
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.07);
}

.choice-card input[type="radio"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.choice-card input[type="checkbox"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.choice-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}

.choice-card-subtitle,
.choice-card-meta {
  font-size: 0.94rem;
  line-height: 1.55;
  word-break: break-word;}

.choice-card:has(input[type="radio"]:checked) {
  border-color: rgba(14, 122, 99, 0.38);
  background: rgba(14, 122, 99, 0.08);
  box-shadow: 0 14px 30px rgba(14, 122, 99, 0.12);
}

.choice-card:has(input[type="checkbox"]:checked) {
  border-color: rgba(14, 122, 99, 0.42);
  background: rgba(14, 122, 99, 0.08);
  box-shadow: 0 14px 30px rgba(14, 122, 99, 0.12);
}

.notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid transparent;}


.mini-progress {
  width: 100%;
  height: 8px;
  margin: 10px 0 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(80, 141, 216, 0.14);
}

.mini-progress span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, #69b5ff, #2f73e0 58%, #5bc3ff);
  transition: width 0.35s ease;
}

.sync-progress-card {
  display: grid;
  gap: 8px;
}

.sync-progress-card[hidden] {
  display: none;
}

.reply-sync-errors {
  display: grid;
  gap: 8px;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.reply-sync-errors[hidden] {
  display: none;
}

.reply-sync-errors-title {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

.reply-sync-errors ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reply-sync-errors li {
  display: grid;
  grid-template-columns: auto minmax(140px, 220px) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  font-size: 12px;
  line-height: 1.45;
}

.reply-sync-errors span {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
  white-space: nowrap;
}

.reply-sync-errors strong {
  overflow-wrap: anywhere;
  color: #334155;
}

.reply-sync-errors em {
  font-style: normal;
  overflow-wrap: anywhere;
  color: #64748b;
}

@media (max-width: 720px) {
  .reply-sync-errors li {
    grid-template-columns: 1fr;
  }
}

.import-progress-card {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.import-progress-card[hidden] {
  display: none;
}

.import-progress-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.import-progress-steps span {
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.running-imports-card {
  display: grid;
  gap: 10px;
  margin-top: 14px;}

.running-imports-card[hidden] {
  display: none;
}

.running-imports-head,
.running-import-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}


.running-import-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;}

.running-import-item div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.running-import-item strong,
.running-import-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.running-import-item span,
.running-import-item small {
  color: #64748b;
  font-size: 0.82rem;
}

.running-import-item small {
  font-weight: 800;
}

.sync-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

#reply-sync-percent {
  min-width: 44px;
  font-weight: 800;
  text-align: right;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;}

.loading-overlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.loading-card {
  min-width: min(320px, 100%);
  padding: 24px 26px;
  text-align: center;}

.loading-spinner {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 4px solid rgba(14, 122, 99, 0.16);
  animation: spin 0.8s linear infinite;}

.loading-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.loading-text {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.94rem;
}

.table-wrap {
  overflow-x: auto;
}


th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;}


.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-form input {
  min-width: 110px;
}

.empty-cell {
  padding: 24px;}

.body-preview {
  margin: 10px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
}

.rich-editor-field {
  display: grid;
  gap: 10px;
  min-width: 0;
  align-content: start;
}

.rich-review-layout {
  display: grid;
  grid-template-columns: minmax(560px, 1.12fr) minmax(460px, 0.88fr);
  gap: 22px;
  align-items: stretch;
}

.rich-editor {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
}

.rich-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 247, 250, 0.92);
}

.rich-editor-toolbar .icon-btn,
.rich-editor-toolbar .mini-btn {
  min-height: 34px;
}

.rich-tool-select {
  width: auto;
  min-width: 92px;
  min-height: 34px;
  padding: 6px 10px;
}

.rich-color-palette {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.rich-color-swatch {
  position: relative;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 2px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  background-color: var(--swatch-color);
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), transparent 48%),
    linear-gradient(315deg, rgba(0, 0, 0, 0.1), transparent 52%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    0 1px 2px rgba(17, 17, 17, 0.14);
  cursor: pointer;
  flex: 0 0 auto;
}

.rich-color-swatch:hover {
  transform: translateY(-1px);
  border-color: rgba(17, 17, 17, 0.34);
}

.rich-color-swatch.is-active,
.rich-color-swatch:focus-visible {
  border-color: #111;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.52),
    0 0 0 3px rgba(14, 122, 99, 0.16);
}

.rich-image-input {
  display: none;
}

.rich-editor-toolbar button.rich-color-swatch {
  display: inline-block;
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 2px solid rgba(17, 17, 17, 0.18);
  border-radius: 50%;
  background-color: var(--swatch-color);
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.32), transparent 48%),
    linear-gradient(315deg, rgba(0, 0, 0, 0.1), transparent 52%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.45),
    0 1px 2px rgba(17, 17, 17, 0.14);
  color: transparent;
  font-size: 0;
  line-height: 0;
}

.rich-editor-toolbar button.rich-color-swatch:hover {
  filter: none;}


.rich-editor-toolbar input.rich-image-input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.rich-editor-surface {
  min-height: 520px;
  max-height: calc(100vh - 330px);
  overflow: auto;
  margin: 0;
  padding: 22px;
  outline: none;
  background: #fff;
  cursor: text;
  line-height: 1.7;
  user-select: text;
  -webkit-user-select: text;
}

.rich-editor-surface:focus {
  box-shadow: inset 0 0 0 2px rgba(22, 163, 127, 0.24);
}

.rich-editor-surface img {
  max-width: 100%;
  height: auto;
}

.mail-preview-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  height: 100%;
}

.mail-preview-frame {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  height: 100%;
  min-height: 610px;
  max-height: calc(100vh - 250px);
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 16px;
  background: #fff;}

.mail-preview-topbar {
  height: 34px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  background: linear-gradient(180deg, #f8fafc, #edf2f7);
}

.mail-preview-subject {
  padding: 18px 22px 8px;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.4;
}

.mail-preview-meta {
  padding: 0 22px 16px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  color: var(--muted);
  font-size: 0.86rem;
}

.mail-preview-body {
  min-height: 0;
  padding: 22px;
  overflow: auto;
  line-height: 1.7;
  word-break: break-word;
  white-space: pre-wrap;
}

.mail-preview-body img {
  max-width: 100%;
  height: auto;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.mode-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(25, 34, 28, 0.1);
  border-radius: 10px;
  background: rgba(245, 247, 244, 0.9);
}

.mode-option {
  min-width: 120px;
  border-radius: 8px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;}

.mode-option:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
}

.mode-option.active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 20px rgba(14, 122, 99, 0.18);
}

.variant-grid,
.reply-grid {
  display: grid;
  gap: 16px;
}

.progress-shell {
  display: grid;
  gap: 12px;
}

.progress-bar {
  width: 100%;
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(17, 17, 17, 0.08);
}

.progress-bar-fill {
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #0e7a63, #1fb58f);
  transition: width 0.35s ease;
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.phase-progress-shell {
  gap: 10px;
}

.phase-progress-bar {
  height: 18px;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(83, 91, 96, 0.28);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.22),
    inset 0 -2px 4px rgba(0, 0, 0, 0.16);}

.phase-progress-bar .progress-bar-fill {
  min-width: 8px;
  border-radius: 5px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 38%),
    linear-gradient(90deg, #fdd447 0%, #b7e442 42%, #35dc58 100%);
  box-shadow:
    0 0 14px rgba(73, 220, 84, 0.34),
    inset 0 1px 1px rgba(255, 255, 255, 0.45);
}

.phase-mini-progress {
  height: 14px;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(83, 91, 96, 0.22);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.14);}

.phase-mini-progress span {
  min-width: 8px;
  border-radius: 5px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 38%),
    linear-gradient(90deg, #fdd447 0%, #b7e442 42%, #35dc58 100%);
  box-shadow:
    0 0 12px rgba(73, 220, 84, 0.3),
    inset 0 1px 1px rgba(255, 255, 255, 0.45);
}

.send-progress-shell {
  gap: 14px;
}

.send-blower-progress {
  width: 100%;
  min-height: 56px;
  padding: 6px 0 2px;
}

.send-blower-progress,
.send-blower-progress * {
  box-sizing: border-box;
}

.send-blower-loadingbar {
  position: relative;
  width: 100%;
  height: 34px;
  padding: 4px 34px 4px 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe06c, #f5bc23);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.48),
    inset 0 -3px 8px rgba(157, 92, 0, 0.2),
    0 14px 28px rgba(202, 134, 21, 0.18);
}

.send-blower-filler-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(142, 82, 0, 0.12);
}

.send-blower-filler {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 36%),
    linear-gradient(90deg, #ffb01f, #f07813);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 0 18px rgba(241, 120, 19, 0.28);
  transition: width 0.9s ease-out;
}

.send-blower-value {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 11;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-shadow: 0 1px 4px rgba(155, 73, 0, 0.72);
  pointer-events: none;
}

.send-blower-marker {
  position: absolute;
  right: -1px;
  top: -4px;
  z-index: 12;
  width: 42px;
  height: 42px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: linear-gradient(180deg, #f89b17, #d97208);
  box-shadow: 0 10px 18px rgba(210, 112, 8, 0.25);
  animation: send-blower-rotate 2.8s infinite ease-in-out;
  animation-play-state: paused;
}

.send-progress-panel.is-actively-sending .send-blower-marker {
  animation-play-state: running;
}

.send-blower-marker::after {
  content: "";
  position: absolute;
  left: calc(50% - 2px);
  top: calc(50% - 2px);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
}

.send-blower-marker span {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 100% 100% 100% 0;
  background: #fff;
}

.send-blower-marker span:nth-child(1) {
  left: 13px;
  top: 1px;
  transform: rotate(-45deg);
}

.send-blower-marker span:nth-child(2) {
  left: 1px;
  top: 13px;
  transform: rotate(-135deg);
}

.send-blower-marker span:nth-child(3) {
  left: 13px;
  bottom: 1px;
  transform: rotate(-225deg);
}

.send-blower-marker span:nth-child(4) {
  right: 1px;
  top: 13px;
  transform: rotate(-315deg);
}

.send-progress-meta {
  justify-content: flex-start;
}

@keyframes send-blower-rotate {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@media (max-width: 640px) {
  .send-blower-progress {
    min-height: 50px;
  }

  .send-blower-loadingbar {
    height: 30px;
    padding-right: 30px;
  }

  .send-blower-marker {
    width: 38px;
    height: 38px;
  }

  .send-blower-marker span {
    width: 13px;
    height: 13px;
  }

  .send-blower-marker span:nth-child(1),
  .send-blower-marker span:nth-child(3) {
    left: 12px;
  }

  .send-blower-marker span:nth-child(2) {
    left: 1px;
    top: 12px;
  }

  .send-blower-marker span:nth-child(4) {
    right: 1px;
    top: 12px;
  }
}

.campaign-create-progress {
  margin-top: 14px;
}


.campaign-filter-form label {
  display: grid;
  gap: 6px;
}

.campaign-filter-form label span {
  color: #5f7894;
  font-size: 0.78rem;
  font-weight: 800;
}


.campaign-company-header strong {
  color: #132744;
  font-size: 0.98rem;
  font-weight: 800;
}

.campaign-company-header .muted {
  margin-left: 8px;
  font-size: 0.82rem;
}


@media (max-width: 1100px) {
  .campaign-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .campaign-filter-form {
    grid-template-columns: 1fr;
  }
}

.send-settings-form {
  align-items: start;
}

.send-template-source-panel,
.test-template-source-panel {
  display: grid;}

.send-template-source-head,
.test-template-source-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 700;
}

.send-template-source-head small,
.test-template-source-head small,
.test-template-source-note {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.send-template-source-panel .template-source-options,
.test-template-segment {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
}

.send-template-source-panel .template-source-options label,
.test-template-segment label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.send-template-source-panel .template-source-options label:hover,
.test-template-segment label:hover {
  border-color: rgba(14, 122, 99, 0.35);
  color: var(--text);
}

.send-template-source-panel .template-source-options input,
.test-template-segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.send-template-source-panel .template-source-options span,
.test-template-segment span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.send-template-source-panel .template-source-options label:has(input:checked),
.test-template-segment label:has(input:checked) {
  border-color: rgba(14, 122, 99, 0.5);
  background: var(--accent-soft);
  color: var(--accent);
}

.send-template-source-panel .template-source-options label.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.test-template-source-note {
  margin: 0;
}

.reminder-template-create-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.reminder-template-create-row .secondary-btn {
  min-width: 120px;
}

.reminder-new-template-summary {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(14, 122, 99, 0.22);
  border-radius: 8px;
  background: rgba(14, 122, 99, 0.08);
  color: var(--accent);
  font-weight: 600;
}

.ai-template-use-field.disabled {
  opacity: 0.55;
}

.mailbox-group-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin-top: 10px;
}

.mailbox-group-picker label {
  min-width: 240px;
  margin: 0;
}

.selected-outbox-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.selected-outbox-header .muted {
  margin: 4px 0 0;
}

.reply-to-bulk-row {
  display: grid;
  grid-template-columns: minmax(260px, 420px) auto;
  align-items: end;
  gap: 10px;
  margin-top: 12px;
}

.reply-to-bulk-row label {
  margin: 0;
}

.reply-to-bulk-row button {
  min-height: 42px;
}

.selected-outbox-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.selected-outbox-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.selected-outbox-item.is-quota-waiting {
  opacity: 0.6;
  background: rgba(17, 17, 17, 0.03);
  border-style: dashed;
}

.selected-outbox-item.is-quota-waiting::after {
  content: "24小时额度已用满，仍保留在本批次，额度恢复后自动继续发送";
  font-size: 12px;
  color: #b26a00;
}

.selected-outbox-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.selected-outbox-main > div {
  min-width: 0;
}

.selected-outbox-main strong {
  display: block;
  margin-bottom: 4px;
}

.outbox-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.outbox-choice-card {
  min-width: 0;
  min-height: 136px;
  overflow: hidden;
  padding-left: 52px;
}

.outbox-choice-card .choice-card-title {
  min-width: 0;
}

.outbox-choice-card .choice-card-title > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outbox-choice-card .choice-card-subtitle,
.outbox-choice-card .choice-card-meta,
.selected-outbox-item .choice-card-subtitle {
  overflow-wrap: anywhere;
}

.outbox-choice-card:has(input:disabled) {
  opacity: 0.58;
  cursor: not-allowed;
}

.outbox-choice-indicator {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(17, 17, 17, 0.18);
  background: #fff;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.outbox-choice-indicator::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 4px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0.6);
  opacity: 0;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.outbox-choice-card:has(input:checked) .outbox-choice-indicator {
  border-color: #0e7a63;
  background: #0e7a63;
  box-shadow: 0 0 0 4px rgba(14, 122, 99, 0.12);
}

.outbox-choice-card:has(input:checked) .outbox-choice-indicator::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.outbox-choice-card:has(input:disabled) .outbox-choice-indicator {
  background: rgba(17, 17, 17, 0.06);
  border-color: rgba(17, 17, 17, 0.12);
  box-shadow: none;
}

.reply-to-picker {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.reply-to-picker span {
  color: var(--muted);
  font-size: 12px;
}

.reply-to-picker input,
.reply-to-picker select {
  min-width: 0;
  width: 100%;
}

.missing-reply-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.missing-reply-list label {
  margin: 0;
}

.modal-card-wide {
  width: min(1040px, 100%);
}

#outbox-picker-modal .modal-card-wide {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(1120px, calc(100vw - 32px));
  max-width: 1120px;
  height: calc(100vh - 48px);
  height: calc(100dvh - 48px);
  max-height: calc(100dvh - 48px);
  min-height: 0;
  overflow: hidden;
}

#outbox-picker-modal {
  align-items: start;
  justify-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#outbox-picker-modal .modal-backdrop {
  position: fixed;
}

#outbox-picker-modal .mailbox-group-picker {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

#outbox-picker-modal .outbox-choice-grid {
  min-height: 0;
  max-height: calc(100vh - 250px);
  max-height: calc(100dvh - 250px);
  overflow-y: auto;
  padding: 2px 8px 4px 2px;
  overscroll-behavior: contain;
}

#outbox-picker-modal .modal-actions {
  position: sticky;
  bottom: 0;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  z-index: 2;
}

@media (max-width: 720px) {
  #outbox-picker-modal {
    padding: 12px;
  }

  #outbox-picker-modal .modal-card-wide {
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 16px;
  }

  #outbox-picker-modal .mailbox-group-picker {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  #outbox-picker-modal .mailbox-group-picker label,
  #outbox-picker-modal .mailbox-group-picker button,
  #outbox-picker-modal .modal-actions button {
    width: 100%;
    min-width: 0;
  }

  #outbox-picker-modal .outbox-choice-grid {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 270px);
    max-height: calc(100dvh - 270px);
  }
}

.variant-pager,
.table-pager {
  align-items: center;
  justify-content: flex-end;
}

.variant-pager .ghost-btn,
.table-pager .ghost-btn {
  min-width: 86px;
  padding: 9px 14px;
  border-radius: 12px;
}

.page-jump-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}

.page-jump-form label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.page-jump-form input[type="number"] {
  width: 72px;
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 10px;
  text-align: center;
}

.partial-loading {
  opacity: 0.62;
  pointer-events: none;
}

.row-highlight td {
  background: rgba(14, 122, 99, 0.12);
  transition: background 0.4s ease;
}

.variant-summary-card {
  display: grid;
  gap: 14px;
}

.variant-template-modal .modal-card {
  width: min(1560px, calc(100vw - 32px));
  max-width: none;
  padding: 28px;
}

.variant-template-scale-wrap {
  width: fit-content;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  transform-origin: top center;
}

.variant-template-card {
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.variant-template-modal .rich-review-layout {
  grid-template-columns: minmax(560px, 1.12fr) minmax(460px, 0.88fr);
}

.template-edit-modal .modal-card {
  width: min(1480px, calc(100vw - 32px));
  max-width: none;
  padding: 28px;
}

.template-editor-card {
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.template-edit-modal .rich-review-layout {
  grid-template-columns: minmax(560px, 1.12fr) minmax(460px, 0.88fr);
}

.template-edit-modal .rich-editor-surface {
  min-height: 430px;
}

.template-edit-modal .mail-preview-frame {
  min-height: 520px;
}

@media (max-width: 1100px) {
  .template-edit-modal .rich-review-layout {
    grid-template-columns: 1fr;
  }

  .template-edit-modal .mail-preview-frame,
  .template-edit-modal .rich-editor-surface {
    min-height: 360px;
  }
}

.variant-template-preview {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 14px;
  margin-bottom: 16px;
}

.variant-template-preview .body-preview {
  max-height: 160px;
  overflow: auto;
}

.send-preview-card {
  width: min(980px, calc(100vw - 32px));
  max-width: none;
  display: grid;
  gap: 14px;
}

.send-preview-subject {
  padding: 14px 16px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--text);
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}

.send-preview-recipient {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  word-break: break-word;
}

.send-preview-frame {
  width: 100%;
  min-height: 520px;
  height: min(58vh, 640px);
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.08);
}

.send-preview-actions {
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.message-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.message-body-section {
  margin-top: 16px;
}

.message-body-preview {
  max-height: 560px;
  overflow: auto;
}

.rich-message-body {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  white-space: normal;
}

.rich-message-body img {
  max-width: 100%;
  height: auto;
}

.mailbox-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.mailbox-stat {
  min-height: 152px;
}

.mailbox-stat strong {
  font-size: 1.15rem;
  line-height: 1.45;
  word-break: break-word;
}

.mailbox-table-wrap {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
}

.mailbox-table th,
.mailbox-table td {
  padding: 16px 14px;
}

.mailbox-row-title {
  font-weight: 700;
}

.mailbox-action-cell {
  min-width: 230px;
}

.mailbox-action-row {
  justify-content: flex-end;
}

.mailbox-action-row form {
  margin: 0;
}

.template-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.template-action-row form {
  margin: 0;
}

.mini-btn {
  min-width: 0;
  border-radius: 12px;
  font-weight: 600;}

.soft-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.88rem;
  white-space: nowrap;}

.danger-btn,
.danger-ghost {
  border-color: rgba(178, 59, 59, 0.92);}

.danger-ghost:hover,
.danger-btn:hover {
  filter: brightness(1.03);
}

.icon-btn {
  min-width: 0;
  border-color: rgba(17, 17, 17, 0.12);
  font-size: 1.4rem;
  line-height: 1;}

.modal-shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;}


.modal-shell[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;}

.modal-card {
  position: relative;
  width: min(860px, 100%);
  max-height: calc(100vh - 48px);
  padding: 24px;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: box-shadow 0.18s ease;}

.modal-shell.visible .modal-card {
  box-shadow: 0 28px 56px rgba(17, 17, 17, 0.18);
}

.modal-card-sm {
  width: min(520px, 100%);
}

.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.modal-header {
  margin-bottom: 20px;
}

.modal-header h2 {
  margin: 0;
}

.modal-actions {
  margin-top: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.delete-message {
  margin: 0 0 18px;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
}

.variant-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
}

.variant-top,
.reply-head,
.reply-meta,
.metric-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.reply-meta {
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 0.94rem;
}

.variant-section {
  display: grid;
  gap: 6px;
}

.variant-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.metric-stack {
  display: grid;
  gap: 12px;
}

.metric-row {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(14, 122, 99, 0.08);
}

.stat-grid-detail {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1180px) {
  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }

  .mailbox-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    gap: 18px;
  }

  .page {
    padding: 20px;
  }

  .grid-form,
  .stat-grid,
  .stat-grid-detail,
  .mailbox-summary-grid {
    grid-template-columns: 1fr;
  }

  .section-header,
  .modal-header,
  .modal-actions {
    align-items: start;
  }

  .mailbox-action-row {
    justify-content: start;
  }

  .modal-shell {
    padding: 14px;
  }

  .modal-card {
    padding: 18px;
    max-height: calc(100vh - 28px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

body {
  position: relative;}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 82%);}


.shell,
.page,
.sidebar {
  position: relative;
  z-index: 1;
}

.shell {
  gap: 0;}


.sidebar {
  min-height: 100vh;}


.nav a {
  border: 1px solid transparent;
  backdrop-filter: blur(4px);}


.page-login {
  max-width: none;
  width: 100%;
  min-height: 100vh;
  padding: 38px 28px;
}

.hero-card,
.panel,
.stat-card,
.list-card {
  border-color: rgba(17, 17, 17, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.82));
  box-shadow:
    0 18px 44px rgba(17, 17, 17, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.hero-card,
.panel {
  border-radius: 28px;
  overflow: hidden;
}

.panel {
  position: relative;
}

.panel::before,
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  pointer-events: none;}

.section-header {
  gap: 20px;
}

.section-header h1 {
  font-size: clamp(1.68rem, 2.35vw, 2.3rem);
  line-height: 1.12;
}

.section-header h2,
.panel h2 {
  font-size: 1.36rem;
  line-height: 1.18;
}


.muted,
.tip-box span,
.empty,
.empty-cell {
  color: #535353;
}

.stat-card {
  border-radius: 24px;
  padding: 22px 20px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat-card:hover,
.list-card:hover,
.panel:hover {
  transform: translateY(-2px);
  box-shadow:
    0 22px 48px rgba(17, 17, 17, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.stat-card strong {
  font-size: clamp(1.75rem, 2vw, 2.2rem);
  line-height: 1;
}

.list-card {
  border-radius: 20px;
  border: 1px solid rgba(17, 17, 17, 0.06);
}

input,
textarea,
select {
  padding: 13px 15px;}

input:focus,
textarea:focus,
select:focus {
  outline: none;}

button,
.ghost-btn,
.secondary-btn,
.danger-btn,
.danger-ghost {
  min-height: 46px;
  border-radius: 16px;
}


.tip-box {
  border: 1px solid rgba(14, 122, 99, 0.1);
  background:
    linear-gradient(180deg, rgba(14, 122, 99, 0.11), rgba(14, 122, 99, 0.06));
}

.table-wrap {
  border-radius: 22px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}


.mailbox-hero {
  padding: 28px;
  border-radius: 34px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background:
    radial-gradient(circle at right top, rgba(14, 122, 99, 0.16), transparent 18rem),
    radial-gradient(circle at left bottom, rgba(196, 107, 19, 0.14), transparent 16rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(253, 249, 242, 0.9));
  box-shadow:
    0 24px 58px rgba(17, 17, 17, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  overflow: hidden;}


.mailbox-hero-copy {
  max-width: 840px;
}

.mailbox-hero-copy h1 {
  margin: 0;
  font-size: clamp(1.86rem, 2.45vw, 2.5rem);
  line-height: 1.08;
}

.mailbox-hero-copy p {
  margin: 8px 0 0;
}


.mailbox-hero-stat span {
  display: block;
  margin-bottom: 10px;}

.mailbox-hero-stat strong {
  display: block;
  word-break: break-word;}

.mailbox-section {
  margin-bottom: 24px;
}

.mailbox-panel {
  padding: 24px;
}

.mailbox-support-badges,
.mailbox-provider-badges,
.mailbox-status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mailbox-provider-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background: rgba(255, 255, 255, 0.92);
  color: #2a2a2a;
  font-size: 0.88rem;
  font-weight: 600;
}

.mailbox-card-grid {
  display: grid;
  gap: 18px;}

.mailbox-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(17, 17, 17, 0.07);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 243, 236, 0.9));
  box-shadow:
    0 18px 40px rgba(17, 17, 17, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.mailbox-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;}

.mailbox-card-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.mailbox-card-title {
  display: grid;
  gap: 5px;
}

.mailbox-card-title h3 {
  margin: 0;
  font-size: 1.18rem;
}

.mailbox-owner-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.05);
  color: var(--muted);
  font-size: 0.86rem;
}

.mailbox-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mailbox-meta-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(17, 17, 17, 0.05);
}

.mailbox-meta-item.full {
  grid-column: 1 / -1;
}

.mailbox-meta-label {
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.02em;
}

.mailbox-meta-value {
  font-weight: 700;
  line-height: 1.45;
  word-break: break-word;
}

.mailbox-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.mailbox-card-actions form {
  margin: 0;
}

.mailbox-empty {
  padding: 36px 24px;
  border-radius: 24px;
  border: 1px dashed rgba(17, 17, 17, 0.12);
  background: rgba(255, 255, 255, 0.56);
  text-align: center;
  color: var(--muted);
}

.mailbox-list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;}


.mailbox-row-highlight {
  outline: 2px solid rgba(37, 99, 235, 0.42);
  outline-offset: -2px;
  background: rgba(37, 99, 235, 0.08);
}

.mailbox-list-table tbody tr.mailbox-row-highlight td {
  background: rgba(37, 99, 235, 0.08);
}

.mailbox-list-wrap {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.mailbox-list-table {
  min-width: 1120px;
}

.mailbox-list-table th,
.mailbox-list-table td {
  padding: 12px 10px;
  vertical-align: middle;
}

.mailbox-list-table tbody tr:hover td {
  background: rgba(14, 122, 99, 0.04);
}

.mailbox-list-table strong {
  display: block;
  line-height: 1.35;
  word-break: break-word;
}

.mailbox-list-actions {
  min-width: 250px;
}

.mailbox-list-actions,
.mailbox-list-actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mailbox-list-actions form {
  margin: 0;
}

.mailbox-group-filter select {
  min-width: 168px;
}

.mailbox-note {
  margin-bottom: 18px;
}

.stats-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding: 28px;
  border-radius: 34px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background:
    radial-gradient(circle at right top, rgba(14, 122, 99, 0.18), transparent 18rem),
    radial-gradient(circle at left bottom, rgba(196, 107, 19, 0.12), transparent 14rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(249, 243, 234, 0.9));
  box-shadow:
    0 24px 58px rgba(17, 17, 17, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.stats-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.1rem, 3vw, 3rem);
  line-height: 1.03;
}

.stats-hero-copy p {
  margin: 8px 0 0;
  max-width: 840px;
}

.stats-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.stats-hero-actions {
  display: flex;
  justify-content: flex-end;
}

.stats-filter-panel,
.stats-panel {
  margin-bottom: 24px;
}

.stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stats-kpi-card {
  display: grid;
  gap: 10px;
  padding: 20px;
  border-radius: 26px;
  border: 1px solid rgba(17, 17, 17, 0.07);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 242, 234, 0.9));
  box-shadow:
    0 16px 36px rgba(17, 17, 17, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.stats-kpi-card span {
  color: var(--muted);
}

.stats-kpi-card strong {
  font-size: clamp(1.8rem, 2.2vw, 2.4rem);
  line-height: 1;
}

.stats-kpi-card-lg {
  grid-column: span 2;
  min-height: 178px;
}

.stats-kpi-card.accent {
  background:
    radial-gradient(circle at right top, rgba(14, 122, 99, 0.14), transparent 12rem),
    linear-gradient(180deg, rgba(248, 255, 252, 0.96), rgba(236, 248, 244, 0.92));
}

.stats-kpi-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.93rem;
}

.stats-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
  margin-bottom: 24px;
}

.stats-category-stack,
.stats-ranking-list {
  display: grid;
  gap: 14px;
}

.stats-category-row {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(17, 17, 17, 0.05);
  background: rgba(255, 255, 255, 0.74);}

.stats-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stats-bar {
  width: 100%;}

.stats-bar-fill {
  height: 100%;
  border-radius: inherit;}

.stats-ranking-item {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(17, 17, 17, 0.05);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 244, 237, 0.88));
}

.stats-ranking-main,
.stats-ranking-metrics,
.stats-ranking-tags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-ranking-title {
  display: grid;
  gap: 4px;
}

.stats-ranking-metrics > div {
  min-width: 88px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(17, 17, 17, 0.05);
}

.stats-ranking-metrics span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.stats-ranking-metrics strong {
  font-size: 1.15rem;
}

.workspace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 22px;
  margin-bottom: 24px;
  padding: 30px;
  border-radius: 34px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background:
    radial-gradient(circle at right top, rgba(14, 122, 99, 0.16), transparent 16rem),
    radial-gradient(circle at left bottom, rgba(196, 107, 19, 0.12), transparent 14rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(249, 243, 235, 0.9));
  box-shadow:
    0 24px 58px rgba(17, 17, 17, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.workspace-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.1rem, 3vw, 3rem);
  line-height: 1.04;
}

.workspace-hero-copy p {
  margin: 8px 0 0;
  max-width: 860px;
}

.workspace-hero-actions,
.workspace-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.workspace-hero-actions {
  margin-top: 16px;
}

.workspace-side-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.workspace-side-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.workspace-side-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.workspace-side-card strong {
  display: block;
  font-size: 1.18rem;
  line-height: 1.38;
}

.workspace-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 18px;
  margin-bottom: 24px;
}

.workspace-stack {
  display: grid;
  gap: 18px;
}

.support-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 26px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 243, 236, 0.9));
  box-shadow:
    0 18px 36px rgba(17, 17, 17, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.support-card h3,
.support-card h2 {
  margin: 0;
}

.support-list {
  display: grid;
  gap: 12px;
}

.support-list-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(14, 122, 99, 0.06);
  border: 1px solid rgba(14, 122, 99, 0.08);
}

.support-list-item strong {
  display: block;
  margin-bottom: 6px;
}

.panel-lg {
  padding: 30px;
}

.table-panel {
  margin-bottom: 24px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  gap: 22px;
  margin-bottom: 24px;
  padding: 32px;
  border-radius: 36px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background:
    radial-gradient(circle at right top, rgba(14, 122, 99, 0.2), transparent 16rem),
    radial-gradient(circle at left bottom, rgba(196, 107, 19, 0.14), transparent 14rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(248, 241, 232, 0.9));
  box-shadow:
    0 24px 58px rgba(17, 17, 17, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.dashboard-hero-main {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 18px;
  max-width: 900px;
}

.dashboard-hero h1 {
  margin: 0;
  font-size: clamp(2.8rem, 4vw, 4.6rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
}

.dashboard-hero p {
  margin: 10px 0 0;
  max-width: 760px;
  font-size: 1.16rem;
  line-height: 1.72;
}

.dashboard-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}

.dashboard-hero-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.dashboard-flow-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(115, 160, 214, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: #557290;
  font-weight: 700;
}

.dashboard-flow-step.active {
  color: #1f4f9b;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(227, 241, 255, 0.9));
  box-shadow: 0 10px 20px rgba(48, 102, 179, 0.1);
}

.dashboard-flow-line {
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(96, 150, 219, 0.16), rgba(96, 150, 219, 0.42));
}

.dashboard-side {
  display: grid;
  gap: 16px;
  align-content: center;
}

.dashboard-side-card {
  position: relative;
  padding: 20px;
  border-radius: 28px;
  min-height: 148px;
  overflow: hidden;
}

.dashboard-side-card::before {
  content: "";
  position: absolute;
  inset: auto -2rem -3rem auto;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(119, 198, 255, 0.2), transparent 66%);
  pointer-events: none;
}

.dashboard-side-card-primary {
  background:
    radial-gradient(circle at right top, rgba(93, 179, 255, 0.24), transparent 10rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(231, 244, 255, 0.84));
}

.dashboard-side-card span {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 1rem;
}

.dashboard-side-card strong {
  display: block;
  font-size: 1.9rem;
  line-height: 1.18;
}

.dashboard-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.dashboard-metric-card {
  display: grid;
  gap: 12px;
  min-height: 176px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid rgba(17, 17, 17, 0.07);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 243, 236, 0.9));
  box-shadow:
    0 18px 38px rgba(17, 17, 17, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.dashboard-metric-card.featured {
  background:
    radial-gradient(circle at right top, rgba(14, 122, 99, 0.16), transparent 12rem),
    linear-gradient(180deg, rgba(249, 255, 252, 0.96), rgba(236, 248, 244, 0.92));
}

.dashboard-metric-card span {
  color: var(--muted);
}

.dashboard-metric-card strong {
  font-size: clamp(2rem, 2.4vw, 2.6rem);
  line-height: 1;
}

.dashboard-metric-meta {
  margin-top: auto;
  color: var(--muted);
  font-size: 0.94rem;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  gap: 24px;
  width: min(1320px, 100%);
  align-items: stretch;
}

.login-layout-compact {
  width: min(460px, 100%);
  grid-template-columns: 1fr;
}

.login-showcase,
.login-form-card {
  position: relative;
  padding: 32px;
  border-radius: 34px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(249, 243, 235, 0.92));
  box-shadow:
    0 24px 56px rgba(17, 17, 17, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.login-showcase {
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(14, 122, 99, 0.18), transparent 16rem),
    radial-gradient(circle at bottom left, rgba(196, 107, 19, 0.12), transparent 14rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(248, 241, 232, 0.92));
}

.login-showcase h1 {
  margin: 0;
  font-size: clamp(2.3rem, 3.2vw, 3.5rem);
  line-height: 1.02;
}

.login-showcase p {
  margin: 10px 0 0;
  max-width: 760px;
}

.login-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 20px;
}

.login-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.login-feature-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(17, 17, 17, 0.06);
}

.login-feature-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.02rem;
}

.login-form-card {
  display: grid;
  gap: 18px;
  align-self: center;
  width: 100%;
  justify-self: end;}

.login-form-card-center {
  max-width: 460px;
  justify-self: center;
}

.login-form-card h2 {
  margin: 0;}

.login-form-card .grid-form {
  gap: 18px;
}

.login-form-card button {
  width: 100%;
}

.login-credentials {
  display: grid;
  gap: 12px;
}

.login-credentials-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(14, 122, 99, 0.06);
  border: 1px solid rgba(14, 122, 99, 0.1);
}

.login-credentials-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}

@media (max-width: 1260px) {
  .mailbox-hero {
    grid-template-columns: 1fr;
  }

  .stats-layout {
    grid-template-columns: 1fr;
  }

  .stats-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-hero,
  .workspace-main-grid,
  .dashboard-hero,
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-form-card {
    max-width: none;
    justify-self: stretch;
  }
}

@media (max-width: 900px) {
  .page {
    padding: 22px 18px 28px;
  }

  .mailbox-hero,
  .mailbox-meta-grid,
  .mailbox-hero-stats {
    grid-template-columns: 1fr;
  }

  .mailbox-card-grid {
    grid-template-columns: 1fr;
  }

  .stats-hero {
    flex-direction: column;
    align-items: start;
  }

  .stats-kpi-grid,
  .stats-kpi-card-lg {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .dashboard-metric-grid,
  .workspace-side-grid,
  .login-feature-grid {
    grid-template-columns: 1fr;
  }
}

/* Blue refresh */


body::before {
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(79, 127, 182, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 127, 182, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
}

body::after {
  background:
    radial-gradient(circle at 86% 80%, rgba(87, 164, 255, 0.18), transparent 18rem),
    radial-gradient(circle at 12% 76%, rgba(126, 223, 255, 0.16), transparent 18rem);
}

.sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.08);}


.brand-title,
.section-header h1,
.section-header h2,
.panel h2,
.mailbox-card-title h3,
.dashboard-hero h1,
.workspace-hero-copy h1,
.stats-hero-copy h1 {
  color: #102440;
}


.nav a:hover {
  border-color: rgba(129, 183, 255, 0.18);}

.nav a.active {
  border-color: rgba(124, 190, 255, 0.24);}


.hero-card,
.panel,
.stat-card,
.list-card,
.support-card,
.dashboard-metric-card,
.stats-kpi-card,
.mailbox-card,
.mailbox-hero-stat,
.workspace-side-card,
.dashboard-side-card,
.stats-category-row,
.stats-ranking-item,
.mailbox-meta-item,
.login-form-card,
.modal-card,
.loading-card {
  border-color: rgba(115, 160, 214, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 249, 255, 0.78));
  box-shadow:
    0 24px 56px rgba(45, 93, 160, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(16px);
}

.panel::before,
.hero-card::before {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(117, 185, 255, 0.22), transparent 72%);
}

.mailbox-hero,
.stats-hero,
.workspace-hero,
.dashboard-hero {
  position: relative;
  overflow: hidden;
  border-color: rgba(120, 169, 226, 0.2);
  background:
    radial-gradient(circle at top right, rgba(91, 170, 255, 0.24), transparent 18rem),
    radial-gradient(circle at left bottom, rgba(125, 231, 255, 0.18), transparent 16rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(237, 246, 255, 0.82));
  box-shadow:
    0 28px 64px rgba(42, 92, 158, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.mailbox-hero::after,
.stats-hero::after,
.workspace-hero::after,
.dashboard-hero::after {
  content: "";
  position: absolute;
  right: -6rem;
  bottom: -7rem;
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(113, 196, 255, 0.24), transparent 68%);
  pointer-events: none;
}

.dashboard-side-card,
.workspace-side-card,
.mailbox-hero-stat {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(242, 248, 255, 0.74));
}

.mailbox-card::before {
  background: linear-gradient(180deg, #58a6ff, #4a80ff);
}

.eyebrow {
  color: #3c78d6;
  letter-spacing: 0.14em;
}

.muted,
.tip-box span,
.empty,
.empty-cell,
.stats-kpi-card span,
.dashboard-side-card span,
.workspace-side-card span,
.mailbox-meta-label,
.mailbox-hero-stat span {
  color: var(--muted);
}

input,
textarea,
select {
  border-color: rgba(112, 160, 214, 0.16);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 4px 14px rgba(85, 136, 204, 0.04);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(47, 115, 224, 0.34);
  box-shadow:
    0 0 0 4px rgba(79, 148, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

button {
  background:
    linear-gradient(135deg, #69b5ff 0%, #3d82eb 58%, #2c67d2 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 16px 30px rgba(47, 115, 224, 0.22);
}

.ghost-btn,
.secondary-btn {
  color: #153255;
  border-color: rgba(112, 160, 214, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 24px rgba(61, 110, 177, 0.08);
}


.pill {
  color: #2f73e0;
  border: 1px solid rgba(90, 145, 226, 0.18);
  background: rgba(77, 141, 235, 0.1);
}

.soft-badge {
  color: #557290;
  border: 1px solid rgba(115, 160, 214, 0.14);
  background: rgba(96, 150, 219, 0.08);
}

.tip-box,
.metric-row,
.support-list-item {
  border-color: rgba(94, 150, 230, 0.12);
  background:
    linear-gradient(180deg, rgba(75, 141, 235, 0.1), rgba(75, 141, 235, 0.05));
}

.notice-info,
.notice-success {
  background: rgba(62, 132, 232, 0.1);
  border-color: rgba(62, 132, 232, 0.16);
  color: #2f73e0;
}

.notice-error {
  background: rgba(207, 77, 104, 0.1);
  border-color: rgba(207, 77, 104, 0.16);
  color: var(--danger);
}

.table-wrap,
.mailbox-table-wrap {
  border-color: rgba(115, 160, 214, 0.14);
  background: rgba(255, 255, 255, 0.74);
}

th,
td {
  border-bottom-color: rgba(115, 160, 214, 0.12);
}

tbody tr:hover td {
  background: rgba(79, 148, 255, 0.06);
}

.progress-bar,
.stats-bar {
  background: rgba(80, 141, 216, 0.12);
}

.progress-bar-fill,
.stats-bar-fill {
  background: linear-gradient(90deg, #69b5ff, #2f73e0 58%, #5bc3ff);
}

.dashboard-metric-card.featured,
.stats-kpi-card.accent {
  background:
    radial-gradient(circle at right top, rgba(102, 185, 255, 0.18), transparent 12rem),
    linear-gradient(180deg, rgba(248, 253, 255, 0.96), rgba(233, 245, 255, 0.9));
}

.dashboard-metric-card,
.stats-kpi-card,
.support-card,
.mailbox-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dashboard-metric-card:hover,
.stats-kpi-card:hover,
.support-card:hover,
.mailbox-card:hover,
.dashboard-side-card:hover,
.workspace-side-card:hover,
.stats-ranking-item:hover {
  transform: translateY(-4px);
  box-shadow:
    0 28px 60px rgba(45, 93, 160, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.loading-overlay {
  background: rgba(19, 40, 76, 0.34);
}


.login-form-card {
  max-width: 480px;
  border-radius: 32px;
}

.login-form-card h2 {
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.dashboard-actions,
.workspace-hero-actions,
.mailbox-hero-actions {
  gap: 14px;
}

@media (max-width: 900px) {
  .page {
    padding: 20px 16px 28px;
  }
}

/* Dashboard admin layout */
.dashboard-shell {
  display: grid;}


.dashboard-topbar .muted {
  margin-top: 12px;
  max-width: 880px;
  font-size: 1.04rem;
  line-height: 1.75;
}


.dashboard-kpi-card,
.dashboard-activity-panel,
.dashboard-performance-panel,
.dashboard-panel {
  position: relative;}


.dashboard-kpi-card::before,
.dashboard-activity-panel::before,
.dashboard-performance-panel::before,
.dashboard-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(117, 185, 255, 0.28), transparent 76%);
  pointer-events: none;
}

.dashboard-kpi-card::after {
  content: "";
  position: absolute;
  top: -2rem;
  right: -2rem;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 198, 255, 0.2), transparent 68%);
  pointer-events: none;
}


.dashboard-panel-header {
  margin-bottom: 16px;
}

.dashboard-panel-header .pill {
  max-width: min(100%, 420px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-admin-page {
  gap: 18px;
}

.stats-kpi-strip-wide {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.stats-admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-metric-grid {
  gap: 12px;
  margin-bottom: 16px;}

.stats-metric-box,
.stats-quota-card,
.stats-inline-row {
  border: 1px solid rgba(115, 160, 214, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(243, 249, 255, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.stats-metric-box {
  border-radius: 18px;}

.stats-metric-box span,
.stats-quota-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.stats-metric-box strong {
  color: #102440;
  font-size: 1.7rem;
  line-height: 1;
}

.stats-performance {
  margin-top: 12px;
}

.stats-compact-panel {
  min-height: 260px;
}

.stats-category-stack.compact {
  gap: 8px;
}

.stats-inline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 14px;
}

.stats-inline-row span {
  min-width: 0;
  overflow: hidden;
  color: #314a66;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-inline-row strong {
  color: #102440;
  font-size: 1rem;
}

.stats-table-wrap {
  max-height: 620px;
  overflow: auto;
}

.stats-detail-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f8fd;
}

.stats-detail-table td,
.stats-detail-table th {
  white-space: nowrap;
}

.stats-quota-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.stats-quota-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
}

.stats-quota-card > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.stats-quota-progress {
  display: grid;
  gap: 8px;
}

.stats-quota-progress small {
  color: var(--muted);
}

.stats-admin-v2 {
  gap: 14px;
}

.stats-command-panel {
  display: grid;
  grid-template-columns: minmax(190px, auto) minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f9fbfd);
  box-shadow: 0 10px 22px rgba(31, 41, 55, 0.05);
}

.stats-command-meta {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #e5ebf3;
  border-radius: 8px;
  background: #ffffff;
}

.selected-outbox-item[hidden],
#selected-outbox-empty[hidden] {
  display: none !important;
}

.stats-command-meta strong,
.stats-command-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-command-meta strong {
  color: #111827;
  font-size: 0.9rem;
  font-weight: 950;
}

.stats-command-meta span {
  color: #687383;
  font-size: 0.76rem;
  font-weight: 800;
}

.stats-command-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
}

.stats-filter-panel,
.stats-performance-card,
.stats-reply-card,
.stats-dimension-board {
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.055);
}

.stats-filter-panel {
  padding: 14px;
}

.stats-filter-form {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(160px, 0.6fr) minmax(160px, 0.6fr) auto;
  align-items: end;
  gap: 12px;
}

.stats-command-form {
  grid-template-columns: minmax(160px, 0.8fr) minmax(140px, 0.58fr) minmax(140px, 0.58fr) auto;
}

.mailbox-contact-filter-form {
  grid-template-columns: minmax(150px, 0.7fr) minmax(132px, 0.52fr) minmax(132px, 0.52fr) minmax(220px, 1fr) auto;
}

.stats-filter-form label {
  display: grid;
  gap: 6px;
}

.stats-filter-form label span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 850;
}

.stats-filter-actions {
  display: flex;
  gap: 8px;
}

.stats-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 16px;
}

.stats-performance-card,
.stats-reply-card,
.stats-dimension-board {
  padding: 18px;
}

.stats-performance-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stats-performance-metrics > div,
.stats-kpi-tile {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 0.3rem;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.stats-performance-metrics span,
.stats-kpi-tile span,
.stats-kpi-tile small,
.stats-dimension-head span,
.stats-dimension-row span {
  overflow: hidden;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-performance-metrics strong,
.stats-kpi-tile strong {
  color: #111827;
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  font-weight: 950;
  line-height: 1;
}

.stats-rate-grid {
  display: grid;
  gap: 10px;
}

.stats-rate-row {
  display: grid;
  gap: 7px;
}

.stats-rate-row > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.stats-rate-row strong,
.stats-rate-row span {
  color: #1f2937;
  font-size: 0.88rem;
  font-weight: 900;
}

.stats-rate-row i,
.stats-dimension-row i {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf5;
}

.stats-rate-row i::before,
.stats-dimension-row i::before {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--tone, #0891b2), color-mix(in srgb, var(--tone, #0891b2) 54%, #ffffff));
  content: "";
}

.stats-category-row.slim {
  padding: 11px;
  border-radius: 0.3rem;
}

.stats-dimension-board {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.stats-dimension-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.stats-dimension-card {
  --tone: #0891b2;
  display: grid;
  align-content: start;
  gap: 11px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;}

.stats-dimension-card:hover {
  border-color: color-mix(in srgb, var(--tone) 30%, #d8e1ec);
  box-shadow: 0 13px 24px rgba(31, 41, 55, 0.075);
  transform: translateY(-1px);
}

.stats-dimension-card.tone-campaigns,
.stats-dimension-card.tone-projects {
  --tone: #f19828;
  --tone-soft: rgba(241, 152, 40, 0.13);
}

.stats-dimension-card.tone-recipients,
.stats-dimension-card.tone-imports,
.stats-dimension-card.tone-contacts {
  --tone: #16a34a;
  --tone-soft: rgba(22, 163, 74, 0.11);
}

.stats-dimension-card.tone-templates,
.stats-dimension-card.tone-variants,
.stats-dimension-card.tone-users {
  --tone: #7c3aed;
  --tone-soft: rgba(124, 58, 237, 0.1);
}

.stats-dimension-card.tone-messages,
.stats-dimension-card.tone-events,
.stats-dimension-card.tone-replies,
.stats-dimension-card.tone-mailboxes {
  --tone: #0891b2;
  --tone-soft: rgba(8, 145, 178, 0.12);
}

.stats-dimension-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stats-dimension-head strong {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 950;}

.stats-dimension-list {
  display: grid;
  gap: 9px;
}

.stats-dimension-row {
  display: grid;}

.stats-dimension-row > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}


.stats-dimension-empty {
  padding: 14px;
  border: 1px dashed #cbd5e1;
  border-radius: 0.3rem;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
}

.stats-kpi-grid-modern {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.mailbox-send-kpi-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.stats-kpi-tile {
  min-height: 116px;
}

.stats-kpi-tile.accent {
  background:
    radial-gradient(circle at 100% 0, rgba(8, 145, 178, 0.16), transparent 8rem),
    linear-gradient(180deg, #ffffff, #eef9fb);
}

@media (max-width: 1520px) {
  .stats-dimension-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .stats-kpi-grid-modern {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mailbox-send-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1320px) {
  .stats-dimension-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .stats-command-panel,
  .stats-top-grid,
  .stats-filter-form,
  .stats-command-form {
    grid-template-columns: 1fr;
  }

  .stats-command-actions,
  .stats-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-performance-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .stats-dimension-grid,
  .stats-kpi-grid-modern,
  .mailbox-send-kpi-grid,
  .stats-performance-metrics {
    grid-template-columns: 1fr;
  }
}


.dashboard-chart-grid,
.dashboard-chart-highlight,
.dashboard-chart-wave,
.dashboard-chart-svg,
.dashboard-chart-legend,
.dashboard-chart-labels {
  position: absolute;
}


.dashboard-chart-highlight {
  top: 12%;
  right: 10%;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(119, 198, 255, 0.24), transparent 66%);
  filter: blur(2px);
}

.dashboard-chart-legend {
  z-index: 2;
  display: flex;
  flex-wrap: wrap;}

.dashboard-legend-item {
  display: inline-flex;
  align-items: center;}

.dashboard-legend-swatch {
  border-radius: 50%;
  flex: 0 0 auto;}


.dashboard-chart-svg {
  z-index: 1;
  overflow: visible;}


.dashboard-chart-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;}


.dashboard-chart-wave {
  left: 18px;
  right: 18px;
  bottom: 38px;
  border-radius: 24px 24px 0 0;
  transform-origin: center bottom;
  animation: dashboardWaveFloat 11s ease-in-out infinite;
}

.dashboard-chart-wave.wave-a {
  height: 72%;
  opacity: 0.92;
  background: linear-gradient(180deg, rgba(75, 180, 255, 0.52), rgba(75, 180, 255, 0.18));
  clip-path: polygon(0 72%, 8% 56%, 18% 68%, 30% 46%, 43% 62%, 55% 30%, 68% 48%, 80% 24%, 90% 54%, 100% 38%, 100% 100%, 0 100%);
}

.dashboard-chart-wave.wave-b {
  height: 58%;
  opacity: 0.78;
  background: linear-gradient(180deg, rgba(52, 115, 224, 0.44), rgba(52, 115, 224, 0.12));
  clip-path: polygon(0 54%, 12% 74%, 24% 42%, 38% 60%, 50% 34%, 62% 68%, 74% 48%, 86% 74%, 100% 56%, 100% 100%, 0 100%);
  animation-duration: 9.5s;
}

.dashboard-chart-wave.wave-c {
  height: 46%;
  opacity: 0.68;
  background: linear-gradient(180deg, rgba(88, 225, 255, 0.3), rgba(88, 225, 255, 0.08));
  clip-path: polygon(0 68%, 14% 58%, 28% 72%, 40% 48%, 56% 60%, 68% 34%, 82% 56%, 100% 28%, 100% 100%, 0 100%);
  animation-duration: 13s;
}

.dashboard-chart-labels {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;}

.dashboard-mini-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;}

.dashboard-mini-stat,
.dashboard-performance-item,
.dashboard-performance-note,
.dashboard-feed-item,
.dashboard-quick-card {
  border: 1px solid rgba(115, 160, 214, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(243, 249, 255, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.dashboard-mini-stat {
  display: grid;
  gap: 8px;
  min-height: 108px;
  padding: 16px 18px;
  border-radius: 20px;
}

.dashboard-mini-stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-mini-stat strong {
  color: #123056;
  font-size: 1.02rem;
  line-height: 1.5;
}


.dashboard-performance-list,
.dashboard-performance-foot,
.dashboard-feed {
  display: grid;
  gap: 12px;
}

.dashboard-performance-item,
.dashboard-performance-note {
  border-radius: 20px;}


.dashboard-feed-item {
  justify-content: space-between;
  border-radius: 20px;}


.dashboard-feed-item.plain {
  cursor: default;
}


.dashboard-feed-side {
  flex: 0 0 auto;
  align-items: flex-start;}

.dashboard-panel-actions {
  display: grid;
  gap: 16px;
}


.dashboard-quick-card {
  border-radius: 22px;}


.dashboard-quick-card strong {
  line-height: 1.58;}

.dashboard-process-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.dashboard-process-step {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(115, 160, 214, 0.14);
  background: rgba(255, 255, 255, 0.74);
  color: #5d7c9e;
  font-size: 0.92rem;
  font-weight: 700;
}

.dashboard-process-step.active {
  color: #1d55af;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(226, 240, 255, 0.92));
  box-shadow: 0 12px 24px rgba(47, 115, 224, 0.1);
}

@keyframes dashboardWaveFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@media (max-width: 1520px) {
  .dashboard-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .dashboard-analytics-grid,
  .dashboard-workbench-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .dashboard-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-topbar-actions {
    justify-content: flex-start;
  }

  .dashboard-kpi-strip,
  .dashboard-mini-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-chart-canvas {
    min-height: 300px;
  }
}

@media (max-width: 720px) {
  .dashboard-kpi-strip,
  .dashboard-mini-stats,
  .dashboard-quick-grid,
  .dashboard-chart-labels {
    grid-template-columns: 1fr;
  }

  .dashboard-chart-legend {
    position: static;
    padding: 14px 14px 0;
  }

  .dashboard-chart-svg {
    inset: 76px 14px 48px;
    width: calc(100% - 28px);
    height: calc(100% - 124px);
  }

  .dashboard-topbar h1 {
    font-size: 2rem;
  }

  .dashboard-chart-canvas {
    min-height: 260px;
  }

  .dashboard-chart-labels {
    gap: 8px;
    text-align: left;
  }

  .dashboard-feed-item {
    flex-direction: column;
  }
}

/* Shared admin workspace */
.dashboard-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.72fr);
  gap: 18px;
}

.dashboard-stack {
  display: grid;
  gap: 18px;
}

.dashboard-panel .grid-form,
.dashboard-panel .table-wrap,
.dashboard-panel .tip-box,
.dashboard-panel .mailbox-card-grid,
.dashboard-panel .mailbox-empty,
.dashboard-panel .reply-grid,
.dashboard-panel .variant-grid,
.dashboard-panel .progress-shell {
  margin-top: 8px;
}

.dashboard-panel .table-wrap {
  margin-top: 10px;
}

.dashboard-panel .action-row {
  align-items: center;
}

.dashboard-note-grid {
  display: grid;
  gap: 12px;
}

.dashboard-note-card {
  display: grid;
  gap: 8px;
  min-height: 108px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(115, 160, 214, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(243, 249, 255, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.dashboard-note-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-note-card strong {
  color: #123056;
  font-size: 1rem;
  line-height: 1.56;
}

.dashboard-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.dashboard-panel .reply-grid {
  margin-top: 0;
}

.dashboard-panel .reply-card {
  border-radius: 22px;
}

.dashboard-panel .variant-card {
  border-radius: 22px;
  border-color: rgba(115, 160, 214, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(243, 249, 255, 0.82));
  box-shadow:
    0 18px 36px rgba(45, 93, 160, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.dashboard-panel .tip-box.compact-box {
  margin-top: 0;
}

@media (max-width: 1200px) {
  .dashboard-split-grid {
    grid-template-columns: 1fr;
  }
}

/* Roomier layout after removing explanatory helper copy */


.dashboard-topbar h1,
.section-header h1 {
  font-size: clamp(2.15rem, 3vw, 3.05rem);
}


.dashboard-panel .grid-form,
.dashboard-panel .table-wrap,
.dashboard-panel .mailbox-card-grid,
.dashboard-panel .mailbox-empty,
.dashboard-panel .reply-grid,
.dashboard-panel .variant-grid,
.dashboard-panel .progress-shell {
  margin-top: 14px;
}


.grid-form label,
.checkbox-field {
  gap: 10px;
}

input,
textarea,
select {
  min-height: 50px;
}

textarea {
  min-height: 210px;
}

button,
.ghost-btn,
.secondary-btn {
  min-height: 48px;
}


.mailbox-card-grid,
.reply-grid,
.variant-grid,
.dashboard-feed,
.stats-ranking-list {
  gap: 20px;
}

.mailbox-card,
.reply-card,
.variant-card,
.dashboard-feed-item,
.stats-ranking-item {
  padding: 22px;
}

.mailbox-empty,
.empty-cell,
.empty {
  padding: 34px;
}

@media (max-width: 900px) {
  .page {
    padding: 24px 16px 32px;
  }

  .dashboard-panel,
  .dashboard-activity-panel,
  .dashboard-performance-panel,
  .panel {
    padding: 24px;
  }

  .dashboard-panel,
  .panel {
    min-height: 0;
  }
}

/* Full-width admin workspace */


.page {
  max-width: none;
  margin: 0;}

.dashboard-shell,
.mailbox-hero,
.panel,
.dashboard-panel {
  width: 100%;
}

.mailbox-hero {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.42fr);
  align-items: stretch;
}

.mailbox-hero-content {
  align-content: center;
}

.mailbox-hero-stats {
  align-content: stretch;
}


.mailbox-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
}

@media (min-width: 1500px) {
  .mailbox-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1840px) {
  .page {
    padding-right: 72px;
    padding-left: 72px;
  }
}

@media (max-width: 1260px) {
  .page {
    padding: 32px 28px 44px;
  }

  .mailbox-hero,
  .mailbox-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .page {
    padding: 24px 16px 32px;
  }
}

/* Dashboard refinement */


.dashboard-status-line {
  color: #64748b;
  font-size: 0.9rem;}


.dashboard-topbar-actions .ghost-btn,
.dashboard-topbar-actions .secondary-btn {
  min-width: 0;}


.dashboard-kpi-card,
.dashboard-activity-panel,
.dashboard-performance-panel,
.dashboard-panel {
  overflow: hidden;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  backdrop-filter: none;
}

.dashboard-kpi-card::before,
.dashboard-activity-panel::before,
.dashboard-performance-panel::before,
.dashboard-panel::before,
.dashboard-kpi-card::after {
  display: none;
}


.dashboard-kpi-card span {
  letter-spacing: 0;}

.dashboard-kpi-card strong {
  letter-spacing: 0;}


.dashboard-kpi-card.accent {
  background: #ffffff;
}

.tone-contacts {
  border-left-color: #2563eb;
}

.tone-campaigns {
  border-left-color: #0f766e;
}

.tone-sent {
  border-left-color: #16a34a;
}

.tone-replies {
  border-left-color: #7c3aed;
}

.tone-opened {
  border-left-color: #0891b2;
}

.tone-quota {
  border-left-color: #f59e0b;
}


.dashboard-panel,
.panel {
  min-height: 0;
}

.dashboard-panel-header,
.section-header.compact {
  margin-bottom: 14px;
}

.dashboard-panel-header h2 {
  letter-spacing: 0;}

.dashboard-panel-header .pill,
.dashboard-panel .pill {
  border-color: #dbe4ee;}


.dashboard-chart-grid {
  border-bottom: 1px solid #e2e8f0;
  border-left: 1px solid #e2e8f0;}

.dashboard-chart-highlight {
  display: none;
}

.dashboard-chart-scale {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: space-between;}


.dashboard-legend-item {
  border-color: #dbe4ee;}


.swatch-imports {
  background: #2563eb;
}

.swatch-sent {
  background: #16a34a;
}

.swatch-opened {
  background: #0891b2;
}

.swatch-replies {
  background: #7c3aed;
}

.dashboard-chart-svg {
  inset: 56px 18px 50px 46px;
  width: calc(100% - 64px);
  height: calc(100% - 106px);
}

.dashboard-chart-area {
  fill: rgba(22, 163, 74, 0.08);
}

.dashboard-chart-line {
  stroke-width: 2.6;
}

.line-imports {
  stroke: #2563eb;
}

.line-sent {
  stroke: #16a34a;
}

.line-opened {
  stroke: #0891b2;
}

.line-replies {
  stroke: #7c3aed;
}

.dashboard-chart-labels {
  right: 18px;
  bottom: 14px;
  left: 46px;
  gap: 0;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 700;
}


.dashboard-mini-stats {
  display: none;
}

.dashboard-performance-panel {
  align-content: start;}


.stats-bar-fill {
  background: linear-gradient(90deg, #60a5fa, #2563eb);
}

.stats-bar-fill.fill-replies {
  background: linear-gradient(90deg, #a78bfa, #7c3aed);
}


.dashboard-performance-note strong {
  line-height: 1.1;}


.dashboard-feed-item.plain {
  background: #f8fafc;
}


@media (max-width: 1520px) {
  .dashboard-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
  .dashboard-analytics-grid,
  .dashboard-workbench-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-quick-grid,
  .dashboard-series-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .dashboard-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-topbar h1 {
    font-size: 1.55rem;
  }

  .dashboard-topbar-actions {
    justify-content: flex-start;
  }

  .dashboard-kpi-strip,
  .dashboard-series-summary,
  .dashboard-quick-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-chart-canvas {
    min-height: 300px;
  }

  .dashboard-chart-legend {
    position: static;
    padding: 12px 12px 0 44px;
  }

  .dashboard-chart-svg {
    inset: 86px 16px 48px 42px;
    width: calc(100% - 58px);
    height: calc(100% - 134px);
  }

  .dashboard-chart-grid,
  .dashboard-chart-scale {
    top: 84px;
  }

  .dashboard-chart-labels {
    grid-template-columns: repeat(7, minmax(34px, 1fr));
    overflow: auto;
    text-align: center;
  }

  .dashboard-feed-item {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Dashboard trend bar chart */


.dashboard-chart-svg,
.dashboard-chart-labels {
  display: none;
}


.dashboard-bar {
  position: relative;
  display: block;
  min-height: 0;
  transition: height 0.2s ease, opacity 0.2s ease, transform 0.2s ease;}

.dashboard-bar:hover {
  opacity: 0.82;
  transform: translateY(-2px);
}

.dashboard-bar::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 50%;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: 180px;
  padding: 6px 8px;
  color: #ffffff;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translateX(50%) translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  white-space: nowrap;}

.dashboard-bar::before {
  content: "";
  position: absolute;
  right: 50%;
  bottom: calc(100% + 4px);
  width: 8px;
  height: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(50%) rotate(45deg);
  transition: opacity 0.16s ease;}

.dashboard-bar:hover::after,
.dashboard-bar:hover::before,
.dashboard-bar:focus::after,
.dashboard-bar:focus::before {
  opacity: 1;
}

.dashboard-bar:hover::after,
.dashboard-bar:focus::after {
  transform: translateX(50%) translateY(0);
}

.bar-imports {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.bar-sent {
  background: linear-gradient(180deg, #34d399, #16a34a);
}

.bar-opened {
  background: linear-gradient(180deg, #22d3ee, #0891b2);
}

.bar-replies {
  background: linear-gradient(180deg, #a78bfa, #7c3aed);
}

.dashboard-bar-label {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;}

@media (max-width: 980px) {
  .dashboard-chart-canvas {
    overflow-x: auto;
  }

  .dashboard-bar-chart {
    min-width: 680px;
  }
}

@media (max-width: 720px) {
  .dashboard-chart-canvas {
    padding-top: 78px;
  }

  .dashboard-chart-grid {
    top: 78px;
  }

  .dashboard-chart-scale {
    top: 78px;
  }

  .dashboard-chart-legend {
    padding: 12px 12px 0 46px;
  }
}

/* Login page reset */


.page.page-login {
  display: grid;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 32px 18px;
  place-items: center;
}

.login-layout.login-layout-compact {
  display: grid;
  min-height: 0;
  margin: 0 auto;
  place-items: stretch;}

.login-form-card.login-form-card-center {
  width: 100%;
  min-height: 0;
  margin: 0;}

.login-form-card.login-form-card-center h2 {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0;}

.login-form-card.login-form-card-center .grid-form {
  gap: 16px;}

.login-form-card.login-form-card-center button {
  width: 100%;
}

@media (max-width: 520px) {
  .login-form-card.login-form-card-center {
    padding: 24px;
  }
}

/* Reply workbench */
.reply-workbench {
  gap: 16px;
}

.reply-topbar {
  align-items: flex-start;
}

.reply-topbar-actions {
  align-items: end;
  min-width: min(100%, 620px);
}

.reply-inbox-form label {
  display: grid;
  gap: 6px;
  min-width: min(100vw - 48px, 360px);
}

.reply-inbox-form span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.reply-kpi-row {
  display: grid;}

.reply-kpi {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);}

.reply-kpi span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.reply-kpi strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-list-panel .muted {
  margin: 4px 0 0;
}

.reply-table-wrap {
  overflow-x: auto;
}

.reply-table {
  min-width: 1320px;
}

.reply-table th,
.reply-table td {
  vertical-align: middle;
}

.reply-type-pill,
.reply-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #dbe4ee;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.reply-type-pill.is-reply {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.reply-type-pill.is-bounce,
.reply-status-chip.is-danger {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.reply-type-pill.is-auto-reply {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.reply-status-chip.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.reply-status-chip.is-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.reply-status-chip.is-neutral {
  border-color: #dbe4ee;
  background: #f8fafc;
  color: #475569;
}

.reply-cell-main,
.reply-subject-cell {
  max-width: 320px;
  overflow: hidden;
  color: #172033;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-cell-sub {
  max-width: 360px;
  overflow: hidden;
  margin-top: 3px;
  color: #64748b;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-pager {
  justify-content: flex-end;
}

.reply-detail-modal {
  padding: 16px;
}

.reply-detail-card {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 18px;
  overflow: auto;}

.reply-detail-header {
  align-items: flex-start;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.reply-detail-header h2 {
  max-width: min(100%, 820px);
  overflow: hidden;
  margin: 4px 0;
  color: #0f172a;
  font-size: 1.2rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-detail-kind {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 800;
}

.reply-modal-toast {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #15803d;
  font-weight: 700;
}

.reply-modal-toast.is-error {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.reply-modal-toast.is-info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.reply-detail-loading,
.reply-info-empty {
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
}

.reply-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(430px, 0.55fr);
  gap: 14px;
  align-items: start;
}

.reply-detail-main,
.reply-side-block {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.reply-detail-main {
  display: grid;
  gap: 12px;
}

.reply-detail-side {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.reply-detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reply-detail-section-head h3 {
  margin: 0;
  color: #172033;
  font-size: 0.96rem;
}

.reply-message-info,
.reply-info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.reply-info-list {
  grid-template-columns: 1fr;
}

.reply-message-info div,
.reply-info-list div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #f8fafc;
}

.reply-message-info span,
.reply-info-list span {
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 800;
}

.reply-message-info strong,
.reply-info-list strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-body-box {
  min-height: 360px;
  max-height: 62vh;
  overflow: auto;
  padding: 16px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #ffffff;
  color: #172033;
  line-height: 1.68;
}

.reply-plain-body {
  white-space: pre-wrap;
  word-break: break-word;
}

.reply-ai-result {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.reply-ai-category {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.82rem;
  font-weight: 800;
}

.reply-ai-result p {
  margin: 0;
  color: #475569;
  line-height: 1.65;
}

.reply-draft-preview-wrap {
  display: grid;
  gap: 6px;
  margin: 10px 0 12px;
}

.reply-draft-label {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.reply-draft-preview {
  min-height: 180px;
  max-height: 320px;
  overflow: auto;
  padding: 14px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #ffffff;
  color: #172033;
  line-height: 1.68;
}

.reply-review-form {
  display: grid;
  gap: 10px;
}

.reply-review-form label {
  display: grid;
  gap: 6px;
}

.reply-review-form label span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.reply-review-form textarea {
  min-height: 360px;
  resize: vertical;
}

@media (max-width: 1100px) {
  .reply-kpi-row,
  .reply-detail-layout {
    grid-template-columns: 1fr;
  }

  .reply-topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .reply-detail-modal {
    padding: 8px;
  }

  .reply-detail-card {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    padding: 14px;
  }

  .reply-message-info {
    grid-template-columns: 1fr;
  }

  .reply-body-box {
    min-height: 260px;
    max-height: 52vh;
  }
}

/* My-Task inspired admin skin */
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --line: #e5e9f2;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #484c7f;
  --accent-strong: #3f4376;
  --accent-soft: #eef2ff;
  --success: #22c55e;
  --info: #0ea5e9;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 10px 28px rgba(25, 30, 60, 0.07);
  --shadow-soft: 0 8px 18px rgba(25, 30, 60, 0.045);
  --radius: 10px;
  --radius-sm: 8px;
  --font: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

html {
  background: var(--bg);
}

body {
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font);
  font-size: 14px;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  grid-template-columns: 260px minmax(0, 1fr);
  background: var(--bg);
}

.shell-login {
  grid-template-columns: minmax(0, 1fr);
}

.sidebar {
  align-self: start;
  gap: 22px;}

.brand {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);}


.brand-title {
  letter-spacing: 0;}

.brand-sub,
.user-meta {
  color: rgba(248, 250, 252, 0.66);
}


.nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;}

.nav a::before {
  content: "";
  position: absolute;}

.nav a:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  transform: translateX(2px);
}

.nav a.active {
  background: #ffffff;
  color: #484c7f;
  box-shadow: 0 10px 22px rgba(27, 31, 74, 0.18);
}

.nav a.active::before {
  background: #484c7f;
  border-color: #484c7f;
  opacity: 1;
}


.user-name {
  color: #ffffff;
  font-weight: 800;
}

.sidebar .ghost-btn {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;}

.sidebar .ghost-btn:hover {
  border-color: rgba(255, 255, 255, 0.42);}

.page {
  width: 100%;}

.dashboard-shell,
.reply-workbench {
  display: grid;}


.dashboard-topbar h1 {
  letter-spacing: 0;}

.dashboard-status-line,
.dashboard-topbar .muted,
.section-header .muted,
.muted {
  color: var(--muted);
}

.dashboard-topbar-actions,
.action-row,
.modal-actions,
.template-action-row {
  gap: 8px;
}

.dashboard-panel,
.dashboard-activity-panel,
.dashboard-performance-panel,
.panel,
.stat-card,
.list-card,
.hero-card,
.mailbox-panel,
.stats-filter-panel,
.stats-panel,
.stats-compact-panel,
.reply-kpi,
.reply-detail-main,
.reply-side-block,
.reply-body-box,
.reply-draft-preview,
.template-editor-card,
.variant-template-card,
.variant-card,
.reply-card,
.mailbox-card,
.login-form-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
}

.dashboard-panel,
.dashboard-activity-panel,
.dashboard-performance-panel,
.panel,
.hero-card {
  padding: 20px;
}


.dashboard-panel::before,
.dashboard-activity-panel::before,
.dashboard-performance-panel::before,
.panel::before {
  display: none;
}

.dashboard-panel-header,
.section-header {
  align-items: center;
  margin-bottom: 16px;}

.section-header.compact {
  margin-bottom: 14px;
}

.dashboard-panel-header h2,
.section-header h1,
.section-header h2,
.panel h2,
.modal-header h2 {
  margin: 0;
  color: #1f2937;
  line-height: 1.3;
  letter-spacing: 0;}


.dashboard-kpi-card,
.stat-card {
  position: relative;
  overflow: hidden;}

.dashboard-kpi-card::after,
.stat-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: #484c7f;
}

.dashboard-kpi-card.tone-contacts::after,
.stat-card:nth-child(4n + 1)::after {
  background: #0ea5e9;
}

.dashboard-kpi-card.tone-campaigns::after,
.stat-card:nth-child(4n + 2)::after {
  background: #8b5cf6;
}

.dashboard-kpi-card.tone-sent::after,
.stat-card:nth-child(4n + 3)::after {
  background: #22c55e;
}

.dashboard-kpi-card.tone-replies::after,
.stat-card:nth-child(4n + 4)::after {
  background: #f59e0b;
}

.dashboard-kpi-card span,
.stat-card span,
.list-card span {
  color: #7b8294;
  font-size: 0.78rem;
  font-weight: 800;
}

.dashboard-kpi-card strong,
.stat-card strong {
  letter-spacing: 0;}

.dashboard-kpi-card small,
.stat-card small,
.list-card small {
  color: var(--muted);
}

.dashboard-analytics-grid,
.dashboard-workbench-grid,
.campaign-detail-layout,
.mailbox-detail-grid,
.stats-grid,
.panel-grid {
  gap: 16px;
}

.dashboard-feed-item,
.dashboard-series-row,
.dashboard-performance-item,
.list-card {
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: #f9fafc;
}

.dashboard-feed-item:hover,
.list-card:hover {
  border-color: #cfd6e6;
  background: #ffffff;
}


.bar-sent,
.stats-bar-fill {
  background: #22c55e;
}

.bar-opened,
.stats-bar-fill.fill-opened {
  background: #0ea5e9;
}

.bar-replies,
.stats-bar-fill.fill-replies {
  background: #8b5cf6;
}

.stats-bar-fill.danger {
  background: #ef4444;
}

.stats-bar {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #edf2f7;
}

.pill,
.reply-type-pill,
.reply-status-chip,
.template-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #dbe3f1;
  border-radius: 999px;
  background: #f3f6fb;
  color: #536079;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.notice {
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.notice-info,
.tip-box,
.empty,
.mailbox-empty,
.reply-detail-loading,
.reply-info-empty {
  border-color: #dbeafe;
  background: #eff6ff;
  color: #1e40af;
}

.notice-success,
.reply-status-chip.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.notice-error,
.notice-danger,
.reply-type-pill.is-bounce,
.reply-status-chip.is-danger {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #be123c;
}

.notice-warning,
.reply-type-pill.is-auto-reply,
.reply-status-chip.is-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

button,
.ghost-btn,
.secondary-btn,
.danger-btn,
.danger-ghost,
.text-link,
.mini-btn,
.template-change-button,
.mode-option {
  min-height: 38px;
  border-radius: 8px;
  font-weight: 800;
  letter-spacing: 0;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button:not(.icon-btn):not(.mode-option):not(.danger-ghost),
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #484c7f;
  color: #ffffff;}

button:not(.icon-btn):not(.mode-option):not(.danger-ghost):hover,
.secondary-btn:hover {
  border-color: #3f4376;
  background: #3f4376;
  color: #ffffff;
  transform: translateY(-1px);
}

.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #d8deeb;
  box-shadow: none;}

.ghost-btn:hover,
.text-link:hover {
  border-color: #bfc7da;
  transform: translateY(-1px);}

.danger-btn,
.danger-ghost {
  border: 1px solid #fecdd3;
  background: #fff1f2;
  color: #be123c;
  box-shadow: none;
}

.danger-btn:hover,
.danger-ghost:hover {
  border-color: #fda4af;
  background: #ffe4e6;
  color: #9f1239;
}

.mini-btn {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 0.78rem;
}

.icon-btn {
  display: inline-grid;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid #d8deeb;
  background: #ffffff;
  color: #64748b;
  box-shadow: none;}

.icon-btn:hover {
  border-color: #c7d2e4;
  background: #f8fafc;
  color: #111827;
}

.mode-switch,
.test-template-segment,
.send-template-source-panel .template-source-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);}

.mode-option {
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  box-shadow: none;
}

.mode-option:hover,
.mode-option.active {
  box-shadow: var(--shadow-soft);}

.grid-form {
  gap: 14px;
}

.grid-form label,
.single-form label,
.reply-review-form label {
  gap: 7px;
}

.grid-form span,
.single-form span,
.reply-review-form label span,
.reply-draft-label {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

input,
select,
textarea {
  min-height: 40px;
  border: 1px solid #dbe2ef;
  background: #ffffff;
  color: #1f2937;
  box-shadow: none;}

textarea {
  line-height: 1.6;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #c6cede;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #6970ad;
  outline: 3px solid rgba(72, 76, 127, 0.14);
}

input[type="file"] {
  padding: 8px;
  background: #f8fafc;
}

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  accent-color: #484c7f;
}

.table-wrap,
.mailbox-table-wrap,
.reply-table-wrap,
.stats-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);}

table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
  text-transform: none;
  white-space: nowrap;}

td {
  border-bottom: 1px solid #eef1f6;}

th,
td {
  vertical-align: middle;}

tbody tr {
  background: #ffffff;
}


tbody tr:last-child td {
  border-bottom: 0;
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.modal-shell {
  padding: 22px;
}

.modal-backdrop {
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(3px);
}

.modal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

.modal-header,
.modal-actions {
  border-color: var(--line);
}

.modal-header {
  padding-bottom: 14px;
}

.modal-actions {
  padding-top: 14px;
}

.loading-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
}

.loading-spinner {
  border-color: #e5e7eb;
  border-top-color: #484c7f;
}

.send-template-source-panel,
.test-template-source-panel,
.template-editor-card,
.variant-template-card,
.reply-side-block {
  border-color: var(--line);
  background: #ffffff;
}

.send-template-source-panel .template-source-options label,
.test-template-segment label,
.choice-card,
.mailbox-choice-card {
  border: 1px solid #dbe2ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.send-template-source-panel .template-source-options label:hover,
.test-template-segment label:hover,
.choice-card:hover,
.mailbox-choice-card:hover {
  border-color: #bfc7da;
  background: #fbfcff;
}

.send-template-source-panel .template-source-options label:has(input:checked),
.test-template-segment label:has(input:checked),
.choice-card:has(input:checked),
.mailbox-choice-card:has(input:checked) {
  border-color: #6970ad;
  background: #eef2ff;
  color: #3730a3;
}

.mail-preview-panel,
.mail-preview-frame,
.rich-editor-surface,
.body-preview,
.variant-template-preview .body-preview {
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.login-layout.login-layout-compact {
  width: min(480px, 100%);
}

.page.page-login {
  background: #f5f7fb;
}

.login-form-card.login-form-card-center {
  position: relative;
  overflow: hidden;
  max-width: 480px;
  padding: 34px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 22px 54px rgba(25, 30, 60, 0.12);}

.login-form-card.login-form-card-center::before {
  content: "";
  display: block;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: #484c7f;
  box-shadow: 0 12px 24px rgba(72, 76, 127, 0.2);
}

.login-form-card.login-form-card-center h2 {
  color: #1f2937;
  font-size: 1.45rem;
}

.login-form-card.login-form-card-center .grid-form {
  margin-top: 20px;
}

.login-form-card.login-form-card-center button {
  min-height: 44px;
}

.reply-table,
.mailbox-table-wrap table,
.project-preview-wrap table {
  min-width: 960px;
}

@media (max-width: 1180px) {
  .shell {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .page {
    padding: 20px;
  }

  .dashboard-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: relative;
    height: auto;
    padding: 14px;
  }

  .brand {
    padding-bottom: 10px;
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav a {
    min-height: 38px;
    padding: 9px 10px 9px 32px;
  }

  .nav a:hover {
    transform: none;
  }

  .sidebar-footer {
    margin-top: 0;
  }

  .dashboard-topbar {
    align-items: flex-start;
    min-height: 0;
  }

  .dashboard-topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 14px;
  }

  .nav {
    grid-template-columns: 1fr;
  }

  .dashboard-topbar,
  .dashboard-panel,
  .dashboard-activity-panel,
  .dashboard-performance-panel,
  .panel,
  .hero-card {
    padding: 16px;
  }

  .dashboard-topbar h1 {
    font-size: 1.2rem;
  }

  .dashboard-kpi-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-kpi-card,
  .stat-card {
    min-height: 112px;
  }

  .dashboard-kpi-card strong,
  .stat-card strong {
    font-size: 1.45rem;
  }

  .grid-form {
    grid-template-columns: 1fr;
  }

  .modal-shell {
    padding: 10px;
  }

  .login-form-card.login-form-card-center {
    padding: 26px;
  }
}

/* My-Task layout correction */
:root {
  --body-color: #f9fbfd;
  --card-color: #ffffff;
  --primary-color: #484c7f;
  --secondary-color: #f19828;
  --chart-color1: #484c7f;
  --chart-color2: #f19828;
  --chart-color3: #f5558d;
  --chart-color4: #a7daff;
  --chart-color5: #9cbf3b;
  --chart-color6: #a0c1b8;
  --text-color: #212529;
  --border-color: #e9edf4;
  --bs-card-shadow: 0 2px 8px rgba(99, 99, 99, 0.08);
}

html,
body {
  background: var(--body-color);
  color: var(--text-color);
}

.shell:not(.shell-login) {
  display: flex;
  min-height: 100vh;
  align-items: flex-start;
  background: var(--body-color);
}

.sidebar {
  position: sticky;
  top: 25px;
  flex: 0 0 260px;
  width: 260px;
  height: calc(100vh - 50px);
  margin: 25px;
  padding: 24px;
  overflow-y: auto;
  border: 0;
  border-radius: 1.1rem;
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: none;
  scrollbar-width: none;}

.sidebar::-webkit-scrollbar {
  width: 0;
}

.brand {
  min-height: 60px;
  gap: 15px;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.brand-mark {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--primary-color);
  box-shadow: none;
  font-size: 1.25rem;
  font-weight: 900;
  overflow: hidden;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.brand-title {
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.12;
}

.brand-sub {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
}

.nav {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
}

.nav a {
  min-height: 44px;
  padding: 10px 0 10px 34px;
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  box-shadow: none;
  font-size: 16px;
  font-weight: 700;
  opacity: 0.94;
}

.nav a::before {
  left: 0;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  opacity: 1;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(-50%);
}

.nav a:hover,
.nav a.active {
  background: transparent;
  color: var(--secondary-color);
  transform: none;
}

.nav a:hover::before,
.nav a.active::before {
  background: rgba(241, 152, 40, 0.18);
}

.nav a.active::after {
  background: var(--secondary-color);
}

.sidebar-footer {
  gap: 5px;
  padding: 16px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;}

.sidebar .ghost-btn {
  justify-content: flex-start;
  width: fit-content;
  min-width: 0;
  min-height: 32px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.sidebar .ghost-btn:hover {
  background: transparent;
  color: var(--secondary-color);
  transform: none;
}

.page {
  flex: 1 1 auto;
  min-width: 0;
  padding: 22px 28px 28px 0;
}

.dashboard-shell,
.reply-workbench {
  gap: 18px;
}

.dashboard-topbar {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;}


.dashboard-panel,
.dashboard-activity-panel,
.dashboard-performance-panel,
.panel,
.stat-card,
.list-card,
.mailbox-panel,
.stats-filter-panel,
.stats-panel,
.stats-compact-panel,
.reply-kpi,
.reply-detail-main,
.reply-side-block,
.reply-body-box,
.reply-draft-preview,
.template-editor-card,
.variant-template-card,
.variant-card,
.reply-card,
.mailbox-card,
.modal-card,
.login-form-card {
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  background: var(--card-color);
  box-shadow: var(--bs-card-shadow);
}

.dashboard-panel,
.dashboard-activity-panel,
.dashboard-performance-panel,
.panel {
  padding: 0;
}

.dashboard-panel:hover,
.dashboard-activity-panel:hover,
.dashboard-performance-panel:hover,
.panel:hover,
.stat-card:hover,
.list-card:hover {
  box-shadow: var(--bs-card-shadow);
}

.dashboard-panel-header,
.section-header {
  min-height: 54px;
  margin: 0;
  padding: 14px 16px;
  border-bottom: 0;
  background: transparent;
}

.dashboard-panel-header h2,
.section-header h1,
.section-header h2,
.panel h2,
.modal-header h2 {
  font-size: 1rem;
  font-weight: 800;
}

.dashboard-panel > .grid-form,
.dashboard-panel > .table-wrap,
.dashboard-panel > .tip-box,
.dashboard-panel > .mailbox-card-grid,
.dashboard-panel > .mailbox-empty,
.dashboard-panel > .reply-grid,
.dashboard-panel > .variant-grid,
.dashboard-panel > .progress-shell,
.dashboard-panel > form,
.dashboard-panel > .mode-switch,
.dashboard-activity-panel > :not(.section-header):not(.dashboard-panel-header),
.dashboard-performance-panel > :not(.section-header):not(.dashboard-panel-header),
.panel > :not(.section-header) {
  margin: 0 16px 16px;
}


.dashboard-kpi-card,
.stat-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-areas:
    "icon value"
    "icon label"
    "icon meta";
  align-items: center;
  min-height: 96px;
  gap: 0 12px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  background: var(--card-color);
  box-shadow: var(--bs-card-shadow);
}

.dashboard-kpi-card::before,
.stat-card::before {
  content: "✉";
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(145deg, #67c2ff, #2f73e0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 12px 22px rgba(47, 115, 224, 0.22);
}

.dashboard-kpi-card::after,
.stat-card::after {
  display: none;
}

.dashboard-kpi-card.tone-contacts::before,
.stat-card:nth-child(4n + 1)::before {
  content: "✉";
  background: linear-gradient(145deg, #75c9ff, #2f73e0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 12px 22px rgba(47, 115, 224, 0.22);
}

.dashboard-kpi-card.tone-campaigns::before,
.stat-card:nth-child(4n + 2)::before {
  content: "◆";
  background: linear-gradient(145deg, #f3a7c8, #d94f8c);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 12px 22px rgba(217, 79, 140, 0.2);
}

.dashboard-kpi-card.tone-sent::before,
.stat-card:nth-child(4n + 3)::before {
  content: "✓";
  background: linear-gradient(145deg, #7de0a1, #22a65c);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 12px 22px rgba(34, 166, 92, 0.2);
}

.dashboard-kpi-card.tone-replies::before,
.stat-card:nth-child(4n + 4)::before {
  content: "↩";
  background: linear-gradient(145deg, #ffe28c, #f59e0b);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 12px 22px rgba(245, 158, 11, 0.2);
}

.dashboard-kpi-card.tone-opened::before {
  content: "◉";
  background: linear-gradient(145deg, #99e5ef, #0891b2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 12px 22px rgba(8, 145, 178, 0.2);
}

.dashboard-kpi-card.tone-quota::before {
  content: "↗";
  background: linear-gradient(145deg, #ffaa8a, #f97316);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 12px 22px rgba(249, 115, 22, 0.2);
}

.campaign-send-stat-grid .stat-card,
.campaign-summary-stat-grid .stat-card {
  border-color: rgba(83, 146, 220, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(242, 248, 255, 0.9));
  box-shadow:
    0 14px 32px rgba(43, 95, 166, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.campaign-send-stat-grid .stat-card::before,
.campaign-summary-stat-grid .stat-card::before {
  background: linear-gradient(145deg, #78c8ff, #2f73e0);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 12px 22px rgba(47, 115, 224, 0.2);
}

.campaign-send-stat-grid .stat-card span,
.campaign-summary-stat-grid .stat-card span,
.campaign-send-stat-grid .stat-card small,
.campaign-summary-stat-grid .stat-card small {
  color: #5f7894;
}

.campaign-send-stat-grid .stat-card strong,
.campaign-summary-stat-grid .stat-card strong {
  color: #132744;
}

.campaign-send-stat-grid .stat-mailboxes::before {
  content: "▦";
}

.campaign-send-stat-grid .stat-active-mailboxes::before {
  content: "↗";
}

.campaign-send-stat-grid .stat-paused-mailboxes::before {
  content: "Ⅱ";
}

.campaign-summary-stat-grid .stat-target-contacts::before {
  content: "◎";
}

.campaign-summary-stat-grid .stat-sent-contacts::before {
  content: "✈";
}

.campaign-summary-stat-grid .stat-replied-contacts::before {
  content: "↩";
}

.dashboard-kpi-card span,
.stat-card span {
  grid-area: label;
  color: #6c757d;
  font-size: 0.82rem;
  font-weight: 600;
}

.dashboard-kpi-card strong,
.stat-card strong {
  grid-area: value;
  color: #212529;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.1;
}

.dashboard-kpi-card small,
.stat-card small {
  grid-area: meta;
  color: #6c757d;
  font-size: 0.75rem;
}

.table-wrap,
.mailbox-table-wrap,
.reply-table-wrap,
.stats-table-wrap {
  border-radius: 0.25rem;
  border-color: var(--border-color);
  box-shadow: none;
}

th {
  background: #ffffff;
  color: #6c757d;
  font-size: 0.78rem;
}

td {
  color: #212529;
}

th,
td {
  padding: 10px 12px;
}

button:not(.icon-btn):not(.mode-option):not(.danger-ghost),
.secondary-btn {
  border-radius: 0.25rem;
  border-color: var(--primary-color);
  background: var(--primary-color);
  box-shadow: none;
}

.ghost-btn,
.text-link {
  border-radius: 0.25rem;
  border-color: var(--primary-color);
  background: #ffffff;
  color: var(--primary-color);
}

.ghost-btn:hover,
.text-link:hover {
  background: var(--primary-color);
  color: #ffffff;
}

input,
select,
textarea {
  border-radius: 0.25rem;
}

.mode-switch,
.test-template-segment,
.send-template-source-panel .template-source-options {
  border-radius: 0.25rem;
  background: #ffffff;
}

.mode-option:hover,
.mode-option.active {
  border-color: var(--primary-color);
  color: #ffffff;
  background: var(--primary-color);
}

.notice,
.pill,
.reply-type-pill,
.reply-status-chip,
.template-status-pill {
  border-radius: 0.25rem;
}

.login-form-card.login-form-card-center {
  border-radius: 0.25rem;
}

@media (max-width: 1279px) {
  .shell:not(.shell-login) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: relative;
    top: 0;
    width: auto;
    height: auto;
    margin: 14px;
    padding: 18px;
    border-radius: 1rem;
  }

  .page {
    padding: 0 14px 18px;
  }
}

@media (max-width: 900px) {
  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 12px;
  }

  .sidebar-footer {
    display: none;
  }
}

@media (max-width: 720px) {
  .dashboard-kpi-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav {
    grid-template-columns: 1fr;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
    min-width: 46px;
  }
}

/* Cross-page polish and motion */
:root {
  --surface-hover: #f8f9fc;
  --surface-soft: #f3f6fb;
  --focus-ring: rgba(72, 76, 127, 0.18);
  --human-motion: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes ui-fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ui-pop {
  from {
    opacity: 0;
    transform: scale(0.985);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ui-slide-in {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes ui-progress {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 42px 0;
  }
}

.sidebar,
.dashboard-topbar,
.mailbox-hero,
.section-header,
.dashboard-panel,
.dashboard-activity-panel,
.dashboard-performance-panel,
.panel,
.dashboard-kpi-card,
.stat-card,
.modal-card,
.login-form-card {
  animation: ui-fade-up 0.38s var(--human-motion) both;
}

.sidebar {
  animation-name: ui-slide-in;
}

.dashboard-shell > :nth-child(1),
.reply-workbench > :nth-child(1) {
  animation-delay: 0.02s;
}

.dashboard-shell > :nth-child(2),
.reply-workbench > :nth-child(2) {
  animation-delay: 0.05s;
}

.dashboard-shell > :nth-child(3),
.reply-workbench > :nth-child(3) {
  animation-delay: 0.08s;
}

.dashboard-shell > :nth-child(4),
.reply-workbench > :nth-child(4) {
  animation-delay: 0.11s;
}

.dashboard-kpi-strip > :nth-child(1) {
  animation-delay: 0.04s;
}

.dashboard-kpi-strip > :nth-child(2) {
  animation-delay: 0.07s;
}

.dashboard-kpi-strip > :nth-child(3) {
  animation-delay: 0.1s;
}

.dashboard-kpi-strip > :nth-child(4) {
  animation-delay: 0.13s;
}

.dashboard-kpi-strip > :nth-child(5) {
  animation-delay: 0.16s;
}

.dashboard-kpi-strip > :nth-child(6) {
  animation-delay: 0.19s;
}

.dashboard-panel,
.dashboard-activity-panel,
.dashboard-performance-panel,
.panel,
.dashboard-kpi-card,
.stat-card,
.choice-card,
.mailbox-card,
.variant-card,
.reply-card,
.stats-metric-box,
.stats-category-row,
.stats-inline-row,
.running-import-item {
  transition:
    transform 0.18s var(--human-motion),
    box-shadow 0.18s var(--human-motion),
    border-color 0.18s var(--human-motion),
    background-color 0.18s var(--human-motion),
    color 0.18s var(--human-motion);
}

.dashboard-panel:hover,
.dashboard-activity-panel:hover,
.dashboard-performance-panel:hover,
.panel:hover,
.dashboard-kpi-card:hover,
.stat-card:hover,
.choice-card:hover,
.mailbox-card:hover,
.variant-card:hover,
.reply-card:hover,
.stats-metric-box:hover,
.stats-category-row:hover,
.stats-inline-row:hover,
.running-import-item:hover {
  border-color: #d7ddeb;
  box-shadow: 0 8px 22px rgba(30, 38, 70, 0.08);
  transform: translateY(-2px);
}

.mailbox-hero {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.mailbox-hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 8px 4px 14px;
}

.mailbox-hero-copy h1,
.section-header > div > h1 {
  margin: 0;
  color: #212529;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.25;
}

.mailbox-provider-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.mailbox-provider-badge,
.soft-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #e1e7f0;
  border-radius: 0.25rem;
  background: #f8f9fc;
  color: #5d6678;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.mailbox-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  grid-column: 1 / -1;
}

.mailbox-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.mailbox-hero-stat {
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  background: #ffffff;
  box-shadow: var(--bs-card-shadow);
}

.mailbox-hero-stat span {
  color: #6c757d;
  font-size: 0.82rem;
  font-weight: 700;
}

.mailbox-hero-stat strong {
  color: #212529;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
}

.mailbox-section + .mailbox-section,
.panel + .panel,
.dashboard-panel + .dashboard-panel {
  margin-top: 18px;
}

.mailbox-list-meta,
.running-imports-card,
.sync-progress-head,
.progress-meta,
.dashboard-performance-head,
.stats-category-head,
.stats-inline-row,
.reply-detail-section-head,
.template-action-row,
.mailbox-list-actions,
.dashboard-panel-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mailbox-list-meta {
  margin: 0 16px 12px;
  color: #6c757d;
  font-size: 0.86rem;
  font-weight: 700;
}

.mailbox-list-actions,
.template-action-row {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.mailbox-list-actions form,
.template-action-row form {
  margin: 0;
}

.choice-grid,
.mailbox-card-grid,
.variant-grid,
.reply-grid,
.stats-metric-grid,
.stats-category-stack {
  gap: 12px;
}

.choice-card,
.mailbox-card,
.variant-card,
.reply-card,
.stats-metric-box,
.stats-category-row,
.stats-inline-row,
.running-import-item {
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  background: #ffffff;
  box-shadow: none;
}

.choice-card {
  padding: 14px;
}

.choice-card:has(input[type="radio"]:checked),
.choice-card:has(input[type="checkbox"]:checked),
.send-template-source-panel .template-source-options label:has(input:checked),
.test-template-segment label:has(input:checked),
.mailbox-choice-card:has(input:checked) {
  border-color: var(--primary-color);
  background: #f5f6ff;
  color: var(--primary-color);
  box-shadow: inset 0 0 0 1px rgba(72, 76, 127, 0.08);
}

.choice-card-title {
  color: #212529;
}

.choice-card-subtitle,
.choice-card-meta {
  color: #6c757d;
}

.grid-form {
  align-items: start;
}

.grid-form label,
.single-form label,
.reply-review-form label {
  min-width: 0;
}

.grid-form input,
.grid-form select,
.grid-form textarea,
.single-form input,
.single-form select,
.single-form textarea {
  transition:
    border-color 0.16s var(--human-motion),
    box-shadow 0.16s var(--human-motion),
    background-color 0.16s var(--human-motion);
}

input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.native-fuzzy-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.select-combo {
  position: relative;
  width: 100%;
  min-width: 0;
}

.select-combo-input {
  min-height: 44px;
  padding: 10px 44px 10px 13px;
  border-radius: 8px;
  background: #ffffff;
  border-color: #cfd8e3;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.select-combo-input::placeholder {
  color: #8a96a8;
}

.select-combo.is-open .select-combo-input,
.select-combo-input:focus {
  border-color: #17866f;
  box-shadow: 0 0 0 3px rgba(20, 145, 114, 0.14);
}

.select-combo-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 34px;
  min-width: 0;
  height: calc(100% - 8px);
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
  box-shadow: none;
  font-size: 1.05rem;
  line-height: 1;
}

.select-combo-toggle:hover {
  transform: none;
  filter: none;
  background: #eef6f3;
  color: #0f766e;
}

.select-combo.is-open .select-combo-toggle {
  color: #0f766e;
  transform: rotate(180deg);
}

.select-combo-list {
  position: absolute;
  z-index: 1400;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: min(300px, 48vh);
  overflow: auto;
  display: grid;
  gap: 5px;
  padding: 6px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #f6f8fb;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
}

.select-combo-list[hidden] {
  display: none !important;
}

.select-combo-list::-webkit-scrollbar {
  width: 10px;
}

.select-combo-list::-webkit-scrollbar-thumb {
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: #c7d2df;
}

.select-combo-option {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  width: 100% !important;
  min-width: 0;
  padding: 9px 36px 9px 13px !important;
  border: 1px solid #e3e8f0 !important;
  border-radius: 7px;
  background: #ffffff !important;
  color: #1f2937 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
  font-weight: 600;
  text-align: left !important;
  white-space: normal;
  line-height: 1.35;
}

.select-combo-option:hover,
.select-combo-option:focus {
  transform: none;
  filter: none;
  border-color: #cfd8e3 !important;
  background: #f9fbfd !important;
  color: #111827 !important;
  outline: none;
}

.select-combo-option.is-selected {
  transform: none;
  filter: none;
  border-color: #9bb8f5 !important;
  background: #f3f7ff !important;
  color: #17315e !important;
  font-weight: 800;
}

.select-combo-option.is-selected::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 5px;
  width: 3px;
  border-radius: 999px;
  background: #315fba;
}

.select-combo-option.is-selected::after {
  content: "✓";
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: #2454b8;
  font-size: 1.08rem;
  font-weight: 900;
}

.select-combo-empty {
  padding: 11px 10px;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 600;
}

.campaign-reply-to-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin: 8px 0 0;
  padding: 7px 10px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #f7f9fc;
  color: #526174;
  font-size: 0.9rem;
  font-weight: 600;
}

.campaign-reply-to-summary strong {
  color: #17315e;
}

.campaign-reply-to-summary span {
  color: #8a96a8;
}

input[type="file"] {
  min-height: 42px;
}

.table-wrap,
.mailbox-table-wrap,
.reply-table-wrap,
.stats-table-wrap {
  max-width: 100%;
  background: #ffffff;
}

tbody tr {
  transition: background-color 0.14s var(--human-motion);
}

tbody tr td:first-child {
  border-left: 3px solid transparent;
}

tbody tr:hover {
  background: #fbfcff;
}

tbody tr:hover td:first-child {
  border-left-color: var(--secondary-color);
}

.empty-cell,
.empty,
.mailbox-empty,
.reply-detail-loading,
.reply-info-empty {
  padding: 18px;
  border: 1px dashed #dce3ee;
  border-radius: 0.25rem;
  background: #fbfcff;
  color: #6c757d;
}

.notice {
  border-color: #dbe3f1;
  background: #ffffff;
  color: #475569;
}

.notice-info {
  border-color: #d7e6ff;
  background: #f4f8ff;
  color: #244a88;
}

.notice-success {
  border-color: #cfead8;
  background: #f4fbf6;
  color: #1c7a3d;
}

.notice-error,
.notice-danger {
  border-color: #f4c7ce;
  background: #fff6f7;
  color: #b4233a;
}

.mini-progress,
.progress-bar,
.stats-bar {
  position: relative;
  overflow: hidden;
  background: #edf1f7;
}

.mini-progress span,
.progress-bar-fill,
.stats-bar-fill {
  background-color: var(--primary-color);
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.18) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.18) 50%,
    rgba(255, 255, 255, 0.18) 75%,
    transparent 75%,
    transparent
  );
  background-size: 42px 42px;
  animation: ui-progress 1.1s linear infinite;
}

.stats-bar-fill.fill-replies,
.bar-replies {
  background-color: var(--chart-color3);
}

.stats-bar-fill.danger {
  background-color: #ef4444;
}

.import-progress-card {
  margin: 16px;
}

.column-select-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.column-select-grid label {
  margin: 0;
}

.import-column-modal-card {
  width: min(760px, calc(100vw - 32px));
}

.import-column-modal-card .column-select-grid {
  margin-top: 12px;
}

@media (max-width: 980px) {
  .column-select-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .column-select-grid {
    grid-template-columns: 1fr;
  }
}

.import-progress-steps span.active {
  border-color: var(--primary-color);
  background: #f5f6ff;
  color: var(--primary-color);
}

.running-imports-card {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  background: #ffffff;
  box-shadow: var(--bs-card-shadow);
}

.running-imports-list {
  display: grid;
  gap: 8px;
  width: 100%;
}

.running-import-item {
  padding: 10px 12px;
}

.send-template-source-panel,
.test-template-source-panel {
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  background: #fbfcff;
}

.send-template-selection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 0.35rem;
  background: #ffffff;
}

.send-template-choice-list {
  display: grid;
  gap: 12px;
  max-height: min(58vh, 560px);
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

#send-template-picker-modal.visible .modal-card {
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#send-template-picker-modal.visible .send-template-choice-list {
  min-height: 0;
}

.send-template-choice-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 0.35rem;
  background: #ffffff;
  cursor: pointer;
}

.send-template-choice-card:has(input:checked) {
  border-color: var(--primary-color);
  background: #f5f6ff;
  box-shadow: inset 0 0 0 1px rgba(72, 76, 127, 0.08);
}

.send-template-choice-card input {
  margin-top: 4px;
}

.variant-review-form .modal-actions button[type="submit"]:not([name]) {
  display: none;
}

.send-template-source-panel .template-source-options,
.test-template-segment {
  border: 0;
  background: transparent;
  padding: 0;
}

.send-template-source-panel .template-source-options label,
.test-template-segment label,
.mailbox-choice-card {
  min-height: 42px;
  border-radius: 0.25rem;
}

.campaign-template-toolbar {
  align-items: center;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  background: #ffffff;
}

.template-change-button {
  min-height: 0;
  color: var(--primary-color);
}

.template-change-button:hover:not(:disabled) {
  color: var(--secondary-color);
}

.modal-shell.visible .modal-card {
  animation: ui-pop 0.2s var(--human-motion) both;
}

.modal-card {
  overflow: hidden;
}

.modal-header {
  min-height: 56px;
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

.modal-card > .grid-form,
.modal-card > form,
.modal-card > label,
.modal-card > p,
.modal-card > .table-wrap {
  margin: 16px;
}

.modal-actions {
  margin: 0;
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
  background: #fbfcff;
}

.icon-btn {
  border-radius: 0.25rem;
}

.stats-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.stats-metric-box {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 14px;
}

.stats-metric-box span,
.stats-category-row span,
.stats-inline-row span {
  color: #6c757d;
  font-size: 0.82rem;
  font-weight: 700;
}

.stats-metric-box strong,
.stats-category-row strong,
.stats-inline-row strong {
  color: #212529;
  font-weight: 800;
}

.stats-category-stack {
  display: grid;
}

.stats-category-row,
.stats-inline-row {
  padding: 12px;
}

.stats-category-row {
  display: grid;
  gap: 10px;
}

.stats-compact-panel .stats-category-stack.compact {
  margin-top: 0;
}

.reply-kpi-row {
  gap: 12px;
}

.reply-kpi {
  padding: 14px 16px;
}

.reply-table-wrap,
.reply-detail-main,
.reply-side-block {
  box-shadow: var(--bs-card-shadow);
}

.reply-detail-card {
  border-radius: 0.25rem;
}

.reply-body-box,
.reply-draft-preview,
.mail-preview-frame,
.rich-editor,
.rich-editor-surface,
.body-preview,
.variant-template-preview .body-preview {
  border-radius: 0.25rem;
}

.mail-preview-frame {
  box-shadow: none;
}

.mailbox-owner-filter {
  align-items: center;
}

.mailbox-owner-filter select {
  min-width: 220px;
}

.danger-ghost,
.danger-btn {
  border-radius: 0.25rem;
}

button:active,
.ghost-btn:active,
.secondary-btn:active,
.danger-btn:active,
.danger-ghost:active,
.mode-option:active {
  transform: translateY(0) scale(0.99);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

.app-message-stage,
.app-message-stage *,
.app-message-stage *::before,
.app-message-stage *::after {
  box-sizing: border-box;
}

.app-message-stage {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 300000;
  display: grid;
  width: min(92vw, 620px);
  pointer-events: none;
  transform: translateX(-50%);
}

.app-message-wrapper {
  position: relative;
  display: grid;
  justify-items: center;
  padding: 6px 0;
  overflow: hidden;
  transition: height 0.28s ease, padding 0.28s ease;
}

.app-message {
  --message-color: #0d9488;
  --message-bg: #ecfeff;
  --message-border: #a5f3fc;
  --message-shadow: rgba(15, 118, 110, 0.16);
  display: grid;
  grid-template-columns: 18px minmax(180px, 1fr) 22px;
  align-items: center;
  gap: 11px;
  min-width: min(420px, 92vw);
  max-width: min(620px, 92vw);
  padding: 14px 18px;
  border: 1px solid var(--message-border);
  border-radius: 8px;
  color: var(--message-color);
  background: color-mix(in srgb, var(--message-bg) 90%, #ffffff);
  box-shadow: 0 16px 38px var(--message-shadow), 0 1px 2px rgba(15, 23, 42, 0.08);
  opacity: 0;
  pointer-events: auto;
  transform: translate3d(0, -16px, 0) scale(0.98);
  transition: opacity 0.2s ease, transform 0.24s ease, filter 0.2s ease;
  will-change: opacity, transform;
}

.app-message.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.app-message.is-leaving {
  opacity: 0;
  filter: blur(2px);
  transform: translate3d(0, -12px, 0) scale(0.985);
}

.app-message-info,
.app-message-loading {
  --message-color: #0f766e;
  --message-bg: #ecfeff;
  --message-border: #99f6e4;
  --message-shadow: rgba(15, 118, 110, 0.15);
}

.app-message-success {
  --message-color: #15803d;
  --message-bg: #f0fdf4;
  --message-border: #bbf7d0;
  --message-shadow: rgba(21, 128, 61, 0.14);
}

.app-message-warning {
  --message-color: #b45309;
  --message-bg: #fffbeb;
  --message-border: #fde68a;
  --message-shadow: rgba(180, 83, 9, 0.15);
}

.app-message-error {
  --message-color: #be123c;
  --message-bg: #fff1f2;
  --message-border: #fecdd3;
  --message-shadow: rgba(190, 18, 60, 0.14);
}

.app-message-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--message-color);
  color: #fff;
  flex: 0 0 auto;
}

.app-message-icon svg {
  display: block;
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.app-message-content {
  min-width: 0;
  color: var(--message-color);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.45;
  text-align: left;
  word-break: break-word;
}

.app-message-progress {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
}

.app-message-progress svg {
  display: block;
  width: 18px;
  height: 18px;
  transform: rotate(-90deg);
}

.app-message-progress-bg,
.app-message-progress-ring {
  fill: none;
  stroke-width: 2.4;
}

.app-message-progress-bg {
  stroke: color-mix(in srgb, var(--message-color) 18%, transparent);
}

.app-message-progress-ring {
  stroke: var(--message-color);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
  animation: app-message-countdown linear forwards;
}

.app-message-stage:hover .app-message-progress-ring {
  animation-play-state: paused;
}

.app-message-close {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--message-color);
  background: transparent;
  cursor: pointer;
}

.app-message-close:hover {
  background: color-mix(in srgb, var(--message-color) 12%, transparent);
}

.app-message-close svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.app-message-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 999px;
  animation: app-message-spin 0.8s linear infinite;
}

@keyframes app-message-countdown {
  to {
    stroke-dashoffset: 100;
  }
}

@keyframes app-message-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .app-message-stage {
    top: 12px;
    width: calc(100vw - 24px);
  }

  .app-message {
    grid-template-columns: 18px minmax(0, 1fr) 22px;
    min-width: 0;
    width: 100%;
    padding: 13px 14px;
  }
}

@media (max-width: 1180px) {
  .mailbox-hero-content {
    grid-template-columns: 1fr;
  }

  .mailbox-provider-badges,
  .mailbox-hero-actions {
    justify-content: flex-start;
  }

  .mailbox-hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .mailbox-hero-stats,
  .stats-metric-grid {
    grid-template-columns: 1fr;
  }

  .mailbox-list-meta,
  .running-imports-card,
  .dashboard-performance-head,
  .stats-category-head,
  .stats-inline-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Modal stacking fix */
.shell:not(.shell-login) {
  isolation: isolate;
}

.sidebar {
  z-index: 10;
}

.page {
  position: relative;
  z-index: 20;
}

.modal-shell {
  z-index: 200000;
}

.modal-shell-nested {
  z-index: 200100;
}

.modal-backdrop {
  z-index: 0;
}

.modal-card {
  z-index: 1;
}

.app-update-modal {
  z-index: 200200;
}

.app-update-card {
  max-width: min(460px, calc(100vw - 32px));
}

.app-update-body {
  display: grid;
  gap: 12px;
}

.app-update-version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(30, 41, 59, 0.12);
  border-radius: 8px;
  background: #f8fafc;
}

.app-update-version-row span {
  color: var(--muted);
  font-weight: 700;
}

.app-update-version-row strong {
  color: #0f172a;
  font-size: 1.05rem;
}

.app-update-version-row.is-latest {
  border-color: rgba(38, 166, 154, 0.35);
  background: #ecfdf7;
}

.app-update-version-row.is-latest strong {
  color: #047857;
}

.app-update-notes {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 700;
  line-height: 1.6;
}

.app-update-instruction {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: #eef6ff;
  color: #175cd3;
  font-weight: 800;
  line-height: 1.6;
}

.app-update-actions {
  align-items: center;
}

.primary-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--secondary-color);
  background: var(--secondary-color);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.primary-link-btn:hover {
  filter: brightness(0.96);
  color: #ffffff;
}

body.modal-open .sidebar {
  pointer-events: none;
  z-index: 0;
}

/* Sidebar account footer */
.sidebar {
  display: flex;
  flex-direction: column;
}

.sidebar .nav {
  flex: 1 1 auto;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.sidebar-footer .user-name {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
}

.sidebar-footer .user-meta {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.88rem;
  font-weight: 700;
}

.app-version-badge {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
}

.sidebar-footer .ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 800;
}

.sidebar-footer .ghost-btn:hover {
  border-color: var(--secondary-color);
  background: var(--secondary-color);
  color: #ffffff;
}

/* Sidebar icons and mini mode */
.sidebar {
  transition:
    width 0.22s var(--human-motion),
    flex-basis 0.22s var(--human-motion),
    padding 0.22s var(--human-motion),
    margin 0.22s var(--human-motion);
}

.sidebar .brand,
.sidebar .nav a,
.sidebar-footer .ghost-btn,
.sidebar-mini-btn {
  transition:
    background 0.18s var(--human-motion),
    color 0.18s var(--human-motion),
    transform 0.18s var(--human-motion),
    opacity 0.18s var(--human-motion);
}

.sidebar .nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  margin: 2px 0;
  padding: 7px 10px;
  border-radius: 0.25rem;
}

.sidebar .nav a::before,
.sidebar .nav a::after {
  display: none;
  content: none;
}

.sidebar .nav-text,
.sidebar-toggle-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar .nav-icon,
.sidebar-toggle-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  color: currentColor;
}

.sidebar .nav-icon::before,
.sidebar .nav-icon::after,
.sidebar-toggle-icon::before,
.sidebar-toggle-icon::after {
  position: absolute;
  box-sizing: border-box;
  content: "";
}

.sidebar .nav a:hover .nav-icon,
.sidebar .nav a.active .nav-icon,
.sidebar-footer .ghost-btn:hover .nav-icon,
.sidebar-mini-btn:hover .sidebar-toggle-icon {
  background: rgba(241, 152, 40, 0.2);
  color: var(--secondary-color);
}

.nav-icon-dashboard::before {
  top: 9px;
  left: 9px;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 10px 0 0 currentColor, 0 10px 0 currentColor, 10px 10px 0 currentColor;
}

.nav-icon-users::before {
  top: 8px;
  left: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 9px 2px 0 -1px currentColor;
}

.nav-icon-users::after {
  top: 18px;
  left: 7px;
  width: 20px;
  height: 9px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 12px 12px;
}

.nav-icon-mailboxes::before {
  top: 10px;
  left: 7px;
  width: 20px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.nav-icon-mailboxes::after {
  top: 9px;
  left: 10px;
  width: 14px;
  height: 14px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.nav-icon-imports::before {
  top: 10px;
  left: 16px;
  width: 2px;
  height: 14px;
  border-radius: 2px;
  background: currentColor;
}

.nav-icon-imports::after {
  top: 9px;
  left: 11px;
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}

.nav-icon-templates::before {
  top: 7px;
  left: 9px;
  width: 16px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.nav-icon-templates::after {
  top: 13px;
  left: 13px;
  width: 8px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
}

.nav-icon-campaigns::before {
  top: 9px;
  left: 7px;
  width: 18px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.nav-icon-campaigns::after {
  top: 12px;
  left: 16px;
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.nav-icon-replies::before {
  top: 9px;
  left: 7px;
  width: 20px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 7px;
}

.nav-icon-replies::after {
  top: 21px;
  left: 12px;
  width: 7px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.nav-icon-stats::before {
  top: 14px;
  left: 9px;
  width: 4px;
  height: 11px;
  border-radius: 3px;
  background: currentColor;
  box-shadow: 7px -5px 0 currentColor, 14px -9px 0 currentColor;
}

.nav-icon-logout::before {
  top: 9px;
  left: 8px;
  width: 13px;
  height: 16px;
  border: 2px solid currentColor;
  border-right: 0;
  border-radius: 4px 0 0 4px;
}

.nav-icon-logout::after {
  top: 12px;
  left: 15px;
  width: 10px;
  height: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.sidebar-user {
  display: grid;
  gap: 4px;
}

.sidebar-footer .ghost-btn,
.sidebar-mini-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.sidebar-footer .ghost-btn:hover,
.sidebar-mini-btn:hover {
  border-color: rgba(241, 152, 40, 0.38);
  background: rgba(241, 152, 40, 0.12);
  color: var(--secondary-color);
  transform: none;
}

.sidebar-mini-btn {
  font: inherit;
}

.sidebar-toggle-icon::before {
  top: 11px;
  left: 10px;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
}

.sidebar-toggle-icon::after {
  top: 12px;
  left: 8px;
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s var(--human-motion), left 0.18s var(--human-motion);
}

body.sidebar-mini .sidebar {
  flex-basis: 96px;
  width: 96px;
  padding: 22px 14px;
  overflow: visible;
}

body.sidebar-mini .brand {
  justify-content: center;
  gap: 0;
  margin-bottom: 24px;
}

body.sidebar-mini .brand-mark {
  width: 56px;
  min-width: 56px;
  height: 56px;
}

body.sidebar-mini .brand-title,
body.sidebar-mini .brand-sub,
body.sidebar-mini .sidebar-user,
body.sidebar-mini .sidebar .nav a .nav-text,
body.sidebar-mini .sidebar-footer .ghost-btn .nav-text,
body.sidebar-mini .sidebar-mini-btn .sidebar-toggle-text {
  display: none;
}

body.sidebar-mini .sidebar .nav {
  align-items: center;
  justify-items: center;
}

body.sidebar-mini .sidebar-footer {
  align-items: center;
  width: 100%;
  gap: 8px;
}

body.sidebar-mini .sidebar .nav a,
body.sidebar-mini .sidebar-footer .ghost-btn,
body.sidebar-mini .sidebar-mini-btn {
  justify-content: center;
  width: 56px;
  min-height: 46px;
  padding: 6px 0;
  gap: 0;
  border-radius: 0.9rem;
}

body.sidebar-mini .sidebar-footer .ghost-btn,
body.sidebar-mini .sidebar-mini-btn {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

body.sidebar-mini .sidebar-footer .ghost-btn:hover,
body.sidebar-mini .sidebar-mini-btn:hover {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

body.sidebar-mini .sidebar .nav a .nav-icon,
body.sidebar-mini .sidebar-footer .ghost-btn .nav-icon,
body.sidebar-mini .sidebar-mini-btn .sidebar-toggle-icon {
  width: 36px;
  min-width: 36px;
  height: 36px;
}

body.sidebar-mini .sidebar .nav a:hover .nav-text,
body.sidebar-mini .sidebar .nav a:focus-visible .nav-text {
  position: absolute;
  left: 68px;
  top: 50%;
  display: block;
  width: max-content;
  min-width: 112px;
  max-width: 180px;
  padding: 10px 13px;
  border-radius: 0.25rem;
  background: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(33, 37, 41, 0.18);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);}

body.sidebar-mini .sidebar-toggle-icon::after {
  left: 14px;
  transform: rotate(-135deg);
}

@media (max-width: 1279px) {
  .sidebar-mini-btn {
    display: none;
  }

  body.sidebar-mini .sidebar {
    flex-basis: auto;
    width: auto;
    height: auto;
    margin: 14px;
    padding: 18px;
    overflow: visible;
  }

  body.sidebar-mini .brand {
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 22px;
  }

  body.sidebar-mini .brand-title,
  body.sidebar-mini .sidebar-user,
  body.sidebar-mini .sidebar .nav a .nav-text,
  body.sidebar-mini .sidebar-footer .ghost-btn .nav-text {
    display: block;
  }

  body.sidebar-mini .sidebar .nav a,
  body.sidebar-mini .sidebar-footer .ghost-btn {
    justify-content: flex-start;
    width: 100%;
    padding: 7px 10px;
    gap: 12px;
    border-radius: 0.25rem;
  }
}

/* Keep the sidebar collapse control from inheriting page-level button skins. */
.sidebar .sidebar-mini-btn,
.sidebar .sidebar-mini-btn.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  margin: 10px 0 0;
  padding: 6px 10px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  color: #ffffff;
}

.sidebar .sidebar-mini-btn:hover,
.sidebar .sidebar-mini-btn.icon-btn:hover {
  border-color: rgba(241, 152, 40, 0.38);
  background: rgba(241, 152, 40, 0.12);
  box-shadow: none;
  color: var(--secondary-color);
  transform: none;
}

body.sidebar-mini .sidebar .sidebar-mini-btn,
body.sidebar-mini .sidebar .sidebar-mini-btn.icon-btn {
  width: 46px;
  min-width: 46px;
  max-width: 46px;
  height: 46px;
  min-height: 46px;
  margin-inline: auto;
  padding: 0;
  border-color: transparent;
  border-radius: 0.9rem;
  background: transparent;
}

/* Mini sidebar tooltips must float above the page content. */
body.sidebar-mini .shell:not(.shell-login) .sidebar {
  z-index: 120;
}

body.sidebar-mini .sidebar .nav a,
body.sidebar-mini .sidebar-footer .ghost-btn,
body.sidebar-mini .sidebar-mini-btn {
  position: relative;
}

body.sidebar-mini .sidebar .nav a:hover .nav-text,
body.sidebar-mini .sidebar .nav a:focus-visible .nav-text {
  z-index: 300;
}

body.modal-open.sidebar-mini .shell:not(.shell-login) .sidebar {
  pointer-events: none;
  z-index: 0;
}

/* Dashboard workspace refresh */
.dashboard-shell {
  --dashboard-ink: #1f2937;
  --dashboard-muted: #687383;
  --dashboard-border: #e2e8f0;
  --dashboard-soft: #f6f8fb;
  --dashboard-card: #ffffff;
  --dashboard-primary: #484c7f;
  gap: 16px;
  color: var(--dashboard-ink);
}

.dashboard-shell *,
.dashboard-shell *::before,
.dashboard-shell *::after {
  letter-spacing: 0;
}

.dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 0;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--dashboard-border);
}

.dashboard-topbar h1 {
  margin: 0;
  color: var(--dashboard-ink);
  font-size: 1.56rem;
  font-weight: 850;
  line-height: 1.18;
}

.dashboard-status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.dashboard-status-line span {
  max-width: min(100%, 420px);
  min-height: 28px;
  padding: 6px 10px;
  border: 1px solid var(--dashboard-border);
  border-radius: 0.25rem;
  background: #ffffff;
  color: var(--dashboard-muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-topbar-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-topbar-actions .ghost-btn,
.dashboard-topbar-actions .secondary-btn {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--dashboard-border);
  border-radius: 0.25rem;
  background: #ffffff;
  box-shadow: none;
  color: #374151;
  font-size: 0.86rem;
  font-weight: 800;
}

.dashboard-topbar-actions a[href="/campaigns"] {
  border-color: var(--dashboard-primary);
  background: var(--dashboard-primary);
  color: #ffffff;
}

.dashboard-topbar-actions .ghost-btn:hover,
.dashboard-topbar-actions .secondary-btn:hover {
  border-color: var(--dashboard-primary);
  background: var(--dashboard-primary);
  box-shadow: none;
  color: #ffffff;
  transform: translateY(-1px);
}

.dashboard-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(132px, 1fr));
  gap: 12px;
}

.dashboard-kpi-card {
  --tone: #64748b;
  --tone-soft: #f1f5f9;
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 9px;
  min-height: 116px;
  margin: 0;
  padding: 15px 16px 14px;
  overflow: hidden;
  border: 1px solid var(--dashboard-border);
  border-left: 3px solid var(--tone);
  border-radius: 0.25rem;
  background: var(--dashboard-card);
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.045);
  backdrop-filter: none;
}

.dashboard-kpi-card::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tone);
  opacity: 0.82;
}

.dashboard-kpi-card::after {
  display: none;
}

.dashboard-kpi-card span {
  color: var(--dashboard-muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.dashboard-kpi-card strong {
  align-self: center;
  color: #111827;
  font-size: clamp(1.58rem, 1.9vw, 2.08rem);
  font-weight: 850;
  line-height: 1;
}

.dashboard-kpi-card small {
  color: #7b8493;
  font-size: 0.79rem;
  font-weight: 700;
  line-height: 1.25;
}

.dashboard-kpi-card:hover {
  border-color: #cfd8e6;
  border-left-color: var(--tone);
  box-shadow: 0 12px 26px rgba(31, 41, 55, 0.07);
  transform: translateY(-1px);
}

.tone-contacts {
  --tone: #484c7f;
  --tone-soft: #eef2ff;
  --tone-border: #c7d2fe;
}

.tone-campaigns {
  --tone: #0f766e;
  --tone-soft: #ecfdf5;
  --tone-border: #99f6e4;
}

.tone-sent {
  --tone: #16a34a;
  --tone-soft: #f0fdf4;
  --tone-border: #bbf7d0;
}

.tone-replies {
  --tone: #7c3aed;
  --tone-soft: #f5f0ff;
  --tone-border: #ddd6fe;
}

.tone-opened {
  --tone: #0891b2;
  --tone-soft: #ecfeff;
  --tone-border: #bae6fd;
}

.tone-quota {
  --tone: #f19828;
  --tone-soft: #fff7ed;
  --tone-border: #fed7aa;
}

.dashboard-analytics-grid {
  display: grid;
  gap: 14px;
  align-items: start;}

.dashboard-activity-panel,
.dashboard-performance-panel,
.dashboard-panel {
  position: relative;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--dashboard-border);
  border-radius: 0.25rem;
  background: var(--dashboard-card);
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.045);
  backdrop-filter: none;
}

.dashboard-activity-panel::before,
.dashboard-performance-panel::before,
.dashboard-panel::before {
  display: none;
}

.dashboard-activity-panel {
  overflow: visible;
}

.dashboard-performance-panel {
  display: grid;
  gap: 14px;
}

.dashboard-panel + .dashboard-panel {
  margin-top: 0;
}

.dashboard-panel-header,
.section-header.compact.dashboard-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}

.dashboard-panel-header h2 {
  margin: 0;
  color: var(--dashboard-ink);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.25;
}

.dashboard-panel-header .pill,
.dashboard-panel .pill {
  min-height: 26px;
  max-width: min(100%, 360px);
  padding: 5px 9px;
  border: 1px solid var(--dashboard-border);
  border-radius: 0.25rem;
  background: var(--dashboard-soft);
  color: #4b5563;
  font-size: 0.76rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-chart-canvas {
  position: relative;
  min-height: 302px;
  padding: 50px 16px 18px 48px;
  overflow: visible;
  border: 1px solid var(--dashboard-border);
  border-radius: 0.25rem;
  background: linear-gradient(180deg, #ffffff, #f9fbfd);
}

.dashboard-chart-grid {
  inset: 50px 16px 40px 48px;
  border: 0;
  opacity: 1;
  background-image:
    linear-gradient(#edf1f6 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 232, 240, 0.72) 1px, transparent 1px);
  background-size: 100% 25%, calc(100% / 7) 100%;
}

.dashboard-chart-scale {
  top: 50px;
  bottom: 40px;
  left: 14px;
  color: #8a95a6;
  font-size: 0.72rem;
  font-weight: 800;
}

.dashboard-chart-legend {
  top: 12px;
  right: 14px;
  left: auto;
  gap: 6px;
}

.dashboard-legend-item {
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--dashboard-border);
  border-radius: 0.25rem;
  background: #ffffff;
  color: #4b5563;
  box-shadow: none;
  font-size: 0.76rem;
  font-weight: 800;
}

.dashboard-legend-swatch {
  width: 8px;
  height: 8px;
}

.dashboard-bar-chart {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  height: 220px;
}

.dashboard-bar-day {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 9px;
  min-width: 0;
  height: 100%;
}

.dashboard-bar-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(5px, 1fr));
  align-items: end;
  gap: 4px;
  min-height: 0;
  padding: 0 5px;
}

.dashboard-bar {
  border-radius: 4px 4px 1px 1px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.dashboard-bar::after {
  z-index: 400;
  border: 0;
  border-radius: 0.25rem;
  background: #111827;
  box-shadow: 0 12px 26px rgba(17, 24, 39, 0.2);
  font-size: 0.74rem;
}

.dashboard-bar::before {
  z-index: 399;
  background: #111827;
}

.dashboard-bar-label {
  color: #7b8493;
  font-size: 0.73rem;
  font-weight: 800;
}

.dashboard-series-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.dashboard-series-row {
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 11px 12px;
  border: 1px solid var(--dashboard-border);
  border-radius: 0.25rem;
  background: var(--dashboard-soft);
}

.dashboard-series-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--dashboard-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.dashboard-series-row strong {
  color: #111827;
  font-size: 1.18rem;
  font-weight: 850;
  line-height: 1;
}

.dashboard-series-row small {
  color: #7b8493;
  font-size: 0.75rem;
  font-weight: 700;
}

.dashboard-performance-list,
.dashboard-feed {
  display: grid;
  gap: 9px;
}

.dashboard-performance-item,
.dashboard-performance-note,
.dashboard-feed-item,
.dashboard-quick-card {
  border: 1px solid var(--dashboard-border);
  border-radius: 0.25rem;
  background: var(--dashboard-soft);
  box-shadow: none;
}

.dashboard-performance-item,
.dashboard-performance-note {
  padding: 13px;
}

.dashboard-performance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.dashboard-performance-head strong {
  color: #374151;
  font-size: 0.86rem;
  font-weight: 850;
}

.dashboard-performance-head span {
  color: #111827;
  font-size: 0.94rem;
  font-weight: 850;
}

.dashboard-performance-panel .stats-bar {
  height: 8px;
  border-radius: 999px;
  background: #dfe6ef;
}

.dashboard-performance-panel .stats-bar-fill {
  border-radius: inherit;
  background: linear-gradient(90deg, #6ca6ff, #484c7f);
}

.dashboard-performance-panel .stats-bar-fill.fill-replies {
  background: linear-gradient(90deg, #a78bfa, #7c3aed);
}

.dashboard-performance-panel .stats-bar-fill.danger {
  background: linear-gradient(90deg, #fb7185, #e11d48);
}

.dashboard-performance-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-performance-note span {
  color: var(--dashboard-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.dashboard-performance-note strong {
  color: #111827;
  font-size: 1.38rem;
  font-weight: 850;
}

.dashboard-workbench-grid {
  display: grid;
  gap: 14px;
  align-items: start;}

.dashboard-panel-main {
  grid-row: auto;
}

.dashboard-panel.dashboard-panel-actions {
  display: grid;
  align-items: stretch;
  justify-content: stretch;
  gap: 0;
}

.dashboard-workbench-grid > .dashboard-panel:last-child {
  grid-column: auto;
}

.dashboard-feed-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.16s var(--human-motion), background 0.16s var(--human-motion), transform 0.16s var(--human-motion);
}

.dashboard-feed-item:hover {
  border-color: #c7d2e0;
  background: #ffffff;
  box-shadow: none;
  transform: translateY(-1px);
}

.dashboard-feed-main {
  min-width: 0;
}

.dashboard-feed-main strong {
  display: block;
  max-width: 100%;
  margin-bottom: 4px;
  overflow: hidden;
  color: var(--dashboard-ink);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-feed-main .muted {
  color: var(--dashboard-muted);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.42;
}

.dashboard-feed-side {
  display: flex;
  justify-content: flex-end;
  min-width: max-content;
}

.dashboard-quick-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.dashboard-quick-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 13px;
  text-decoration: none;
  transition: border-color 0.16s var(--human-motion), background 0.16s var(--human-motion), transform 0.16s var(--human-motion);
}

.dashboard-quick-card:hover {
  border-color: var(--dashboard-primary);
  background: #ffffff;
  box-shadow: none;
  transform: translateY(-1px);
}

.dashboard-quick-card span {
  min-width: 0;
  overflow: hidden;
  color: #374151;
  font-size: 0.84rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-quick-card strong {
  color: var(--dashboard-primary);
  font-size: 0.8rem;
  font-weight: 850;
}

.dashboard-panel .empty,
.dashboard-panel .mailbox-empty {
  margin: 0;
  padding: 24px;
  border: 1px dashed #cbd5e1;
  border-radius: 0.25rem;
  background: var(--dashboard-soft);
  color: var(--dashboard-muted);
  font-weight: 750;
}

@media (max-width: 1540px) {
  .dashboard-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .dashboard-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-topbar-actions {
    justify-content: flex-start;
  }

  .dashboard-analytics-grid,
  .dashboard-workbench-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-panel-main,
  .dashboard-workbench-grid > .dashboard-panel:last-child {
    grid-column: auto;
    grid-row: auto;
  }

  .dashboard-series-summary,
  .dashboard-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .dashboard-shell {
    gap: 12px;
  }

  .dashboard-topbar h1 {
    font-size: 1.3rem;
  }

  .dashboard-kpi-strip,
  .dashboard-series-summary,
  .dashboard-quick-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-activity-panel,
  .dashboard-performance-panel,
  .dashboard-panel,
  .dashboard-kpi-card {
    padding: 14px;
  }

  .dashboard-chart-canvas {
    min-height: 300px;
    padding-top: 78px;
    overflow-x: auto;
  }

  .dashboard-chart-legend {
    position: static;
    padding: 0 0 12px;
  }

  .dashboard-chart-grid,
  .dashboard-chart-scale {
    top: 86px;
  }

  .dashboard-bar-chart {
    min-width: 660px;
  }

  .dashboard-feed-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .dashboard-feed-side {
    justify-content: flex-start;
    min-width: 0;
  }
}

/* Dashboard command layout */
.dashboard-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(320px, 0.62fr);
  gap: 14px;
  align-items: stretch;
}

.dashboard-overview-panel,
.dashboard-quota-panel {
  position: relative;
  min-height: 214px;
  overflow: hidden;
  border: 1px solid var(--dashboard-border, #e2e8f0);
  border-radius: 0.25rem;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(31, 41, 55, 0.055);
}

.dashboard-overview-panel {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  min-height: 176px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(72, 76, 127, 0.035), transparent 48%),
    #ffffff;
}

.dashboard-overview-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
}

.dashboard-overview-summary span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid #e3e8f0;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.78);
  color: #687383;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.dashboard-overview-summary strong {
  color: #111827;
  font-size: 0.95rem;
  font-weight: 950;
}

.dashboard-metric-matrix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-content: stretch;
}

.dashboard-metric-cell {
  --tone: #64748b;
  --tone-soft: #f1f5f9;
  --tone-border: #cbd5e1;
  position: relative;
  display: grid;
  grid-template-areas:
    "icon label"
    "icon value"
    "icon meta";
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-content: center;
  gap: 5px 11px;
  min-height: 98px;
  padding: 14px 15px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #f9fbfd);
  box-shadow: 0 6px 14px rgba(31, 41, 55, 0.035);
}

.dashboard-metric-icon {
  grid-area: icon;
  position: relative;
  display: block;
  align-self: center;
  justify-self: start;
  width: 36px;
  height: 36px;
  border: 1px solid var(--tone-border);
  border-radius: 10px;
  background:
    linear-gradient(135deg, var(--tone-soft), #ffffff);
  color: var(--tone);
}

.dashboard-metric-icon::before,
.dashboard-metric-icon::after {
  position: absolute;
  box-sizing: border-box;
  content: "";
}

.metric-icon-contacts::before {
  top: 9px;
  left: 10px;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: 10px 2px 0 -3px currentColor;
}

.metric-icon-contacts::after {
  left: 8px;
  bottom: 8px;
  width: 20px;
  height: 10px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 14px 14px;
}

.metric-icon-campaigns::before {
  top: 8px;
  left: 10px;
  width: 16px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.metric-icon-campaigns::after {
  top: 14px;
  left: 14px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
}

.metric-icon-replies::before {
  top: 9px;
  left: 8px;
  width: 20px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 7px;
}

.metric-icon-replies::after {
  left: 14px;
  bottom: 8px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.metric-icon-opened::before {
  top: 11px;
  left: 7px;
  width: 22px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.metric-icon-opened::after {
  top: 15px;
  left: 15px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.dashboard-metric-cell span {
  grid-area: label;
  min-width: 0;
  overflow: hidden;
  color: #687383;
  font-size: 0.75rem;
  font-weight: 850;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-metric-cell strong {
  grid-area: value;
  align-self: end;
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: clamp(1.12rem, 1.18vw, 1.38rem);
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-metric-cell small {
  grid-area: meta;
  overflow: hidden;
  color: #7b8493;
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-quota-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 18px;
}

.dashboard-quota-body {
  display: grid;
  grid-template-columns: minmax(184px, 0.84fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.dashboard-quota-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: min(150px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 0 58%, transparent 59%),
    conic-gradient(var(--dashboard-primary, #484c7f) var(--quota), #e5eaf1 0);
}

.dashboard-quota-ring::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  border: 1px solid #edf1f6;
}

.dashboard-quota-ring strong,
.dashboard-quota-ring span {
  position: relative;
  z-index: 1;
}

.dashboard-quota-ring strong {
  margin-top: 10px;
  color: #111827;
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1;
}

.dashboard-quota-ring span {
  margin-top: -26px;
  color: #687383;
  font-size: 0.74rem;
  font-weight: 850;
}

.dashboard-quota-gauge {
  position: relative;
  display: grid;
  place-items: center;
  width: min(184px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  isolation: isolate;
  filter: none;
}

.dashboard-quota-gauge::before,
.dashboard-quota-gauge::after {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  content: "";
}

.dashboard-quota-gauge::before {
  background:
    conic-gradient(from -90deg, #4f5d95 0 var(--gauge), #e8edf5 var(--gauge) 100%);
  -webkit-mask: radial-gradient(circle, transparent 0 62%, #000 63% 79%, transparent 80%);
  mask: radial-gradient(circle, transparent 0 62%, #000 63% 79%, transparent 80%);
  box-shadow: none;
}

.dashboard-quota-gauge::after {
  z-index: 1;
  inset: 18px;
  border: 1px solid #e3e9f2;
  background: #ffffff;
  box-shadow:
    0 14px 28px rgba(31, 41, 55, 0.08),
    inset 0 0 0 8px #f8fafc;
}

.dashboard-quota-gauge-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  place-items: center;
  width: 112px;
  height: 112px;
  gap: 8px;
  padding: 12px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: #111827;
  text-align: center;
}

.dashboard-quota-gauge-center strong {
  display: block;
  max-width: 108px;
  overflow: hidden;
  color: #111827;
  font-size: clamp(1.2rem, 1.45vw, 1.68rem);
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  text-shadow: none;
  white-space: nowrap;
}

.dashboard-quota-gauge-center span {
  margin-top: 0;
  color: #687383;
  font-size: 0.74rem;
  font-weight: 850;
}

.dashboard-quota-list {
  display: grid;
  gap: 10px;
}

.dashboard-quota-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid #e3e8f0;
  border-left: 3px solid #d8def0;
  border-radius: 0.25rem;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.dashboard-quota-list span {
  color: #687383;
  font-size: 0.78rem;
  font-weight: 850;
}

.dashboard-quota-list strong {
  color: #111827;
  font-size: 0.98rem;
  font-weight: 900;
}

.dashboard-command-grid + .dashboard-analytics-grid {
  margin-top: 0;
}

.dashboard-analytics-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
}

.dashboard-workbench-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
}

.dashboard-feed {
  max-height: 520px;
  overflow: auto;
  padding-right: 2px;
}

.dashboard-feed::-webkit-scrollbar {
  width: 6px;
}

.dashboard-feed::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

@media (max-width: 1480px) {
  .dashboard-command-grid,
  .dashboard-overview-panel,
  .dashboard-analytics-grid,
  .dashboard-workbench-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-metric-matrix {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .dashboard-metric-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-quota-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .dashboard-overview-panel,
  .dashboard-quota-panel {
    padding: 14px;
  }

  .dashboard-metric-matrix {
    grid-template-columns: 1fr;
  }

  .dashboard-metric-cell {
    min-height: 112px;
  }
}

/* Dashboard dimension panels */
.dashboard-dimension-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-insight-panel {
  display: grid;
  gap: 14px;
  min-height: 248px;
  padding: 16px;
  border: 1px solid var(--dashboard-border, #e2e8f0);
  border-radius: 0.25rem;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.045);
}

.dashboard-insight-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-insight-head span,
.dashboard-insight-head small {
  color: #687383;
  font-size: 0.78rem;
  font-weight: 850;
}

.dashboard-insight-head h2 {
  margin: 5px 0 0;
  color: #111827;
  font-size: 1.58rem;
  font-weight: 900;
  line-height: 1;
}

.dashboard-mini-pairs,
.dashboard-funnel-grid {
  display: grid;
  gap: 8px;
}

.dashboard-mini-pairs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-funnel-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-mini-pairs > div,
.dashboard-funnel-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  background: #f8fafc;
}

.dashboard-mini-pairs span,
.dashboard-funnel-grid span {
  overflow: hidden;
  color: #687383;
  font-size: 0.74rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-mini-pairs strong,
.dashboard-funnel-grid strong {
  color: #111827;
  font-size: 1rem;
  font-weight: 900;
}

.dashboard-breakdown-list {
  display: grid;
  gap: 8px;
}

.dashboard-breakdown-row {
  display: grid;
  gap: 6px;
}

.dashboard-breakdown-row > div,
.dashboard-audience-columns p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
}

.dashboard-breakdown-row span,
.dashboard-audience-columns span {
  min-width: 0;
  overflow: hidden;
  color: #4b5563;
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-breakdown-row strong,
.dashboard-audience-columns strong {
  color: #111827;
  font-size: 0.82rem;
  font-weight: 900;
}

.dashboard-breakdown-row i {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5eaf1;
}

.dashboard-breakdown-row i::before {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f19828, #484c7f);
  content: "";
}

.dashboard-breakdown-empty {
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 0.25rem;
  background: #f8fafc;
  color: #687383;
  font-size: 0.8rem;
  font-weight: 800;
}

.dashboard-audience-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-audience-columns > div {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  background: #f8fafc;
}

.dashboard-audience-columns h3 {
  margin: 0 0 2px;
  color: #687383;
  font-size: 0.76rem;
  font-weight: 900;
}

.dashboard-performance-panel .stats-bar-fill.fill-delivery {
  background: linear-gradient(90deg, #67e8f9, #0891b2);
}

@media (max-width: 1520px) {
  .dashboard-dimension-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .dashboard-dimension-grid,
  .dashboard-mini-pairs,
  .dashboard-funnel-grid,
  .dashboard-audience-columns {
    grid-template-columns: 1fr;
  }

  .dashboard-insight-panel {
    min-height: 0;
  }
}

/* Dashboard icon pie cards */
.dashboard-pie-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-pie-panel {
  --pie-color: #484c7f;
  --pie-soft: rgba(72, 76, 127, 0.1);
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 168px;
  padding: 18px;
  border: 1px solid #e1e7f0;
  border-radius: 0.25rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
  box-shadow: 0 8px 18px rgba(31, 41, 55, 0.045);
}

.dashboard-pie-panel:hover {
  border-color: color-mix(in srgb, var(--pie-color) 28%, #dbe4ee);
  box-shadow: 0 14px 28px rgba(31, 41, 55, 0.075);
  transform: translateY(-1px);
}

.pie-quality {
  --pie-color: #16a34a;
  --pie-soft: rgba(22, 163, 74, 0.11);
}

.pie-funnel {
  --pie-color: #f19828;
  --pie-soft: rgba(241, 152, 40, 0.13);
}

.pie-template {
  --pie-color: #7c3aed;
  --pie-soft: rgba(124, 58, 237, 0.11);
}

.pie-audience {
  --pie-color: #0891b2;
  --pie-soft: rgba(8, 145, 178, 0.12);
}

.dashboard-pie-chart {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 0 57%, transparent 58%),
    conic-gradient(var(--pie-color) 0 var(--value), #e7edf4 var(--value) 100%);
}

.dashboard-pie-chart::before {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 50%;
  content: "";
}

.dashboard-pie-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--pie-soft);
  color: var(--pie-color);
}

.dashboard-pie-icon::before,
.dashboard-pie-icon::after {
  position: absolute;
  box-sizing: border-box;
  content: "";
}

.pie-icon-quality::before {
  top: 13px;
  left: 12px;
  width: 24px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.pie-icon-quality::after {
  top: 20px;
  left: 12px;
  width: 24px;
  height: 13px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  border-radius: 0 0 12px 12px;
}

.pie-icon-funnel::before {
  top: 12px;
  left: 11px;
  width: 26px;
  height: 12px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  transform: perspective(20px) rotateX(-18deg);
}

.pie-icon-funnel::after {
  top: 23px;
  left: 18px;
  width: 12px;
  height: 15px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  border-radius: 0 0 4px 4px;
}

.pie-icon-template::before {
  top: 10px;
  left: 14px;
  width: 20px;
  height: 28px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.pie-icon-template::after {
  top: 18px;
  left: 18px;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 7px 0 currentColor, 0 14px 0 currentColor;
}

.pie-icon-audience::before {
  top: 12px;
  left: 13px;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: 13px 2px 0 -2px currentColor;
}

.pie-icon-audience::after {
  top: 27px;
  left: 10px;
  width: 28px;
  height: 12px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 16px 16px;
}

.dashboard-pie-content {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.dashboard-pie-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-pie-head span {
  color: #687383;
  font-size: 0.82rem;
  font-weight: 900;
}

.dashboard-pie-head strong {
  color: #111827;
  font-size: 1.35rem;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.dashboard-pie-content p {
  margin: 0;
  color: #4b5563;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.5;
}

.dashboard-pie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dashboard-pie-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 26px;
  padding: 5px 8px;
  overflow: hidden;
  border: 1px solid #e1e7f0;
  border-radius: 0.25rem;
  background: #f8fafc;
  color: #687383;
  font-size: 0.75rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-pie-meta b {
  color: #111827;
  font-weight: 950;
}

@media (max-width: 1520px) {
  .dashboard-pie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .dashboard-pie-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-pie-panel {
    grid-template-columns: 92px minmax(0, 1fr);
    min-height: 142px;
    padding: 14px;
  }

  .dashboard-pie-chart {
    width: 92px;
    height: 92px;
  }

  .dashboard-pie-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }
}

.rich-editor-toolbar button.rich-color-swatch,
.rich-editor-toolbar button.rich-color-swatch:hover,
.rich-editor-toolbar button.rich-color-swatch:focus-visible {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 2px solid rgba(17, 17, 17, 0.2);
  border-radius: 50%;
  background: var(--swatch-color) !important;
  background-color: var(--swatch-color) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    0 1px 2px rgba(17, 17, 17, 0.16);
  color: transparent !important;
  font-size: 0;
  line-height: 0;
}

.rich-editor-toolbar button.rich-color-swatch:hover {
  transform: translateY(-1px);
  border-color: rgba(17, 17, 17, 0.38);
}

.rich-editor-toolbar button.rich-color-swatch.is-active,
.rich-editor-toolbar button.rich-color-swatch:focus-visible {
  border-color: #102440;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    0 0 0 3px rgba(47, 115, 224, 0.16);
}

/* Campaign template change dialog: body is locked, so the card must scroll. */
#template-change-modal.visible .modal-card {
  display: flex;
  flex-direction: column;
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow: hidden;
}

#template-change-modal.visible .modal-header,
#template-change-modal.visible .modal-actions {
  flex: 0 0 auto;
}

#template-change-modal.visible form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

#template-change-modal.visible form > label,
#template-change-modal.visible form > p {
  margin-left: 16px;
  margin-right: 16px;
}

#template-change-modal.visible form > label:first-child {
  margin-top: 16px;
}

#template-change-modal.visible form > p {
  max-height: calc(100vh - 230px);
  max-height: calc(100dvh - 230px);
  overflow: auto;
}

#template-change-modal.visible form > .modal-actions {
  margin-top: 16px;
}

/* Campaign AI template editor: keep the modal itself scrollable after global modal overrides. */
.variant-template-modal.visible {
  overflow: hidden;
}

.variant-template-modal.visible .variant-template-scale-wrap {
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.variant-template-modal.visible .variant-template-card {
  width: min(1560px, calc(100vw - 32px));}

.variant-template-modal.visible .variant-template-card > .modal-header {
  flex: 0 0 auto;
}

.variant-template-modal.visible .variant-template-preview {
  flex: 0 0 auto;
  max-height: 190px;
  overflow: auto;
}

.variant-template-modal.visible .variant-review-form {
  gap: 14px;
  margin: 0;}

.variant-template-modal.visible .variant-review-form > label {
  margin: 0;
}


.variant-template-modal.visible .variant-review-form .rich-editor,
.variant-template-modal.visible .variant-review-form .mail-preview-panel {
  min-height: 0;
}


.variant-template-modal.visible .variant-review-form .rich-editor-surface,
.variant-template-modal.visible .variant-review-form .mail-preview-frame {
  height: clamp(260px, calc(100dvh - 540px), 520px);
  min-height: 0;
  max-height: none;}

.variant-template-modal.visible .variant-review-form .mail-preview-frame {
  overflow: hidden;
}

.variant-template-modal.visible .variant-review-form .mail-preview-body {
  min-height: 0;
  overflow: auto;
}

.variant-template-modal.visible .variant-review-form .modal-actions {
  bottom: auto;
  z-index: 5;
  margin: 0 -28px -28px;
  padding: 14px 28px;
  border-top: 1px solid var(--border-color);
  background: #fbfcff;}

/* Mailbox test dialog: keep the header/actions visible and scroll only the result list. */
#mailbox-test-modal.visible {
  position: fixed;
  inset: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 18px;
  overflow: hidden;
}

#mailbox-test-modal.visible .modal-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(980px, calc(100vw - 36px));
  height: min(760px, calc(100vh - 36px));
  height: min(760px, calc(100dvh - 36px));
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

#mailbox-test-modal.visible .modal-header,
#mailbox-test-modal.visible .modal-actions {
  margin: 0;
  flex: 0 0 auto;
}

#mailbox-test-modal.visible .table-wrap {
  min-height: 0;
  margin: 0;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}

#mailbox-test-modal.visible table {
  min-width: 820px;
}

#mailbox-test-modal.visible thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fbfcff;
}

@media (max-width: 720px) {
  #mailbox-test-modal.visible {
    padding: 10px;
  }

  #mailbox-test-modal.visible .modal-card {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }

  .reply-to-bulk-row {
    grid-template-columns: 1fr;
  }
}

/* Template editor header must stay fixed while the edit body scrolls. */
.template-edit-modal.visible {
  overflow: hidden;
}

.template-edit-modal.visible .template-editor-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1480px, calc(100vw - 36px));
  height: calc(100vh - 36px);
  height: calc(100dvh - 36px);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.template-edit-modal.visible .template-editor-card > .modal-header {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: #fbfcff;
}

.template-edit-modal.visible .template-editor-card > .modal-header .icon-btn {
  position: relative;
  z-index: 31;
  flex: 0 0 auto;
}

.template-edit-modal.visible .template-edit-form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

.template-edit-modal.visible .template-edit-scrollarea {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  padding: 14px 20px 18px;
  overflow: hidden;
  scrollbar-gutter: stable;
}

.template-edit-modal.visible .template-edit-settings {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(130px, 0.65fr) minmax(150px, 0.75fr) minmax(220px, 1.5fr);
  gap: 10px 12px;
  max-height: 126px;
  min-height: 0;
  padding: 10px 12px;
  overflow: auto;
  border: 1px solid rgba(99, 118, 157, 0.16);
  border-radius: 10px;
  background: rgba(247, 249, 252, 0.78);
  scrollbar-gutter: stable;
}

.template-edit-modal.visible .template-edit-settings label {
  min-width: 0;
  gap: 6px;
}

.template-edit-modal.visible .template-edit-settings span {
  font-size: 12px;
}

.template-edit-modal.visible .template-edit-settings input,
.template-edit-modal.visible .template-edit-settings select {
  min-height: 38px;
}

.template-edit-modal.visible .template-edit-form .modal-actions {
  position: static;
  inset: auto;
  bottom: auto;
  flex: 0 0 auto;
  z-index: 5;
  margin: 0;
  padding: 12px 20px 14px;
  transform: none;
}

.template-edit-modal.visible .rich-editor,
.template-edit-modal.visible .mail-preview-panel {
  min-height: 0;
}

.template-edit-modal.visible .rich-editor-field {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  align-content: stretch;
}

.template-edit-modal.visible .rich-editor {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.template-edit-modal.visible .rich-review-layout {
  height: 100%;
  min-height: 0;
  align-items: stretch;
}

.template-edit-modal.visible .rich-editor,
.template-edit-modal.visible .mail-preview-frame {
  height: clamp(520px, calc(100dvh - 260px), 760px);
  min-height: 0;
  max-height: clamp(520px, calc(100dvh - 260px), 760px);
}

.template-edit-modal.visible .rich-editor-surface,
.template-edit-modal.visible .mail-preview-frame {
  scroll-padding-bottom: 120px;
}

.template-edit-modal.visible .mail-preview-frame {
  overflow: hidden;
}

.template-edit-modal.visible .rich-editor-surface {
  overflow: auto;
  height: auto;
  min-height: 0;
  max-height: none;
  padding-bottom: 120px;
}

.template-edit-modal.visible .mail-preview-body {
  min-height: 0;
  overflow: auto;
  padding-bottom: 120px;
}

@media (max-width: 720px) {
  .template-edit-modal.visible {
    padding: 10px;
  }

  .template-edit-modal.visible .template-editor-card {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }

  .template-edit-modal.visible .template-edit-scrollarea {
    overflow: auto;
  }

  .template-edit-modal.visible .template-edit-settings {
    grid-template-columns: 1fr;
    max-height: 156px;
  }

  .template-edit-modal.visible .rich-editor,
  .template-edit-modal.visible .mail-preview-frame {
    height: clamp(420px, calc(100dvh - 250px), 560px);
    max-height: clamp(420px, calc(100dvh - 250px), 560px);
  }
}


.stats-org-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;}

.stats-org-hero h1 {
  margin: 10px 0 0;
  line-height: 1.2;}

.stats-rate-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;}

.stats-rate-pills span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 1px solid rgba(99, 118, 157, 0.14);
  font-size: 12px;}


.stats-org-kpis {
  display: grid;}

.stats-org-kpis article {
  min-height: 108px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(24, 39, 75, 0.08);
  background: #fff;
  box-shadow: 0 12px 30px rgba(31, 51, 95, 0.06);
}

.stats-org-kpis span,
.stats-org-kpis small {
  display: block;
  font-size: 12px;}

.stats-org-kpis strong {
  display: block;
  line-height: 1.05;}

.stats-org-grid {
  display: grid;}

.stats-org-panel {
  overflow: hidden;
}


.stats-org-table th,
.stats-org-table td {
  white-space: nowrap;
}

.stats-org-dimensions {
  display: grid;}

@media (max-width: 1280px) {
  .stats-org-toolbar,
  .stats-org-grid {
    grid-template-columns: 1fr;
  }

  .stats-org-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stats-org-dimensions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .stats-org-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-rate-pills {
    justify-content: flex-start;
  }

  .stats-org-kpis,
  .stats-org-dimensions {
    grid-template-columns: 1fr;
  }
}

button.is-send-locked,
button:disabled.is-send-locked,
input.is-send-locked,
select.is-send-locked,
textarea.is-send-locked {
  cursor: not-allowed;
  opacity: 0.48;
  filter: grayscale(0.18);
}

button[data-allow-while-sending]:disabled:not(.is-send-locked) {
  cursor: not-allowed;
  opacity: 0.55;
}

/* Outbox picker modal: single source of truth. */
#outbox-picker-modal.visible {
  position: fixed;
  inset: 0;
  z-index: 220000;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  padding: 24px;
  overflow: hidden;
  box-sizing: border-box;
}

#outbox-picker-modal.visible .modal-card-wide {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(1180px, calc(100vw - 48px));
  max-width: min(1180px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 48px));
  height: min(760px, calc(100dvh - 48px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  box-sizing: border-box;
}

#outbox-picker-modal.visible .modal-header {
  margin: 0;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

#outbox-picker-modal.visible .mailbox-group-picker {
  display: grid;
  grid-template-columns: minmax(170px, 240px) minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  min-height: 0;
  margin: 0;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
}

#outbox-picker-modal.visible .mailbox-group-picker label {
  min-width: 0;
  margin: 0;
}

#outbox-picker-modal.visible .mailbox-group-picker select,
#outbox-picker-modal.visible .mailbox-group-picker input {
  width: 100%;
  min-height: 38px;
}

#outbox-picker-modal.visible .outbox-choice-grid {
  display: block;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 8px 14px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: #f6f8fc;
}

#outbox-picker-modal.visible .outbox-choice-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 14px;
  min-height: 56px;
  margin: 0 0 6px;
  padding: 8px 12px 8px 42px;
  border: 1px solid #e4e9f3;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

#outbox-picker-modal.visible .outbox-choice-card[hidden] {
  display: none;
}

#outbox-picker-modal.visible .outbox-choice-card:hover {
  border-color: #b9c7df;
  background: #fbfdff;
}

#outbox-picker-modal.visible .outbox-choice-card:has(input:checked) {
  border-color: #4085f5;
  background: #f4f8ff;
}

#outbox-picker-modal.visible .outbox-choice-indicator {
  top: 18px;
  left: 14px;
  width: 18px;
  height: 18px;
}

#outbox-picker-modal.visible .outbox-choice-indicator::after {
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
}

#outbox-picker-modal.visible .choice-card-title {
  grid-column: 1;
  min-width: 0;
  font-size: 0.9rem;
  line-height: 1.2;
}

#outbox-picker-modal.visible .choice-card-title > span:first-child,
#outbox-picker-modal.visible .choice-card-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#outbox-picker-modal.visible .choice-card-subtitle {
  grid-column: 1;
  color: #536179;
  font-size: 0.78rem;
}

#outbox-picker-modal.visible .choice-card-meta {
  color: #6d7890;
  font-size: 0.72rem;
  line-height: 1.2;
}

#outbox-picker-modal.visible .choice-card-meta:nth-of-type(-n + 5) {
  grid-column: 2;
  justify-self: end;
  max-width: 360px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#outbox-picker-modal.visible .choice-card-meta:nth-of-type(n + 6) {
  display: none;
}

#outbox-picker-modal.visible .outbox-filter-empty {
  margin: 18px 0;
  text-align: center;
}

#outbox-picker-modal.visible .modal-actions {
  position: static;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
  z-index: 5;
}

#outbox-picker-modal.visible .outbox-picker-count {
  margin-right: auto;
  color: #536179;
  font-size: 0.86rem;
}

#outbox-picker-modal.visible .modal-actions button {
  min-height: 38px;
  white-space: nowrap;
}

@media (max-width: 760px), (max-height: 640px) {
  #outbox-picker-modal.visible {
    padding: 12px;
  }

  #outbox-picker-modal.visible .modal-card-wide {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    height: calc(100dvh - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }

  #outbox-picker-modal.visible .mailbox-group-picker {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px 12px;
  }

  #outbox-picker-modal.visible .mailbox-group-picker button {
    width: 100%;
  }

  #outbox-picker-modal.visible .outbox-choice-grid {
    padding: 6px 8px;
  }

  #outbox-picker-modal.visible .outbox-choice-card {
    grid-template-columns: minmax(0, 1fr);
    min-height: 52px;
    padding: 8px 10px 8px 38px;
  }

  #outbox-picker-modal.visible .choice-card-meta:nth-of-type(-n + 5) {
    grid-column: 1;
    justify-self: start;
    max-width: 100%;
    text-align: left;
  }

  #outbox-picker-modal.visible .choice-card-meta:not([data-outbox-quota-meta]) {
    display: none;
  }

  #outbox-picker-modal.visible .modal-actions {
    padding: 8px 12px;
  }
}

@media (max-width: 520px) {
  #outbox-picker-modal.visible .mailbox-group-picker {
    grid-template-columns: 1fr;
  }

  #outbox-picker-modal.visible .modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #outbox-picker-modal.visible .outbox-picker-count {
    grid-column: 1 / -1;
  }
}
.phase-progress-bar {
  background: linear-gradient(180deg, #89999d, #667377) !important;
}

.phase-progress-bar .progress-bar-fill,
.phase-mini-progress span {
  background-color: #35dc58 !important;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 38%),
    linear-gradient(90deg, #fdd447 0%, #b7e442 42%, #35dc58 100%) !important;
  background-size: auto !important;
  animation: none !important;
}

.phase-mini-progress {
  background: linear-gradient(180deg, #89999d, #667377) !important;
}

.send-blower-filler {
  background-color: #f07813 !important;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 36%),
    linear-gradient(90deg, #ffb01f, #f07813) !important;
  background-size: auto !important;
  animation: none !important;
}

.campaign-company-list {
  display: grid !important;
  gap: 18px !important;
  margin: 0 16px 16px !important;
}

.campaign-filter-form {
  display: grid !important;
  grid-template-columns: minmax(180px, 0.85fr) minmax(220px, 1.1fr) minmax(240px, 1.3fr) auto !important;
  gap: 12px !important;
  align-items: end !important;
  margin: 0 16px 16px !important;
  padding: 14px !important;
  border: 1px solid rgba(83, 146, 220, 0.16) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.74) !important;
}

.campaign-filter-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.campaign-company-group {
  overflow: hidden !important;
  border: 1px solid rgba(83, 146, 220, 0.16) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.72) !important;
  box-shadow:
    0 14px 32px rgba(43, 95, 166, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.78) !important;
}

.campaign-company-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 14px 16px !important;
  border-bottom: 1px solid rgba(83, 146, 220, 0.14) !important;
  background:
    linear-gradient(90deg, rgba(120, 200, 255, 0.16), rgba(255, 255, 255, 0.72)) !important;
}

.campaign-company-group .table-wrap {
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.campaign-company-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  padding: 10px 16px 14px !important;
  border-top: 1px solid rgba(83, 146, 220, 0.12) !important;
  background: rgba(255, 255, 255, 0.64) !important;
}

.campaign-company-load-more {
  min-height: 36px !important;
  padding: 8px 12px !important;
  white-space: nowrap !important;
}

@media (max-width: 1100px) {
  .campaign-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 680px) {
  .campaign-filter-form {
    grid-template-columns: 1fr !important;
  }
}

.rich-editor-surface span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.variant-template-modal.visible .variant-template-card {
  display: flex !important;
  flex-direction: column !important;
  height: calc(100dvh - 32px) !important;
  max-height: calc(100dvh - 32px) !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.variant-template-modal.visible .variant-review-form {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.variant-template-modal.visible .variant-review-form .modal-actions {
  position: static !important;
  inset: auto !important;
  flex: 0 0 auto !important;
  transform: none !important;
}

.variant-template-modal.visible .variant-review-form .rich-review-layout {
  min-height: 0 !important;
  align-items: stretch !important;
  overflow: hidden !important;
}

.variant-template-modal.visible .variant-review-form .rich-editor {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  min-height: 0 !important;
}

.variant-template-modal.visible .variant-review-form .rich-editor,
.variant-template-modal.visible .variant-review-form .mail-preview-frame {
  height: clamp(300px, calc(100dvh - 570px), 460px) !important;
  max-height: clamp(300px, calc(100dvh - 570px), 460px) !important;
}

.variant-template-modal.visible .variant-review-form .rich-editor-surface,
.variant-template-modal.visible .variant-review-form .mail-preview-frame {
  scroll-padding-bottom: 120px !important;
}

.variant-template-modal.visible .variant-review-form .rich-editor-surface {
  overflow: auto !important;
}

.variant-template-modal.visible .variant-review-form .mail-preview-frame {
  overflow: hidden !important;
}

.variant-template-modal.visible .variant-review-form .rich-editor-surface {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

.variant-template-modal.visible .variant-review-form .rich-editor-surface {
  padding-bottom: 120px !important;
}

.variant-template-modal.visible .variant-review-form .mail-preview-body {
  min-height: 0 !important;
  overflow: auto !important;
  padding-bottom: 120px !important;
}

/* Final statistics page polish: role-aware sections, cleaner hierarchy, and compact tables. */
.stats-org-page {
  gap: 16px !important;
}

.stats-org-toolbar {
  grid-template-columns: minmax(210px, 0.72fr) minmax(420px, 1fr) auto !important;
  align-items: center !important;
  padding: 12px !important;
  border: 1px solid rgba(83, 146, 220, 0.16) !important;
  border-radius: 12px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 250, 255, 0.9)) !important;
  box-shadow: 0 14px 34px rgba(43, 95, 166, 0.08) !important;
}

.stats-org-toolbar .stats-command-meta {
  min-height: 46px !important;
  border-color: rgba(83, 146, 220, 0.14) !important;
  background: rgba(255, 255, 255, 0.78) !important;
}

.stats-org-toolbar .stats-command-form {
  grid-template-columns: minmax(128px, 0.9fr) minmax(132px, 0.72fr) minmax(132px, 0.72fr) auto !important;
  gap: 10px !important;
}

.stats-org-toolbar .stats-filter-form label span {
  color: #5d6f8a !important;
  font-size: 0.74rem !important;
  font-weight: 900 !important;
}

.stats-org-toolbar select,
.stats-org-toolbar input[type="date"] {
  min-height: 38px !important;
  border-color: rgba(83, 146, 220, 0.16) !important;
  border-radius: 8px !important;
  background-color: #fff !important;
}

.stats-org-hero {
  position: relative !important;
  align-items: center !important;
  min-height: 132px !important;
  padding: 22px 24px !important;
  overflow: hidden !important;
  border: 1px solid rgba(83, 146, 220, 0.16) !important;
  border-radius: 12px !important;
  background:
    radial-gradient(circle at 88% 6%, rgba(45, 140, 240, 0.14), transparent 18rem),
    linear-gradient(135deg, #ffffff 0%, #f4f8ff 55%, #eef7f2 100%) !important;
  box-shadow:
    0 18px 44px rgba(43, 95, 166, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
}

.stats-org-hero::before {
  position: absolute;
  right: -32px;
  top: -52px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(14, 122, 99, 0.08);
  content: "";
}

.stats-org-hero > * {
  position: relative;
  z-index: 1;
}

.stats-org-hero h1 {
  margin-top: 12px !important;
  color: #13223a !important;
  font-size: clamp(1.55rem, 2vw, 2.05rem) !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
}

.stats-role-self {
  min-height: 116px !important;
}

.stats-role-leader {
  background:
    radial-gradient(circle at 88% 6%, rgba(14, 122, 99, 0.13), transparent 18rem),
    linear-gradient(135deg, #ffffff 0%, #f4fbf8 58%, #eef6ff 100%) !important;
}

.stats-rate-pills {
  max-width: 660px !important;
  gap: 9px !important;
}

.stats-rate-pills span {
  min-height: 36px !important;
  padding: 8px 12px !important;
  border-color: rgba(83, 146, 220, 0.16) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.86) !important;
  box-shadow: 0 8px 18px rgba(43, 95, 166, 0.06) !important;
  color: #61708a !important;
  font-weight: 850 !important;
}

.stats-rate-pills strong {
  color: #10243d !important;
  font-weight: 950 !important;
}

.stats-org-kpis {
  grid-template-columns: repeat(auto-fit, minmax(152px, 1fr)) !important;
  gap: 12px !important;
}

.stats-org-kpi-card {
  position: relative !important;
  min-height: 112px !important;
  padding: 16px 16px 14px !important;
  overflow: hidden !important;
  border: 1px solid rgba(83, 146, 220, 0.15) !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
  box-shadow: 0 12px 30px rgba(43, 95, 166, 0.07) !important;
}

.stats-org-kpi-card::before {
  display: block;
  width: 32px;
  height: 4px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: #2d8cf0;
  content: "";
}

.stats-org-kpi-2::before,
.stats-org-kpi-3::before {
  background: #0e7a63;
}

.stats-org-kpi-4::before,
.stats-org-kpi-5::before {
  background: #8b5cf6;
}

.stats-org-kpi-6::before {
  background: #d65b5b;
}

.stats-org-kpi-7::before {
  background: #f59e0b;
}

.stats-org-kpis span,
.stats-org-kpis small {
  color: #61708a !important;
  font-weight: 850 !important;
}

.stats-org-kpis strong {
  margin: 7px 0 6px !important;
  color: #10243d !important;
  font-size: clamp(1.35rem, 2vw, 1.75rem) !important;
  font-weight: 950 !important;
}

.stats-org-grid {
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)) !important;
  gap: 14px !important;
}

.stats-org-grid.single {
  grid-template-columns: minmax(0, 1fr) !important;
}

.stats-org-panel {
  padding: 16px !important;
  border: 1px solid rgba(83, 146, 220, 0.16) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: 0 14px 34px rgba(43, 95, 166, 0.08) !important;
}

.stats-org-panel .dashboard-panel-header {
  align-items: center !important;
  margin-bottom: 12px !important;
}

.stats-org-panel .dashboard-panel-header h2 {
  color: #13223a !important;
  font-size: 1rem !important;
  font-weight: 950 !important;
}

.stats-org-panel .dashboard-panel-header p {
  margin: 4px 0 0 !important;
  font-size: 0.78rem !important;
}

.stats-org-panel .stats-table-wrap {
  margin: 0 !important;
  overflow: auto !important;
  border: 1px solid rgba(83, 146, 220, 0.12) !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.stats-org-table {
  min-width: 1040px !important;
}

.stats-org-table th {
  position: sticky !important;
  top: 0 !important;
  z-index: 1 !important;
  background: #f5f8fc !important;
  color: #5d6f8a !important;
  font-size: 0.75rem !important;
  font-weight: 950 !important;
}

.stats-org-table td {
  color: #23324a !important;
  font-size: 0.8rem !important;
  font-weight: 750 !important;
}

.stats-org-table td:first-child strong {
  color: #122033 !important;
  font-weight: 950 !important;
}

.stats-company-tree {
  display: grid !important;
  gap: 10px !important;
}

.stats-company-detail {
  overflow: hidden !important;
  border: 1px solid rgba(83, 146, 220, 0.14) !important;
  border-radius: 10px !important;
  background: #ffffff !important;
}

.stats-company-detail summary {
  display: grid !important;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 2fr) !important;
  gap: 12px !important;
  align-items: center !important;
  padding: 13px 15px !important;
  cursor: pointer !important;
  list-style: none !important;
  user-select: none !important;
}

.stats-company-detail summary::-webkit-details-marker {
  display: none !important;
}

.stats-company-detail summary::before {
  content: "›" !important;
  width: 24px !important;
  height: 24px !important;
  display: inline-grid !important;
  place-items: center !important;
  position: absolute !important;
  margin-left: -2px !important;
  color: #2d8cf0 !important;
  font-size: 1.25rem !important;
  font-weight: 950 !important;
  transform: translateX(-2px) rotate(0deg) !important;
  transition: transform 0.18s ease !important;
}

.stats-company-detail[open] summary::before {
  transform: translateX(-2px) rotate(90deg) !important;
}

.stats-company-title {
  min-width: 0 !important;
  padding-left: 26px !important;
}

.stats-company-title strong {
  display: block !important;
  overflow: hidden !important;
  color: #122033 !important;
  font-size: 0.95rem !important;
  font-weight: 950 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.stats-company-title span {
  display: block !important;
  margin-top: 3px !important;
  color: #6b7a90 !important;
  font-size: 0.76rem !important;
  font-weight: 850 !important;
}

.stats-company-metrics {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(86px, 1fr)) !important;
  gap: 8px !important;
  min-width: 0 !important;
}

.stats-company-metrics span {
  min-width: 0 !important;
  padding: 7px 9px !important;
  border-radius: 8px !important;
  background: #f5f8fc !important;
  color: #66758b !important;
  font-size: 0.74rem !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

.stats-company-metrics b {
  margin-left: 5px !important;
  color: #13223a !important;
  font-size: 0.82rem !important;
  font-weight: 950 !important;
}

.stats-company-empty {
  padding: 18px !important;
}

.stats-person-list {
  display: grid !important;
  gap: 9px !important;
  padding: 0 12px 12px !important;
}

.stats-person-detail {
  overflow: hidden !important;
  border: 1px solid rgba(83, 146, 220, 0.12) !important;
  border-radius: 9px !important;
  background: #fbfdff !important;
}

.stats-person-detail summary {
  display: grid !important;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 2.3fr) !important;
  gap: 10px !important;
  align-items: center !important;
  padding: 11px 13px !important;
  cursor: pointer !important;
  list-style: none !important;
  user-select: none !important;
}

.stats-person-detail summary::-webkit-details-marker {
  display: none !important;
}

.stats-person-detail summary::before {
  content: "›" !important;
  width: 22px !important;
  height: 22px !important;
  display: inline-grid !important;
  place-items: center !important;
  position: absolute !important;
  color: #4b83d1 !important;
  font-size: 1.15rem !important;
  font-weight: 950 !important;
  transform: translateX(-1px) rotate(0deg) !important;
  transition: transform 0.18s ease !important;
}

.stats-person-detail[open] summary::before {
  transform: translateX(-1px) rotate(90deg) !important;
}

.stats-person-title {
  min-width: 0 !important;
  padding-left: 24px !important;
}

.stats-person-title strong {
  display: block !important;
  overflow: hidden !important;
  color: #15243a !important;
  font-size: 0.88rem !important;
  font-weight: 950 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.stats-person-title span {
  display: block !important;
  margin-top: 3px !important;
  color: #6d7c91 !important;
  font-size: 0.72rem !important;
  font-weight: 850 !important;
}

.stats-person-metrics {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(68px, 1fr)) !important;
  gap: 7px !important;
  min-width: 0 !important;
}

.stats-person-metrics span {
  min-width: 0 !important;
  padding: 6px 8px !important;
  border-radius: 7px !important;
  background: #f1f5fa !important;
  color: #64748b !important;
  font-size: 0.71rem !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

.stats-person-metrics b {
  margin-left: 4px !important;
  color: #13223a !important;
  font-size: 0.78rem !important;
  font-weight: 950 !important;
}

.stats-person-campaign-wrap {
  margin: 0 10px 10px !important;
}

.stats-person-campaign-table {
  min-width: 1060px !important;
}

.stats-org-dimensions {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  gap: 12px !important;
}

.stats-dimension-card {
  min-height: 184px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  padding: 15px !important;
  border: 1px solid rgba(83, 146, 220, 0.16) !important;
  border-radius: 12px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.96)) !important;
  box-shadow: 0 12px 28px rgba(43, 95, 166, 0.065) !important;
}

.stats-dimension-data_quality {
  --tone: #0e7a63 !important;
  --tone-soft: rgba(14, 122, 99, 0.11) !important;
}

.stats-dimension-send_status {
  --tone: #2d8cf0 !important;
  --tone-soft: rgba(45, 140, 240, 0.12) !important;
}

.stats-dimension-domain_send {
  --tone: #0f8b8d !important;
  --tone-soft: rgba(15, 139, 141, 0.12) !important;
}

.stats-dimension-domain {
  --tone: #8b5cf6 !important;
  --tone-soft: rgba(139, 92, 246, 0.11) !important;
}

.stats-dimension-journal {
  --tone: #0891b2 !important;
  --tone-soft: rgba(8, 145, 178, 0.12) !important;
}

.stats-dimension-reply_category {
  --tone: #f59e0b !important;
  --tone-soft: rgba(245, 158, 11, 0.13) !important;
}

.stats-dimension-head span {
  color: #50627d !important;
  font-size: 0.82rem !important;
  font-weight: 950 !important;
}

.stats-dimension-head strong {
  width: 32px !important;
  height: 32px !important;
  background: var(--tone-soft) !important;
  color: var(--tone) !important;
}

.stats-dimension-row {
  gap: 7px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.stats-dimension-row > div {
  align-items: center !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.stats-dimension-row span {
  display: block !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #52647e !important;
  font-size: 0.78rem !important;
  font-weight: 850 !important;
}

.stats-dimension-row strong {
  flex: 0 0 auto !important;
  color: #13223a !important;
  font-size: 0.82rem !important;
  font-weight: 950 !important;
}

.stats-dimension-row i {
  height: 6px !important;
  background: #eaf0f7 !important;
}

.stats-dimension-row i::before {
  background: linear-gradient(90deg, var(--tone), color-mix(in srgb, var(--tone) 58%, #ffffff)) !important;
}

.stats-role-self + .stats-org-kpis {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
}

@media (max-width: 1280px) {
  .stats-org-toolbar {
    grid-template-columns: 1fr !important;
  }

  .stats-org-toolbar .stats-command-form {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .stats-command-actions {
    justify-content: flex-start !important;
  }
}

@media (max-width: 720px) {
  .stats-org-toolbar .stats-command-form {
    grid-template-columns: 1fr !important;
  }

  .stats-org-hero {
    min-height: 0 !important;
    align-items: flex-start !important;
  }

  .stats-rate-pills {
    width: 100% !important;
    justify-content: flex-start !important;
  }

  .stats-rate-pills span {
    flex: 1 1 150px !important;
    justify-content: space-between !important;
  }

  .stats-org-grid {
    grid-template-columns: 1fr !important;
  }

  .stats-company-detail summary {
    grid-template-columns: 1fr !important;
  }

  .stats-company-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .stats-person-detail summary {
    grid-template-columns: 1fr !important;
  }

  .stats-person-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .stats-org-table {
    min-width: 920px !important;
  }
}

/* Reply filters and source-separated AI classification statistics */
.reply-kpi-row {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.reply-filter-panel {
  padding: 14px 16px;
}

.reply-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.reply-filter-label {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
}

.reply-filter-chip,
.reply-source-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid #dbe4ee;
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.reply-filter-chip:hover,
.reply-filter-chip.active {
  border-color: #0e7a63;
  background: #ecfdf5;
  color: #0f766e;
}

.reply-source-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.reply-source-summary {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #f8fafc;
}

.reply-source-summary-head,
.reply-source-metrics,
.reply-category-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.reply-source-summary-head strong {
  color: #0f172a;
  font-size: 1rem;
}

.reply-source-summary-head span,
.reply-source-metrics span {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
}

.reply-source-metrics {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.reply-category-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.reply-category-chip {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.reply-category-chip b {
  overflow: hidden;
  color: #172033;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reply-category-chip em {
  color: #0e7a63;
  font-style: normal;
  font-weight: 900;
}

.reply-category-empty {
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 700;
}

@media (max-width: 920px) {
  .reply-kpi-row,
  .reply-source-summary-grid {
    grid-template-columns: 1fr;
  }
}

.author-auto-panel .notice {
  margin-bottom: 0;
}

.author-auto-checkbox {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  justify-self: start;
  align-self: end;
  gap: 10px;
  width: auto;
  min-height: 40px;
  padding-bottom: 8px;
}

.author-auto-checkbox input {
  flex: 0 0 auto;
  width: auto;
  min-width: 18px;
  width: 18px;
  height: 18px;
  min-height: 18px;
}

.author-auto-checkbox span {
  flex: 0 1 auto;
  white-space: nowrap;
}

.author-auto-column-picker {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(225, 167, 43, 0.28);
  border-radius: 8px;
  background: #fffaf0;
}

.author-auto-column-picker[hidden] {
  display: none !important;
}

.author-auto-history-head {
  margin-top: 22px;
}

.author-auto-history-table {
  margin-top: 10px;
}

.author-auto-history-table table {
  min-width: 980px;
}

.author-auto-history-table .cell-main {
  overflow: hidden;
  max-width: 320px;
  color: #172033;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-auto-history-table .cell-sub {
  overflow: hidden;
  max-width: 380px;
  margin-top: 3px;
  color: #64748b;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-auto-outbox-picker {
  display: grid;
  gap: 10px;
}

.author-auto-outbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  padding: 4px;
}

.author-auto-outbox-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(115, 160, 214, 0.2);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.author-auto-outbox-option:has(input:checked) {
  border-color: rgba(37, 99, 235, 0.5);
  background: #eef5ff;
}

.author-auto-outbox-option input {
  width: 18px;
  height: 18px;
}

.author-auto-outbox-option strong,
.author-auto-outbox-option small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-auto-outbox-option small {
  color: #64748b;
  font-size: 0.78rem;
}

.author-auto-outbox-option em {
  padding: 3px 7px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.author-job-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.compact-stat {
  min-height: auto;
  padding: 14px 16px;
}

.compact-stat strong {
  font-size: 1.45rem;
}

.author-action-panel {
  display: grid;
  gap: 16px;
}

.author-flow-form {
  display: grid;
  gap: 16px;
}

.author-mailbox-selector-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.author-mailbox-selector-card {
  display: grid;
  gap: 8px;
  min-height: 148px;
  padding: 14px;
  border: 1px solid rgba(99, 128, 162, 0.16);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.author-mailbox-selector-card > span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 850;
}

.author-mailbox-selector-card strong {
  min-height: 24px;
  color: #18324a;
  font-size: 1rem;
}

.author-mailbox-selector-card small {
  color: #64748b;
  line-height: 1.45;
}

.author-mailbox-selector-card button {
  align-self: end;
  justify-self: start;
}

.author-mailbox-modal-card {
  width: min(880px, calc(100vw - 28px));
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.author-mailbox-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  max-height: min(58vh, 520px);
  overflow: auto;
  padding: 2px;
}

.author-mailbox-option {
  min-height: 70px;
}

.author-flow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 16px;
  align-items: start;
}

.author-outbox-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  max-height: 300px;
  overflow: auto;
  padding: 4px;
}

.author-outbox-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(115, 160, 214, 0.2);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
}

.author-outbox-option:has(input:checked) {
  border-color: rgba(37, 99, 235, 0.5);
  background: #eef5ff;
}

.author-outbox-option input {
  width: 18px;
  height: 18px;
}

.author-outbox-option strong,
.author-outbox-option small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-outbox-option small {
  color: #64748b;
  font-size: 0.78rem;
}

.author-outbox-option em {
  padding: 3px 7px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.author-flow-controls {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(115, 160, 214, 0.16);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.78);
}

.author-flow-checkbox {
  min-height: auto;
}

.author-flow-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 8px;
  background: #f8fbff;
  line-height: 1.55;
}

.author-flow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.author-advanced-settings {
  border: 1px solid rgba(99, 128, 162, 0.16);
  border-radius: 8px;
  background: #fbfdff;
  overflow: hidden;
}

.author-advanced-settings summary {
  cursor: pointer;
  padding: 11px 13px;
  color: #31475c;
  font-weight: 800;
}

.author-advanced-settings[open] summary {
  border-bottom: 1px solid rgba(99, 128, 162, 0.14);
}

.author-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
}

.author-advanced-grid .author-flow-note {
  grid-column: 1 / -1;
}

.author-stage-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(99, 128, 162, 0.16);
  background: #eef4f8;
  color: #31475c;
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.author-stage-badge.is-success {
  border-color: rgba(34, 139, 92, 0.24);
  background: #e9f8f0;
  color: #176a45;
}

.author-stage-badge.is-warning {
  border-color: rgba(191, 132, 21, 0.26);
  background: #fff7e6;
  color: #8a5a0a;
}

.author-stage-badge.is-danger {
  border-color: rgba(220, 38, 38, 0.22);
  background: #fef0f0;
  color: #a32020;
}

.author-stage-badge.is-info {
  border-color: rgba(47, 125, 209, 0.24);
  background: #edf6ff;
  color: #1f5e9f;
}

.author-stage-badge.is-neutral {
  background: #f1f5f9;
  color: #475569;
}

.author-item-list {
  display: grid;
  gap: 14px;
}

.author-item-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(115, 160, 214, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.author-item-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.author-item-head h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.author-item-head p {
  margin: 0;
}

.author-item-statuses {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.author-item-title {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

.author-profile-summary,
.author-profile-source,
.author-item-abstract {
  margin: 0;
  line-height: 1.6;
}

.author-profile-summary {
  padding: 10px 12px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: 8px;
  background: rgba(239, 246, 255, 0.72);
  color: #1e3a5f;
}

.author-profile-source {
  color: #475569;
  font-weight: 700;
}

.author-item-abstract {
  max-height: 150px;
  overflow: auto;
  padding: 10px 12px;
  border-left: 3px solid rgba(37, 99, 235, 0.38);
  background: rgba(248, 251, 255, 0.82);
  color: #334155;
}

.author-item-abstract strong {
  display: inline-block;
  margin-right: 8px;
  color: #1d4ed8;
}

.author-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.author-detail-grid details {
  border: 1px solid rgba(115, 160, 214, 0.18);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.78);
  overflow: hidden;
}

.author-detail-grid summary {
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 700;
}

.author-detail-block {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.author-detail-block p {
  margin: 0;
  line-height: 1.6;
}

.author-detail-block pre {
  max-height: 360px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid rgba(115, 160, 214, 0.16);
  border-radius: 8px;
  background: #ffffff;
  color: #21324a;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.55;
}

@media (max-width: 980px) {
  .author-job-metrics,
  .author-mailbox-selector-grid,
  .author-flow-grid,
  .author-detail-grid {
    grid-template-columns: 1fr;
  }

  .author-item-head {
    display: grid;
  }

  .author-item-statuses {
    justify-content: flex-start;
  }
}

.author-workbench-panel {
  overflow: visible;
}

.author-items-table {
  margin-top: 10px;
}

.author-items-table table {
  min-width: 1280px;
}

.author-items-table .cell-main {
  overflow: hidden;
  max-width: 260px;
  color: #172033;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-items-table .cell-sub {
  overflow: hidden;
  max-width: 300px;
  margin-top: 3px;
  color: #64748b;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-items-table .author-title-cell {
  max-width: 360px;
}

.author-no-send-cell {
  max-width: 340px;
  padding: 7px 9px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.45;
}

.author-send-ok-cell {
  display: inline-flex;
  max-width: 260px;
  padding: 5px 8px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.author-detail-modal-card {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: hidden;
}

.author-detail-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 210000 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.author-detail-modal[hidden] {
  display: none !important;
}

.author-detail-modal .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.54);
  backdrop-filter: blur(2px);
}

.author-detail-modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  background: #ffffff;
}

.author-detail-modal-card .modal-header {
  flex: 0 0 auto;
  align-items: flex-start;
  background: #ffffff;
}

.author-detail-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #243244;
  font-size: 1.25rem;
  font-weight: 900;
}

.author-detail-modal-card .author-detail-pane-wrap {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0;
  padding: 16px;
  overflow: auto;
}

.author-detail-modal-card .author-detail-pane[hidden] {
  display: none !important;
}

.author-detail-modal-card .author-detail-pane.is-visible {
  display: grid;
}

.author-workbench {
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(420px, 1.35fr);
  gap: 16px;
  align-items: start;
}

.author-list-pane {
  display: grid;
  gap: 8px;
  max-height: 760px;
  overflow: auto;
  padding-right: 4px;
}

.author-list-row {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 12px;
  text-align: left;
  border: 1px solid rgba(99, 128, 162, 0.22);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.author-list-row:hover,
.author-list-row.is-active {
  border-color: rgba(25, 103, 210, 0.48);
  background: #f7fbff;
  box-shadow: 0 8px 20px rgba(15, 47, 88, 0.08);
}

.author-row-main,
.author-row-meta,
.author-row-score {
  min-width: 0;
}

.author-row-main {
  display: grid;
  gap: 3px;
}

.author-row-main strong,
.author-row-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-row-main small,
.author-row-score {
  color: var(--muted);
  font-size: 0.84rem;
}

.author-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.author-row-meta span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef4f8;
  color: #365166;
  font-size: 0.78rem;
  font-weight: 700;
}

.author-detail-pane-wrap {
  min-width: 0;
}

.author-detail-pane {
  display: grid;
  gap: 14px;
}

.author-detail-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(99, 128, 162, 0.18);
}

.author-detail-title h3 {
  margin: 0 0 4px;
}

.author-detail-section {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(99, 128, 162, 0.18);
  border-radius: 8px;
  background: #fbfdff;
}

.author-detail-section h4 {
  margin: 0;
  font-size: 0.98rem;
}

.author-detail-section p {
  margin: 0;
  line-height: 1.65;
}

.author-no-send-notice {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #7c2d12;
}

.author-no-send-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: space-between;
}

.author-no-send-head strong {
  color: #9a3412;
  font-size: 0.98rem;
}

.author-no-send-head span {
  color: #9a3412;
  font-size: 0.8rem;
  font-weight: 850;
}

.author-no-send-notice p {
  margin: 0;
  line-height: 1.65;
}

.author-no-send-notice ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.author-no-send-notice li {
  line-height: 1.55;
}

.author-profile-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(99, 128, 162, 0.18);
  border-radius: 8px;
  background: #f8fbfd;
}

.author-overview-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.author-overview-eyebrow {
  color: #25636f;
  font-size: 0.78rem;
  font-weight: 850;
}

.author-overview-copy h4 {
  margin: 0;
  color: #1f3652;
  font-size: 1.08rem;
}

.author-overview-copy p {
  margin: 0;
  color: #334155;
  line-height: 1.68;
}

.author-overview-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.author-overview-facts div {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid rgba(99, 128, 162, 0.15);
  border-radius: 8px;
  background: #ffffff;
}

.author-overview-facts span {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 800;
}

.author-overview-facts strong {
  min-width: 0;
  color: #21324a;
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.author-detail-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.author-radar-section {
  align-content: start;
}

.author-detail-accordion {
  display: grid;
  gap: 10px;
}

.author-detail-accordion details.author-detail-section {
  padding: 0;
  overflow: hidden;
}

.author-detail-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  color: #1f3652;
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}

.author-detail-accordion summary::-webkit-details-marker {
  display: none;
}

.author-detail-accordion summary::after {
  content: "+";
  display: grid;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(99, 128, 162, 0.26);
  border-radius: 999px;
  color: #2f6b82;
  font-size: 1rem;
  line-height: 1;
  place-items: center;
}

.author-detail-accordion details[open] summary {
  border-bottom: 1px solid rgba(99, 128, 162, 0.14);
  background: #f8fbfd;
}

.author-detail-accordion details[open] summary::after {
  content: "-";
}

.author-detail-fold-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.author-detail-fold-body p {
  margin: 0;
  line-height: 1.65;
}

.author-dimension-note-list {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.author-send-reply-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.author-send-reply-grid > .author-mail-preview,
.author-send-reply-grid > .author-reply-preview,
.author-send-reply-grid > p {
  grid-column: 1 / -1;
}

.author-dimension-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}

.author-dimension-row {
  display: grid;
  gap: 6px;
}

.author-dimension-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #31475c;
  font-size: 0.88rem;
  font-weight: 700;
}

.author-dimension-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6edf3;
}

.author-dimension-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f7dd1, #35a58b);
}

.author-radar-wrap {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.author-radar-svg {
  display: block;
  width: min(100%, 300px);
  min-width: 220px;
  aspect-ratio: 1;
}

.author-radar-grid {
  fill: none;
  stroke: rgba(99, 128, 162, 0.22);
  stroke-width: 1;
}

.author-radar-grid.outer {
  stroke: rgba(47, 125, 209, 0.38);
  stroke-width: 1.4;
}

.author-radar-axis {
  stroke: rgba(99, 128, 162, 0.16);
  stroke-width: 1;
}

.author-radar-area {
  fill: rgba(47, 125, 209, 0.2);
  stroke: #2f7dd1;
  stroke-width: 2.4;
  stroke-linejoin: round;
}

.author-radar-dot {
  fill: #ffffff;
  stroke: #2f7dd1;
  stroke-width: 2;
}

.author-radar-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.author-radar-legend div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid rgba(99, 128, 162, 0.16);
  border-radius: 8px;
  background: #ffffff;
}

.author-radar-legend span {
  color: #31475c;
  font-size: 0.86rem;
  font-weight: 760;
}

.author-radar-legend strong {
  color: #1f5e9f;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.author-score-tile {
  position: relative;
}

.author-score-tile span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.author-score-tile em {
  display: inline-grid;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  background: #e8f1f8;
  color: #25636f;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  place-items: center;
}

.author-score-tile::after {
  content: attr(data-score-tip);
  position: absolute;
  right: 0;
  bottom: calc(100% + 9px);
  z-index: 5;
  width: min(320px, 78vw);
  padding: 9px 10px;
  border-radius: 8px;
  background: #1f2f46;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.2);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.author-score-tile:hover::after,
.author-score-tile:focus::after {
  opacity: 1;
  transform: translateY(0);
}

.author-score-explain {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid rgba(99, 128, 162, 0.18);
  border-radius: 8px;
  background: #ffffff;
}

.author-score-explain summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  color: #1f3652;
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}

.author-score-explain summary::-webkit-details-marker {
  display: none;
}

.author-score-explain summary::after {
  content: "-";
  display: grid;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(99, 128, 162, 0.24);
  border-radius: 999px;
  color: #2f6b82;
  line-height: 1;
  place-items: center;
}

.author-score-explain:not([open]) summary::after {
  content: "+";
}

.author-score-explain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 13px 13px;
}

.author-score-reason {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(99, 128, 162, 0.14);
  border-radius: 8px;
  background: #f8fbfd;
}

.author-score-reason header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.author-score-reason header strong {
  color: #1f3652;
  font-size: 0.92rem;
}

.author-score-reason header span {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eaf4ff;
  color: #1f5e9f;
  font-size: 0.78rem;
  font-weight: 850;
}

.author-score-reason p {
  margin: 0;
  color: #40566b;
  font-size: 0.84rem;
  line-height: 1.58;
}

.author-score-reason .author-score-basis {
  color: #24364c;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.62;
}

.author-score-reason .author-score-standard {
  padding-top: 7px;
  border-top: 1px solid rgba(99, 128, 162, 0.12);
  color: #687b8f;
  font-size: 0.78rem;
  line-height: 1.52;
}

.author-score-reason b {
  color: #21324a;
}

.author-score-footnote {
  margin: 0 13px 13px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.5;
}

.author-core-metrics {
  display: grid;
  gap: 9px;
  align-content: start;
  grid-auto-rows: auto;
}

.author-core-metrics div {
  display: grid;
  grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  align-content: center;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid rgba(99, 128, 162, 0.15);
  border-radius: 8px;
  background: #ffffff;
}

.author-core-metrics span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.author-core-metrics strong {
  min-width: 0;
  color: #21324a;
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-align: right;
}

.author-side-summary {
  display: grid;
  gap: 9px;
}

.author-side-card {
  display: grid;
  gap: 6px;
  padding: 11px 12px;
  border: 1px solid rgba(99, 128, 162, 0.15);
  border-radius: 8px;
  background: #ffffff;
}

.author-side-card-accent {
  border-color: rgba(47, 125, 209, 0.2);
  background: linear-gradient(180deg, #f7fbff, #ffffff);
}

.author-side-card span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 850;
}

.author-side-card strong {
  min-width: 0;
  color: #1f3652;
  font-size: 0.94rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.author-side-card p {
  margin: 0;
  color: #40566b;
  font-size: 0.82rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.author-abstract {
  max-height: 180px;
  overflow: auto;
  padding: 10px 12px;
  border-left: 3px solid #2f7dd1;
  background: #f4f9fd;
}

.author-openalex-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.author-openalex-metrics div {
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid rgba(99, 128, 162, 0.16);
  border-radius: 8px;
  background: #ffffff;
}

.author-openalex-metrics span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 750;
}

.author-openalex-metrics strong {
  color: #21324a;
  font-size: 0.94rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.author-openalex-warning {
  padding: 10px 12px;
  border: 1px solid rgba(191, 132, 21, 0.24);
  border-radius: 8px;
  background: #fff8e8;
  color: #83540d;
  line-height: 1.55;
}

.author-chip-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.author-chip-line span {
  padding: 5px 8px;
  border: 1px solid rgba(99, 128, 162, 0.2);
  border-radius: 999px;
  background: #ffffff;
  color: #365166;
  font-size: 0.82rem;
  font-weight: 700;
}

.author-clean-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #495d70;
  line-height: 1.55;
}

.author-mail-preview,
.author-reply-preview {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(99, 128, 162, 0.18);
  border-radius: 8px;
  background: #ffffff;
}

.author-mail-preview div,
.author-reply-preview div {
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #283b4d;
  line-height: 1.62;
}

.author-detail-kv {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
}

.author-detail-kv dt {
  color: var(--muted);
  font-weight: 700;
}

.author-detail-kv dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.author-sub-list {
  display: grid;
  gap: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(99, 128, 162, 0.14);
}

.author-sub-list p {
  color: var(--muted);
  font-size: 0.88rem;
}

.author-journal-fit-list,
.author-work-list {
  display: grid;
  gap: 10px;
}

.author-journal-fit-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.author-journal-fit-card,
.author-work-card {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(99, 128, 162, 0.16);
  border-radius: 8px;
  background: #ffffff;
}

.author-journal-fit-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  align-items: start;
}

.author-journal-fit-card div,
.author-work-card header {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.author-journal-fit-card strong,
.author-work-card strong {
  color: #1f3652;
  font-size: 0.92rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.author-journal-fit-card span,
.author-work-card span,
.author-journal-fit-card small {
  color: #68798d;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
}

.author-journal-fit-card em {
  padding: 4px 7px;
  border-radius: 999px;
  color: #155e75;
  background: #ecfeff;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.author-journal-fit-card small {
  grid-column: 1 / -1;
}

.author-work-card {
  display: grid;
  gap: 9px;
}

.author-work-meta {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 5px 9px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(99, 128, 162, 0.12);
  border-radius: 8px;
  background: #f9fbfd;
}

.author-work-meta dt {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.author-work-meta dd {
  min-width: 0;
  margin: 0;
  color: #32465a;
  font-size: 0.8rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.author-work-card p {
  max-height: 132px;
  overflow: auto;
  padding: 9px 10px;
  border-left: 3px solid rgba(47, 125, 209, 0.42);
  background: #f7fbff;
}

.danger-soft {
  background: rgba(220, 38, 38, 0.08);
  color: #a32020;
}

@media (max-width: 1100px) {
  .author-workbench {
    grid-template-columns: 1fr;
  }

  .author-list-pane {
    max-height: 380px;
  }

  .author-profile-overview,
  .author-detail-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .author-dimension-grid,
  .author-radar-wrap,
  .author-advanced-grid,
  .author-openalex-metrics,
  .author-overview-facts,
  .author-score-explain-grid,
  .author-send-reply-grid,
  .author-journal-fit-list,
  .author-work-meta,
  .author-detail-kv {
    grid-template-columns: 1fr;
  }

  .author-radar-svg {
    justify-self: center;
  }

  .author-detail-title {
    display: grid;
  }

  .author-core-metrics div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .author-core-metrics strong {
    text-align: left;
  }
}


