/* Scheme 02: Gmail Material Design 3 (M3) Native Mail Arrangement Panel (Hero Mail Workspace) */
:root {
  --sidebar-w: 420px;
  --google-blue: #0b57d0;
  --google-blue-soft: #e8f0fe;
  --google-blue-border: #d2e3fc;
  --google-amber: #b06000;
  --google-amber-soft: #fef7e0;
  --google-amber-border: #feefc3;
  --google-green: #146c2e;
  --google-green-soft: #e6f4ea;
  --google-green-border: #ceead6;
  --surface: #ffffff;
  --surface-dim: #f8fafd;
  --surface-border: #dadce0;
  --text-main: #1f1f1f;
  --text-muted: #444746;
  --text-dim: #70757a;
}

/* 邮件正文中的高亮划选：现代柔和高亮 */
.message-body .highlight {
  color: #8c3b00;
  background: #fef7e0;
  border-bottom: 2px solid #f9ab00;
  border-radius: 3px;
  padding: 1px 4px;
  transition: background 0.15s;
}
.message-body .highlight:hover,
.message-body .highlight.is-open {
  background: #feeec0;
  border-bottom-color: #e37400;
}
.inline-mark {
  color: #137333;
  background: #e6f4ea;
  border: 1px solid #ceead6;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 4px;
}
.message-body .inline-ask {
  border-left: 3px solid #1a73e8;
  background: #f8fafd;
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  margin: 8px 0 12px 14px;
}
.message-body .inline-ask p {
  color: #1f1f1f;
  font-size: 13px;
  font-weight: 500;
  margin: 0;
}
.inline-ask-meta {
  color: #1a73e8;
  font-size: 11px;
  font-weight: 500;
  margin-top: 4px;
}

/* Sidebar 容器 */
.sidebar {
  padding: 14px 16px 20px 0;
}
.note-sheet {
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.12), 0 4px 8px rgba(60, 64, 67, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: calc(100vh - 120px);
}
.note-sheet-head {
  display: none;
}

/* M3 Panel 骨架 */
.m3-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Google Sans", "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background: #ffffff;
}

/* M3 Header */
.m3-header {
  padding: 13px 18px;
  border-bottom: 1px solid #f1f3f4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafd;
}
.m3-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}
.m3-spark-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, #e8f0fe 0%, #d2e3fc 100%);
  color: #1a73e8;
  font-size: 14px;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(26, 115, 232, 0.15);
}
.m3-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f1f1f;
  letter-spacing: -0.2px;
}
.m3-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.m3-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 12px;
  line-height: 1.2;
}
.badge-amber {
  background: #fef7e0;
  border: 1px solid #feefc3;
  color: #b06000;
}
.badge-blue {
  background: #e8f0fe;
  border: 1px solid #d2e3fc;
  color: #1a73e8;
}
.badge-green {
  background: #e6f4ea;
  border: 1px solid #ceead6;
  color: #137333;
}
.m3-close-btn {
  border: 0;
  background: transparent;
  color: #5f6368;
  cursor: pointer;
  font-size: 16px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.15s;
}
.m3-close-btn:hover {
  background: #e8eaed;
  color: #1f1f1f;
}

/* 主内容滚动区 */
.m3-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  flex: 1;
}

.m3-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-dim);
  margin-bottom: 7px;
}

/* 安排卡片 */
.m3-card {
  background: #f8fafd;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
}
.m3-card-lead {
  font-size: 14px;
  font-weight: 500;
  color: #1f1f1f;
  margin-bottom: 6px;
}

/* 规格规格列表 */
.m3-spec-list {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 8px 12px;
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}
.m3-spec-list dt {
  color: var(--text-dim);
  font-weight: 500;
}
.m3-spec-list dd {
  margin: 0;
  color: var(--text-main);
}

/* 单选组 */
.m3-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.m3-radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: #3c4043;
  cursor: pointer;
  transition: all 0.15s;
}
.m3-radio-option:hover {
  background: #f1f3f4;
  border-color: #c4c7c5;
}
.m3-radio-option.is-checked {
  background: #e8f0fe;
  border-color: #1a73e8;
  color: #0b57d0;
  font-weight: 500;
}
.m3-radio-circle {
  width: 16px;
  height: 16px;
  border: 2px solid #70757a;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.m3-radio-option.is-checked .m3-radio-circle {
  border-color: #0b57d0;
}
.m3-radio-option.is-checked .m3-radio-circle::after {
  content: "";
  width: 8px;
  height: 8px;
  background: #0b57d0;
  border-radius: 50%;
}
.m3-radio-tag {
  margin-left: auto;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fef7e0;
  color: #b06000;
  font-weight: 500;
}

/* 底部操作条 */
.m3-footer {
  margin-top: auto;
  padding: 13px 18px;
  border-top: 1px solid #f1f3f4;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.m3-text-btn {
  border: 0;
  background: transparent;
  color: #1a73e8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s;
}
.m3-text-btn:hover {
  background: #f1f3f4;
  text-decoration: underline;
}
.m3-primary-btn {
  background: #0b57d0;
  color: #ffffff;
  border: 0;
  padding: 9px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: all 0.15s;
}
.m3-primary-btn:hover {
  background: #0842a0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.m3-primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.m3-secondary-actions {
  display: flex;
  gap: 8px;
}
.m3-secondary-actions button {
  border: 0;
  background: transparent;
  color: #5f6368;
  font-size: 11.5px;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
}
.m3-secondary-actions button:hover {
  background: #f1f3f4;
  color: #1f1f1f;
}

/* 正在处理态 */
.m3-working-banner {
  background: #f0f4f9;
  border: 1px solid #d2e3fc;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  color: #1a73e8;
}
.m3-spinner-ring {
  width: 22px;
  height: 22px;
  border: 2.5px solid #d2e3fc;
  border-top-color: #1a73e8;
  border-radius: 50%;
  animation: m3-spin 0.8s linear infinite;
  margin: 0 auto 10px;
}
@keyframes m3-spin {
  to { transform: rotate(360deg); }
}

/* 弹窗升级 */
.intent-dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 60px);
  margin: auto;
  overflow: auto;
  border: 1px solid #dadce0;
  border-radius: 16px;
  padding: 24px;
  background: #ffffff;
  color: #1f1f1f;
  box-shadow: 0 24px 48px rgba(60, 64, 67, 0.2);
  font-family: inherit;
}
.intent-dialog::backdrop {
  background: rgba(32, 33, 36, 0.4);
  backdrop-filter: blur(2px);
}
.intent-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.intent-dialog h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f1f1f;
}
.intent-dialog-close {
  border: 0;
  background: transparent;
  color: #5f6368;
  font-size: 20px;
  cursor: pointer;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
}
.intent-dialog-close:hover {
  background: #f1f3f4;
}
.intent-dialog-description {
  margin: 10px 0 16px;
  color: #5f6368;
  font-size: 13px;
  line-height: 1.6;
}
.intent-dialog textarea, .intent-dialog select {
  width: 100%;
  padding: 10px 12px;
  background: #f8fafd;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font: 13px/1.6 inherit;
  color: #1f1f1f;
}
.intent-dialog textarea {
  min-height: 90px;
}
.intent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.intent-chips button {
  padding: 5px 10px;
  border: 1px solid #dadce0;
  border-radius: 16px;
  background: #ffffff;
  color: #444746;
  font-size: 11px;
  cursor: pointer;
}
.intent-chips button:hover {
  background: #f1f3f4;
  color: #1f1f1f;
}
.intent-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
.intent-dialog footer button {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #dadce0;
  background: #ffffff;
  color: #444746;
}
.intent-dialog footer button:hover {
  background: #f1f3f4;
}
.intent-dialog footer .intent-save {
  background: #0b57d0;
  border-color: #0b57d0;
  color: #ffffff;
}
.intent-dialog footer .intent-save:hover {
  background: #0842a0;
}
