.notes-mode-seg {
  display: inline-flex;
  gap: 6px;
  margin-right: 12px;
}
.notes-mode-seg .btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.notes-detail-head {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.6;
}
.notes-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.notes-detail-table th,
.notes-detail-table td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}
.notes-detail-table th {
  background: #f6f8fb;
}
#notesDetailBody {
  max-height: 60vh;
  overflow: auto;
}

/* ---- 邮箱设置 ---- */
.notes-mail-page {
  width: 100%;
  max-width: none;
}

.notes-mail-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.notes-mail-toolbar-copy strong {
  display: block;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 4px;
}

.notes-mail-toolbar-copy p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.notes-mail-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.notes-mail-enable {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.notes-mail-enable-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  margin: 0;
}

.notes-mail-enable-row input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.notes-mail-enable-row strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
}

.notes-mail-enable-row em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.notes-mail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.notes-mail-card-single {
  max-width: 100%;
}

.notes-mail-account-grid .notes-mail-row-2 {
  margin-bottom: 0;
}

.notes-mail-account-grid .notes-mail-pass-field {
  grid-column: 1 / -1;
}

.notes-mail-subject-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 2fr);
  gap: 16px 24px;
  margin-bottom: 14px;
}

.notes-mail-account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}

.notes-mail-preview-block {
  margin-bottom: 14px;
}

.notes-mail-preview-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.notes-mail-preview-head strong {
  font-size: 14px;
  color: var(--ink);
}

.notes-mail-preview-head .muted {
  flex: 1;
  font-size: 12px;
}

.notes-mail-html-preview {
  display: block;
  width: 100%;
  min-height: 720px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #eef2f6;
  box-sizing: border-box;
}

.notes-mail-body-editor {
  width: 100%;
  min-height: 360px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}

.notes-mail-body-editor:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 110, 86, 0.12);
}

.notes-mail-vars {
  padding: 14px 16px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px dashed var(--line);
}

.notes-mail-vars strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 10px;
}

.notes-mail-vars-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.notes-mail-vars-list span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.notes-mail-vars-list code {
  font-size: 12px;
  color: var(--accent);
  background: rgba(15, 110, 86, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
}

.notes-mail-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.notes-mail-card-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.notes-mail-card-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.notes-mail-card-head p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.notes-mail-fields {
  padding: 16px 18px 8px;
}

.notes-mail-fields .field {
  margin-bottom: 14px;
}

.notes-mail-fields .field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.notes-mail-fields .field > label .muted {
  font-weight: 400;
  margin-left: 4px;
}

.notes-mail-fields .field input,
.notes-mail-fields .field select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  color: var(--ink);
  box-sizing: border-box;
}

.notes-mail-fields .field input:focus,
.notes-mail-fields .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 110, 86, 0.12);
}

.notes-mail-row-2 {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
}

.field-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.notes-mail-foot {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notes-mail-foot .error {
  min-height: 0;
}

@media (max-width: 960px) {
  .notes-mail-grid,
  .notes-mail-subject-row,
  .notes-mail-account-grid {
    grid-template-columns: 1fr;
  }
  .notes-mail-toolbar {
    flex-direction: column;
  }
}
