/* ============================================================
 * 智衣伙伴渠道端 UI 组件层(public/css/partner.css)
 * 唯一样式实现:views/partner/ 全部页面共用——内容片段(materials/reports/
 * report-form/profile)经 views/partner/layout.ejs 组合引入;独立整页
 * (login/register)在各自 <head> 里 <link> 引入(页壳差异样式写在 link 之后)。
 * 设计语言:主色 #2563eb / 圆角 8-10px / 卡片式(#fff 卡 + #e6eaf2 边)。
 * 组件清单与表单写法约定见 docs/开发规范.md「伙伴端 UI 组件层」。
 * 改本文件后把引用处的 ?v=YYYYMMDD 版本参数一并递增(layout/login/register)。
 * ============================================================ */

/* ---------- 基础与页面骨架(自 views/partner/layout.ejs 内联 <style> 迁入,逐条对应) ---------- */

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; background: #f6f8fb; color: #1e293b; font-size: 14px; line-height: 1.6; }
a { color: #2563eb; text-decoration: none; }
.p-page { max-width: 960px; margin: 0 auto; padding: 0 16px 32px; }
.p-topbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid #e6eaf2; margin-bottom: 18px; }
.p-brand { font-size: 17px; font-weight: 700; color: #0f172a; }
.p-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.p-nav-item { padding: 6px 12px; border-radius: 999px; color: #475569; }
.p-nav-item:hover { background: #eef2f7; color: #0f172a; }
.p-nav-item.active { background: #2563eb; color: #fff; }
.p-user { margin-left: auto; display: flex; align-items: center; gap: 10px; color: #64748b; }
.p-user-name { font-weight: 600; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-link-btn { border: none; background: none; color: #2563eb; cursor: pointer; font-size: 14px; padding: 4px; }
.p-link-btn:hover { text-decoration: underline; }
.p-flash { margin-bottom: 16px; padding: 10px 14px; border-radius: 8px; }
.p-flash-ok { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.p-flash-err { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.p-main { min-height: 40vh; }
.p-footer { margin-top: 32px; text-align: center; color: #94a3b8; font-size: 12px; }
.p-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.p-head h1 { font-size: 19px; }
.p-count { color: #64748b; font-size: 13px; font-weight: normal; margin-left: 8px; }
.p-card { background: #fff; border: 1px solid #e6eaf2; border-radius: 10px; padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.p-card h2 { font-size: 15px; margin-bottom: 12px; }
.p-btn { display: inline-block; border: 1px solid #cbd5e1; background: #fff; color: #1e293b; border-radius: 8px; padding: 8px 16px; font-size: 14px; cursor: pointer; }
.p-btn:hover { background: #f8fafc; }
.p-btn-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.p-btn-primary:hover { background: #1d4ed8; }
.p-btn-sm { padding: 4px 12px; font-size: 13px; }
.p-badge { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; border: 1px solid #cbd5e1; background: #f8fafc; color: #334155; white-space: nowrap; }
.p-badge-warn { background: #fef9c3; border-color: #fde047; color: #a16207; }
.p-badge-active { background: #dcfce7; border-color: #86efac; color: #166534; }
.p-badge-conflict { background: #ffedd5; border-color: #fdba74; color: #c2410c; }
.p-badge-released { background: #e0f2fe; border-color: #7dd3fc; color: #0369a1; }
.p-badge-void, .p-badge-muted { background: #f1f5f9; border-color: #cbd5e1; color: #94a3b8; }
.p-badge-following { background: #dbeafe; border-color: #93c5fd; color: #1d4ed8; }
.p-badge-quoted { background: #ede9fe; border-color: #c4b5fd; color: #6d28d9; }
.p-badge-deal { background: #dcfce7; border-color: #86efac; color: #166534; }
.p-badge-shelved { background: #f1f5f9; border-color: #cbd5e1; color: #64748b; }
.p-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 16px; }
.p-stat { background: #fff; border: 1px solid #e6eaf2; border-radius: 10px; padding: 12px; color: inherit; text-align: center; }
.p-stat:hover { border-color: #93c5fd; }
.p-stat-num { display: block; font-size: 20px; font-weight: 700; color: #0f172a; }
.p-stat-label { color: #64748b; font-size: 12px; }
.p-table-wrap { overflow-x: auto; }
table.p-table { width: 100%; border-collapse: collapse; }
.p-table th, .p-table td { border-bottom: 1px solid #eef2f7; padding: 9px 10px; text-align: left; vertical-align: middle; }
.p-table th { color: #64748b; font-size: 13px; white-space: nowrap; }
.p-table tr:last-child td { border-bottom: none; }
.p-empty { text-align: center; color: #94a3b8; padding: 28px 0; }
.p-stage-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.p-stage-form select, .p-stage-form input[type="text"] { border: 1px solid #cbd5e1; border-radius: 6px; padding: 5px 8px; font-size: 13px; font-family: inherit; }
.p-stage-form input[type="text"] { width: 130px; }
.p-pagination { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.p-page-btn { border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; padding: 5px 12px; color: #1e293b; }
.p-page-btn.current { background: #2563eb; border-color: #2563eb; color: #fff; }
.p-field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.p-field label, label.p-field { font-weight: 600; font-size: 13px; color: #334155; }
.p-hint { color: #94a3b8; font-size: 12px; }

/* ---------- 表单组件(渠道端 UI 统一轮新增;沿用主色 #2563eb / 圆角 8px 的设计语言) ---------- */

/* .p-form:卡片内表单限宽,不再通栏拉满 */
.p-form { max-width: 480px; }

/* 控件基础:.p-field 内文本类输入/下拉/多行文本——宽 100%、9px 12px 内边距、#cbd5e1 边、8px 圆角、
 * 字号与正文一致(14px)。label.p-field 一并覆盖(登录页 label 即字段容器的包裹写法)。 */
.p-field input[type="text"], .p-field input[type="password"], .p-field input[type="number"],
.p-field input[type="tel"], .p-field input[type="url"], .p-field input[type="date"],
.p-field select, .p-field textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 8px;
  font-size: 14px; font-family: inherit; line-height: 1.5; background: #fff; color: #1e293b;
}
.p-field input:hover, .p-field select:hover, .p-field textarea:hover { border-color: #94a3b8; }
.p-field input:focus, .p-field select:focus, .p-field textarea:focus {
  outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.p-field input:disabled, .p-field select:disabled, .p-field textarea:disabled {
  background: #f1f5f9; color: #94a3b8; border-color: #e2e8f0; cursor: not-allowed;
}
.p-field textarea { resize: vertical; }
.p-field input::placeholder, .p-field textarea::placeholder { color: #94a3b8; }

/* .p-req:必填红色星号(替代模板里的内联 style="color:#dc2626") */
.p-req { color: #dc2626; margin-left: 2px; }

/* .p-input-group:输入框与按钮并排(验证码行:输入 flex:1 + 发码按钮) */
.p-input-group { display: flex; gap: 8px; align-items: stretch; }
.p-input-group input { flex: 1; min-width: 0; width: auto; }

/* .p-btn-code:发码按钮(不换行紧凑主按钮;倒计时禁用态变浅) */
.p-btn-code { flex-shrink: 0; white-space: nowrap; padding: 9px 14px; font-size: 13px; }
.p-btn-code:disabled { background: #93c5fd; border-color: #93c5fd; cursor: not-allowed; }

/* .p-captcha-img:登录图形验证码图片(失败 1 次触发;高度随 .p-input-group 拉伸对齐输入框,点击刷新) */
.p-captcha-img { flex-shrink: 0; width: 136px; border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; cursor: pointer; }
.p-captcha-img:hover { border-color: #94a3b8; }

/* .p-btn-lg / .p-btn-block:提交主按钮两个变体(注册大按钮 / 登录通栏按钮) */
.p-btn-lg { padding: 12px 40px; font-size: 15px; }
.p-btn-block { display: block; width: 100%; }

/* .p-form-actions:表单按钮行 */
.p-form-actions { margin-top: 8px; }

/* .p-th-label:信息表标签列宽(profile 基本信息表) */
.p-th-label { width: 120px; }

/* .checks:复选框组(注册页"熟悉的行业"多选) */
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks label { font-weight: normal; font-size: 14px; color: #1e293b; display: inline-flex; align-items: center; gap: 5px; }
.checks input { width: auto; }

/* 移动端断点:控件随 .p-form 解除限宽后全宽(控件本身恒为 width:100%) */
@media (max-width: 640px) {
  .p-user-name { max-width: 120px; }
  .p-head h1 { font-size: 17px; }
  .p-form { max-width: none; }
}
