* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f1f5f9; color: #1e293b; font-size: 14px; }
.hidden { display: none !important; }

/* 登录 */
.login-wrap { display: flex; align-items: center; justify-content: center; height: 100vh; background: linear-gradient(135deg, #1e3a8a, #2f6fed); }
.login-box { background: #fff; padding: 40px 36px; border-radius: 14px; width: 360px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.login-box h2 { text-align: center; margin-bottom: 6px; }
.login-sub { text-align: center; color: #94a3b8; font-size: 12px; margin-bottom: 24px; }
.login-box input { width: 100%; padding: 11px 12px; border: 1px solid #cbd5e1; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.login-box input:focus { outline: none; border-color: #2f6fed; }
.login-msg { color: #dc2626; font-size: 13px; text-align: center; margin-top: 10px; min-height: 18px; }

/* 布局 */
.app { display: flex; height: 100vh; }
.sidebar { width: 220px; background: #0f172a; color: #cbd5e1; display: flex; flex-direction: column; padding: 18px 12px; flex-shrink: 0; }
.logo { font-size: 15px; font-weight: bold; color: #fff; padding: 6px 10px 18px; }
.sidebar nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.nav-item { color: #cbd5e1; text-decoration: none; padding: 11px 12px; border-radius: 8px; font-size: 14px; }
.nav-item:hover { background: #1e293b; color: #fff; }
.nav-item.active { background: #2f6fed; color: #fff; }
.main { flex: 1; overflow-y: auto; padding: 26px 32px; }
.page h1 { font-size: 20px; margin-bottom: 18px; }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.page-head h1 { margin-bottom: 0; }

/* 卡片 */
.cards { display: flex; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.card { background: #fff; border-radius: 12px; padding: 18px 24px; flex: 1; min-width: 140px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card-num { font-size: 28px; font-weight: bold; }
.card-num.green { color: #16a34a; }
.card-num.orange { color: #ea580c; }
.card-num.gray { color: #64748b; }
.card-label { color: #64748b; font-size: 12px; margin-top: 4px; }

/* 面板/表格 */
.panel { background: #fff; border-radius: 12px; padding: 18px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 20px; }
.panel h3 { font-size: 15px; margin-bottom: 12px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: #64748b; font-weight: 500; font-size: 12px; padding: 8px 6px; border-bottom: 1px solid #e2e8f0; }
td { padding: 10px 6px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
tr:last-child td { border-bottom: none; }
.tip { color: #64748b; font-size: 13px; line-height: 1.8; }
.tip a { color: #2f6fed; }

/* 状态标签 */
.tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; }
.tag.draft { background: #f1f5f9; color: #64748b; }
.tag.scheduled { background: #ffedd5; color: #ea580c; }
.tag.published { background: #dcfce7; color: #16a34a; }
.tag.failed { background: #fee2e2; color: #dc2626; }

/* 按钮 */
.btn { border: 1px solid #cbd5e1; background: #fff; color: #334155; padding: 8px 16px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.btn:hover { border-color: #94a3b8; }
.btn.primary { background: #2f6fed; border-color: #2f6fed; color: #fff; }
.btn.primary:hover { background: #1d5ce0; }
.btn.ghost { background: transparent; color: #94a3b8; border-color: transparent; }
.btn.ghost:hover { color: #fff; background: #1e293b; }
.btn.danger { color: #dc2626; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 10px; margin-top: 12px; }
.btn-row.right { justify-content: flex-end; }
td .btn { padding: 4px 10px; margin-right: 4px; margin-bottom: 4px; }

/* 弹窗 */
.modal-wrap { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: #fff; border-radius: 14px; padding: 26px 28px; width: 560px; max-height: 88vh; overflow-y: auto; }
.modal h3 { margin-bottom: 16px; }
.modal label { display: block; font-size: 13px; color: #475569; margin: 12px 0 6px; }
.modal input, .modal select, .modal textarea { width: 100%; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; font-family: inherit; }
.modal textarea { resize: vertical; }
.modal input:focus, .modal select:focus, .modal textarea:focus { outline: none; border-color: #2f6fed; }
.ai-row { display: flex; gap: 8px; }
.ai-row input { flex: 1; }
.ai-row .btn { white-space: nowrap; }

/* 设置页 */
.form-panel { max-width: 640px; }
.form-panel label { display: block; font-size: 13px; color: #475569; margin: 14px 0 6px; }
.form-panel input { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; }
.test-result { margin-top: 16px; padding: 12px; border-radius: 8px; font-size: 13px; line-height: 1.7; word-break: break-all; }
.test-result.ok { background: #dcfce7; color: #166534; }
.test-result.err { background: #fee2e2; color: #991b1b; }
.form-panel ol { margin: 10px 0 0 20px; line-height: 2; }
.form-panel code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; }

/* Toast */
.toast { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); background: #0f172a; color: #fff; padding: 10px 22px; border-radius: 8px; z-index: 99; font-size: 14px; }
.toast.err { background: #dc2626; }

@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } .sidebar { width: 64px; } .logo { display: none; } .nav-item { text-align: center; } }
