:root {
  --white: #FFFFFF;
  --blue: #1A6BD8;
  --deep: #0D4FA3;
  --pale: #E8F2FF;
  --bg: #F4F8FF;
  --ink: #14233B;
  --muted: #6B7F9E;
  --line: #DCE8F7;
  --line-soft: #EDF4FD;
  --ok: #0E9F77;
  --warn: #E09620;
  --danger: #D64B4B;
  --shadow: 0 8px 28px rgba(13, 79, 163, .08);
  --shadow-lg: 0 18px 60px rgba(13, 79, 163, .18);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }

.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); font-size: 15px; }

/* ---------- shell ---------- */
.app-shell { display: grid; grid-template-columns: 238px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: linear-gradient(178deg, var(--deep) 0%, #0A3E86 62%, #083477 100%);
  color: #fff; padding: 24px 16px 18px; display: flex; flex-direction: column; gap: 26px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; background: #fff; color: var(--deep);
  display: grid; place-items: center; font-weight: 800; font-size: 18px; letter-spacing: -1px;
  box-shadow: 0 6px 18px rgba(0,0,0,.16); flex: none;
}
.brand-name { font-size: 16px; font-weight: 700; letter-spacing: .2px; }
.brand-sub { font-size: 11px; color: #BBD7FF; margin-top: 1px; letter-spacing: .4px; }
.nav-label { font-size: 11px; color: #9FC4F5; letter-spacing: 1.4px; padding: 0 12px 8px; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px;
  color: #D6E7FF; border: 0; background: transparent; text-align: left; width: 100%;
  font-size: 13.5px; transition: background .16s, color .16s;
}
.nav-item:hover { background: rgba(255,255,255,.10); color: #fff; }
.nav-item.active { background: #fff; color: var(--deep); font-weight: 600; box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.nav-item svg { width: 17px; height: 17px; flex: none; }
.nav-count { margin-left: auto; font-size: 11px; background: rgba(255,255,255,.20); padding: 1px 7px; border-radius: 20px; }
.nav-item.active .nav-count { background: var(--pale); color: var(--deep); }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.15); padding: 14px 10px 0; font-size: 11.5px; color: #A9C9F5; line-height: 1.7; }
.side-foot strong { color: #fff; display: block; font-size: 12.5px; margin-bottom: 3px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: var(--white); border-bottom: 1px solid var(--line); padding: 14px 26px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; position: sticky; top: 0; z-index: 20;
}
.topbar-title { font-size: 17px; font-weight: 700; letter-spacing: -.2px; }
.topbar-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.topbar-spacer { flex: 1; }
.global-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter-label { font-size: 11.5px; color: var(--muted); margin-right: 2px; }
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.conn-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(14,159,119,.14); }
.conn-dot.bad { background: var(--danger); box-shadow: 0 0 0 3px rgba(214,75,75,.14); }
.content { padding: 24px 26px 48px; max-width: 1560px; width: 100%; }

/* ---------- generic ---------- */
.view-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.view-head h2 { margin: 0; font-size: 21px; letter-spacing: -.4px; }
.view-head p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.view-head .spacer { flex: 1; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
.panel-head { padding: 15px 18px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.panel-title { font-size: 14.5px; font-weight: 700; }
.panel-sub { font-size: 11.5px; color: var(--muted); }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 18px; }
.panel-body.flush { padding: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-2 > .panel { margin-bottom: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-3 > .panel { margin-bottom: 0; }

.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 17px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi-card::after { content: ""; position: absolute; right: -18px; top: -18px; width: 74px; height: 74px; border-radius: 50%; background: var(--pale); opacity: .8; }
.kpi-label { font-size: 12px; color: var(--muted); position: relative; z-index: 1; }
.kpi-value { font-size: 28px; font-weight: 750; letter-spacing: -1px; line-height: 1.25; margin-top: 5px; position: relative; z-index: 1; }
.kpi-foot { font-size: 11.5px; color: var(--muted); margin-top: 4px; position: relative; z-index: 1; }
.kpi-foot b { color: var(--blue); font-weight: 600; }

.btn { border: 1px solid var(--line); background: var(--white); color: var(--ink); padding: 8px 14px; border-radius: 9px; font-size: 13px; font-weight: 550; display: inline-flex; align-items: center; gap: 7px; transition: .16s; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); background: #F7FBFF; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(26,107,216,.22); }
.btn--primary:hover:not(:disabled) { background: var(--deep); border-color: var(--deep); color: #fff; }
.btn--ghost { border-color: transparent; background: var(--pale); color: var(--deep); }
.btn--ghost:hover:not(:disabled) { background: #D8EAFF; color: var(--deep); }
.btn--danger { color: var(--danger); border-color: #F1D2D2; }
.btn--danger:hover:not(:disabled) { border-color: var(--danger); color: var(--danger); background: #FFF7F7; }
.btn--sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn svg { width: 15px; height: 15px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; background: var(--pale); color: var(--deep); white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--tiktok { background: #EDF0F5; color: #1B2430; }
.badge--instagram { background: #FCEBF4; color: #B42D78; }
.badge--facebook { background: #E7F0FF; color: #1459C8; }
.badge--region { background: #EAF3FF; color: var(--deep); }
.badge--pending { background: #FFF4DC; color: #A66A05; }
.badge--published { background: #E3F7EF; color: #0B7E5E; }
.badge--failed { background: #FDECEC; color: #B93B3B; }
.badge--draft { background: #EEF2F7; color: #65758C; }
.badge--new { background: #E8F2FF; color: var(--deep); }
.badge--contacted { background: #FFF4DC; color: #A66A05; }
.badge--qualified { background: #E3F7EF; color: #0B7E5E; }
.badge--closed { background: #EEF2F7; color: #65758C; }
.badge--muted { background: #F0F4FA; color: var(--muted); }

.tabs { display: inline-flex; background: #EFF5FD; padding: 3px; border-radius: 10px; gap: 2px; }
.tab { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; font-size: 12.5px; color: var(--muted); font-weight: 550; }
.tab.active { background: #fff; color: var(--deep); box-shadow: 0 2px 8px rgba(13,79,163,.10); }
.search-box { position: relative; min-width: 210px; }
.search-box input { width: 100%; padding-left: 32px; }
.search-box svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--muted); }

select, input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="datetime-local"], textarea {
  border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 8px 10px; font-size: 13px; outline: none; transition: border-color .15s, box-shadow .15s; max-width: 100%;
}
select:focus, input:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,107,216,.12); }
select { min-width: 118px; }
textarea { resize: vertical; min-height: 78px; width: 100%; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12px; font-weight: 600; color: #40536F; }
.field .hint { font-size: 11px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.table th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .2px; padding: 11px 14px; background: #F8FBFF; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #F9FCFF; }
.table .nowrap { white-space: nowrap; }
.table .strong { font-weight: 650; }
.table .sub { font-size: 11.5px; color: var(--muted); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }

.bar-row { display: grid; grid-template-columns: 92px 1fr 34px; gap: 10px; align-items: center; margin: 11px 0; font-size: 12px; }
.bar-track { height: 8px; background: var(--line-soft); border-radius: 20px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--blue), #58A0F0); border-radius: 20px; }
.bar-num { text-align: right; font-weight: 650; color: var(--deep); }

.list-mini { display: flex; flex-direction: column; }
.list-mini-item { display: flex; gap: 10px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--line-soft); }
.list-mini-item:last-child { border-bottom: 0; }
.list-mini-item .grow { flex: 1; min-width: 0; }
.list-mini-item .t { font-size: 12.8px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-mini-item .s { font-size: 11.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-mini-item .time { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.empty { padding: 44px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 5px; }
.error-box { background: #FFF5F5; border: 1px solid #F3D2D2; color: #A83B3B; padding: 16px 18px; border-radius: 12px; margin-bottom: 18px; font-size: 13px; }
.error-box b { display: block; margin-bottom: 4px; }

/* ---------- schedule ---------- */
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 5px 12px; font-size: 12px; color: var(--muted); }
.chip.active { background: var(--pale); border-color: #BFD8FA; color: var(--deep); font-weight: 600; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(140px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.week-day { background: #FAFCFF; border: 1px solid var(--line); border-radius: 12px; min-height: 176px; padding: 10px; }
.week-day.today { border-color: var(--blue); background: #F2F8FF; }
.week-day-head { font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 8px; padding-bottom: 7px; border-bottom: 1px solid var(--line-soft); }
.week-day-head b { color: var(--ink); font-size: 12.5px; }
.week-item { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 8px; padding: 7px 8px; margin-bottom: 7px; font-size: 11.5px; }
.week-item.is-published { border-left-color: var(--ok); opacity: .8; }
.week-item.is-failed { border-left-color: var(--danger); }
.week-item .wi-time { color: var(--muted); font-size: 10.5px; }
.week-item .wi-title { font-weight: 600; line-height: 1.4; margin: 2px 0; }
.week-item .wi-acc { color: var(--muted); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- inbox ---------- */
.inbox-layout { display: grid; grid-template-columns: minmax(330px, 42%) minmax(0, 1fr); gap: 18px; align-items: start; }
.inbox-list { max-height: 720px; overflow-y: auto; }
.msg-card { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); cursor: pointer; border-left: 3px solid transparent; }
.msg-card:hover { background: #F8FCFF; }
.msg-card.active { background: var(--pale); border-left-color: var(--blue); }
.msg-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.msg-top .grow { flex: 1; font-weight: 650; font-size: 13px; }
.msg-meta { font-size: 11px; color: var(--muted); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.msg-preview { font-size: 12.3px; color: #465B78; margin-top: 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.identity-lock { background: var(--pale); border: 1px solid #C7DEFB; border-radius: 11px; padding: 11px 13px; display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.identity-lock svg { width: 18px; height: 18px; color: var(--deep); flex: none; }
.identity-lock .t { font-size: 12.8px; font-weight: 650; }
.identity-lock .s { font-size: 11.5px; color: #47648C; margin-top: 2px; }
.detail-head { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #DCEBFF; color: var(--deep); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.quote { background: #F7FAFF; border: 1px solid var(--line); border-radius: 11px; padding: 13px 15px; font-size: 13px; line-height: 1.7; color: #2E4360; }
.thread { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.thread-item { border-radius: 11px; padding: 11px 13px; font-size: 12.8px; border: 1px solid var(--line); background: #fff; }
.thread-item.mine { background: #F1F7FF; border-color: #D3E5FD; margin-left: 34px; }
.thread-item .who { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 8px; }
.reply-box { border-top: 1px solid var(--line-soft); padding-top: 15px; }
.reply-box textarea { margin-bottom: 10px; }
.reply-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.reply-foot .spacer { flex: 1; }

/* ---------- leads ---------- */
.lead-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; margin-bottom: 10px; }
.lead-card:hover { border-color: #BFD8FA; box-shadow: var(--shadow); }
.lead-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lead-top .name { font-size: 14px; font-weight: 700; }
.lead-top .spacer { flex: 1; }
.score { font-size: 12px; font-weight: 700; color: var(--deep); background: var(--pale); padding: 2px 9px; border-radius: 20px; }
.lead-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #4B6080; margin-top: 10px; }
.lead-meta span b { color: var(--muted); font-weight: 500; margin-right: 4px; }
.source-chain { background: #F7FAFF; border: 1px dashed #C7DEFB; border-radius: 10px; padding: 11px 13px; margin-top: 12px; font-size: 12px; }
.source-chain .chain-title { font-size: 11px; color: var(--muted); letter-spacing: .4px; margin-bottom: 6px; }
.source-chain .chain-quote { color: #3C5475; line-height: 1.6; }

/* ---------- accounts ---------- */
.matrix-group { margin-bottom: 22px; }
.matrix-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.matrix-head h3 { margin: 0; font-size: 14px; }
.matrix-head .line { flex: 1; height: 1px; background: var(--line); }
.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }
.account-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; }
.account-card.is-paused { opacity: .72; }
.account-card .ac-top { display: flex; gap: 8px; align-items: center; margin-bottom: 9px; }
.account-card .ac-handle { font-size: 14px; font-weight: 700; }
.account-card .ac-name { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }
.account-card .ac-stats { display: flex; gap: 16px; border-top: 1px solid var(--line-soft); padding-top: 10px; font-size: 11.5px; color: var(--muted); }
.account-card .ac-stats b { display: block; color: var(--ink); font-size: 14px; font-weight: 700; }
.perm-table th:first-child, .perm-table td:first-child { min-width: 210px; }
.perm-toggle { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 7px; padding: 3px 9px; font-size: 11.5px; min-width: 62px; }
.perm-toggle.on { background: var(--pale); border-color: #BFD8FA; color: var(--deep); font-weight: 650; }
.guard-result { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.guard-row { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; background: #F8FBFF; border: 1px solid var(--line-soft); border-radius: 9px; padding: 9px 11px; }
.guard-row .g-icon { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: #fff; flex: none; margin-top: 1px; }
.guard-row .g-icon.pass { background: var(--ok); }
.guard-row .g-icon.fail { background: var(--danger); }
.guard-row .g-text b { display: block; }
.guard-row .g-text span { color: var(--muted); font-size: 11.5px; }

/* ---------- modal / toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 38, 80, .42); display: grid; place-items: center; z-index: 60; padding: 20px; backdrop-filter: blur(2px); }
.modal { background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); width: min(640px, 100%); max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; }
.modal.wide { width: min(780px, 100%); }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-head .spacer { flex: 1; }
.modal-close { border: 0; background: transparent; font-size: 21px; line-height: 1; color: var(--muted); padding: 0 4px; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.modal-foot .spacer { flex: 1; }
.modal-note { background: var(--pale); border-radius: 9px; padding: 10px 12px; font-size: 12px; color: #345787; margin-bottom: 16px; line-height: 1.6; }
.detail-rows { display: grid; grid-template-columns: 96px 1fr; gap: 9px 14px; font-size: 12.8px; }
.detail-rows dt { color: var(--muted); }
.detail-rows dd { margin: 0; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 80; background: var(--deep); color: #fff; padding: 12px 18px; border-radius: 11px; box-shadow: var(--shadow-lg); font-size: 13px; max-width: 380px; animation: toastIn .2s ease-out; }
.toast.error { background: #A83B3B; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox-layout { grid-template-columns: 1fr; }
  .inbox-list { max-height: 360px; }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px; overflow-x: auto; }
  .brand-sub, .nav-label, .side-foot { display: none; }
  .brand { padding: 0; }
  .brand-name { font-size: 13px; }
  .brand-mark { width: 32px; height: 32px; font-size: 15px; }
  .nav { flex-direction: row; gap: 4px; }
  .nav-item { width: auto; padding: 8px 10px; font-size: 12px; white-space: nowrap; }
  .nav-count { display: none; }
  .topbar { padding: 12px 16px; }
  .content { padding: 18px 16px 40px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .topbar-title { font-size: 15px; }
  .global-filters { width: 100%; }
  .global-filters select { flex: 1; min-width: 96px; }
}

/* ---------- 全栈版本：登录、凭据录入、系统设置 ---------- */
.badge--ok { background: #E6F7F1; color: #0B7C5D; border-color: #BCEBD9; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 11.5px; word-break: break-all; }
.operator-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--pale); color: var(--deep); border-radius: 8px; padding: 5px 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.operator-chip small { font-weight: 400; color: var(--muted); font-size: 11px; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 28px 18px; background: radial-gradient(900px 500px at 50% -10%, #DCEBFF 0%, var(--bg) 62%); }
.login-card { width: 100%; max-width: 470px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 32px; }
.login-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; }
.login-brand .brand-mark { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(26, 107, 216, .28); }
.login-brand .brand-name { color: var(--ink); font-size: 16px; font-weight: 700; }
.login-brand .brand-sub { color: var(--muted); font-size: 11.5px; }
.login-card h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.3px; }
.login-lead { margin: 0 0 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form .field { display: flex; flex-direction: column; gap: 6px; }
.login-form .btn { width: 100%; justify-content: center; padding: 10px; }
.login-hint { margin-top: 18px; background: var(--pale); border-radius: 10px; padding: 12px 14px; font-size: 12px; color: var(--deep); line-height: 1.8; }
.login-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.login-stack span { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 20px; padding: 2px 9px; }
.login-card code { background: var(--pale); padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }

.form-section { font-size: 12px; font-weight: 700; color: var(--deep); letter-spacing: .3px; border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 4px; }
.ac-sub { font-size: 11.5px; color: var(--muted); word-break: break-all; margin: 0 0 8px; }
.ac-actions { display: flex; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.stack-form { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.stack-form .field { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.log-list { margin-top: 12px; border-top: 1px solid var(--line-soft); }
.log-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 11.5px; color: var(--muted); }
.log-row .g-icon { width: 16px; height: 16px; font-size: 10px; flex: none; }
@media (max-width: 560px) { .login-card { padding: 22px; } }

/* ---------- 本地视频素材与真实账号接入 ---------- */
.callout { border-radius: 10px; padding: 11px 14px; font-size: 12.5px; line-height: 1.75; margin: 0 0 12px; border: 1px solid var(--line); background: var(--pale); color: var(--deep); }
.callout b { display: block; margin-bottom: 2px; }
.callout--warn { background: #FFF7E8; border-color: #F4DCA8; color: #8A5B06; }
.callout--ok { background: #E9F8F2; border-color: #BDE8D8; color: #0B7A5B; }
.callout .mono, .hint .mono { font-size: 11px; word-break: break-all; }
.upload-zone { display: flex; flex-direction: column; gap: 8px; border: 1px dashed var(--line); background: #F8FBFF; border-radius: 10px; padding: 14px; transition: background .15s ease, border-color .15s ease; }
.upload-zone.is-dragover { border-color: var(--blue); background: #E8F2FF; }
.upload-zone input[type=file] { font-size: 12.5px; color: var(--ink); width: 100%; }
.upload-zone input[type=file]::file-selector-button { border: 1px solid var(--blue); background: #fff; color: var(--blue); border-radius: 8px; padding: 6px 12px; margin-right: 10px; cursor: pointer; font-size: 12px; }
.upload-zone input[type=file]::file-selector-button:hover { background: var(--blue); color: #fff; }
.hint.upload-ok { color: #0B7A5B; font-weight: 600; }
.hint.upload-err { color: #C0392B; font-weight: 600; }
.upload-hint { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.progress-track { height: 6px; background: var(--line-soft); border-radius: 6px; overflow: hidden; margin-top: 10px; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), #4B98F0); transition: width .18s ease; }
.media-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.media-main { flex: 1; min-width: 220px; }
.media-url { font-size: 11px; color: var(--muted); margin-top: 6px; word-break: break-all; }
.media-row .actions { flex: none; }
.media-player { width: 100%; max-height: 420px; border-radius: 10px; background: #0B1A2E; display: block; }
.guide { border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; background: #fff; overflow: hidden; }
.guide summary { cursor: pointer; padding: 10px 12px; font-size: 12.5px; font-weight: 600; color: var(--deep); background: var(--pale); }
.guide ol { margin: 0; padding: 10px 12px 12px 30px; font-size: 12px; color: var(--ink); line-height: 1.85; }
.guide li { margin-bottom: 4px; }
.webhook-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.webhook-row .mono { flex: 1 1 200px; min-width: 0; word-break: break-all; }
.detail-rows dd .btn { margin-left: 0; flex: none; }
@media (max-width: 560px) {
  .media-row .actions { width: 100%; }
  .media-row .btn { flex: 1; }
}
