/* Curves 品牌主題（沿用 cv-mail 色票） */
:root {
  --brand-50: #F5EEFB;
  --brand-100: #EAE0F6;
  --brand-200: #D6C0EF;
  --brand-500: #9466D8;
  --brand-600: #7C3AED;
  --brand-700: #6D28D9;
  --brand-900: #3B1F6B;
  --bg: #F8F3FB;
  --surface: #FFFFFF;
  --border: #ECDFF6;
  --ink: #1F1B2E;
  --ink-2: #4B5563;
  --ink-3: #6B7280;
  --success: #059669;
  --success-bg: #ECFDF5;
  --warning: #B45309;
  --warning-bg: #FFFBEB;
  --danger: #DC2626;
  --danger-bg: #FEF2F2;
  --shadow-sm: 0 1px 2px rgba(91, 33, 182, .04), 0 1px 3px rgba(91, 33, 182, .06);
  --shadow-lg: 0 12px 32px rgba(91, 33, 182, .12), 0 4px 12px rgba(91, 33, 182, .06);
  --font-sans: 'Noto Sans TC', system-ui, -apple-system, 'PingFang TC', 'Microsoft JhengHei', sans-serif;
}

html, body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.cv-header {
  background: linear-gradient(135deg, #6D28D9 0%, #7C3AED 60%, #8B5CF6 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(91, 33, 182, .18);
}
.cv-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: #fff; color: var(--brand-700);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 17px;
}
.nav-link {
  padding: 6px 12px; border-radius: 10px; font-weight: 600; font-size: 14px;
  color: rgba(255, 255, 255, .85); white-space: nowrap;
}
.nav-link:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.nav-link.active { background: #fff; color: var(--brand-700); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-sm);
}
.card-title { font-weight: 800; color: var(--brand-900); font-size: 17px; }
.muted { color: var(--ink-3); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 14px;
  border: 1px solid transparent; transition: background-color .12s, border-color .12s;
  cursor: pointer; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand-600); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-700); }
.btn-outline { background: #fff; color: var(--brand-700); border-color: var(--brand-200); }
.btn-outline:hover:not(:disabled) { background: var(--brand-50); }
.btn-danger { background: #fff; color: var(--danger); border-color: #FECACA; }
.btn-danger:hover:not(:disabled) { background: var(--danger-bg); }
.btn-sm { padding: 4px 10px; font-size: 13px; border-radius: 8px; }

.field-label { font-size: 13px; font-weight: 700; color: var(--ink-2); display: block; margin-bottom: 4px; }
.input, select.input, textarea.input {
  width: 100%; background: #fff; border: 1px solid var(--border);
  padding: 8px 12px; border-radius: 10px; font-size: 14px; color: var(--ink);
}
.input:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(124, 58, 237, .15); }
.input:disabled { background: #F9FAFB; color: var(--ink-3); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.badge-ok { color: var(--success); background: var(--success-bg); }
.badge-warn { color: var(--warning); background: var(--warning-bg); }
.badge-bad { color: var(--danger); background: var(--danger-bg); }
.badge-brand { color: var(--brand-700); background: var(--brand-50); }
.badge-gray { color: var(--ink-3); background: #F3F4F6; }

.banner { border-radius: 12px; padding: 12px 16px; font-size: 14px; }
.banner-warn { background: var(--warning-bg); border: 1px solid #FDE68A; color: #92400E; }
.banner-bad { background: var(--danger-bg); border: 1px solid #FECACA; color: #991B1B; }
.banner-ok { background: var(--success-bg); border: 1px solid #A7F3D0; color: #065F46; }

.item { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: #fff; }
.item.excluded { opacity: .55; background: #FAFAFA; }
.item dt { color: var(--ink-3); font-size: 12px; font-weight: 700; min-width: 3em; }
.item dd { font-size: 14px; color: var(--ink-2); }
.unconfirmed { color: var(--warning); font-weight: 600; }

.msg-box {
  font-family: var(--font-sans); font-size: 14px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}

table.tbl { width: 100%; font-size: 14px; border-collapse: collapse; }
table.tbl th { text-align: left; color: var(--ink-3); font-weight: 700; font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.tbl td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #1F1B2E; color: #fff; padding: 10px 18px; border-radius: 12px;
  font-size: 14px; box-shadow: var(--shadow-lg); z-index: 50;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
#toast.show { opacity: 1; }
