/* ============================================================
   代理平台（Web 端）样式
   入口：/agent/    与官网共用 common.css 的变量（--primary 等）
   ============================================================ */

/* ==================== 登录 ==================== */
.al-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: linear-gradient(135deg, #0F44D8 0%, #165DFF 55%, #4E8CFF 100%);
}
.al-login-box {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-3);
  padding: 36px 32px 28px;
  text-align: center;
}
.al-login-brand img { height: 34px; width: auto; margin: 0 auto; }
.al-login-title { font-size: 22px; font-weight: 800; color: var(--ink); margin-top: 14px; }
.al-login-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }

.al-qr-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 22px auto 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #FAFCFF;
}
.al-qr { width: 200px; height: 200px; }
.al-qr-tip { font-size: 13px; color: var(--faint); }
.al-qr-expired {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.al-login-msg {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  min-height: 40px;
}
.al-login-foot { margin-top: 18px; font-size: 12px; color: var(--faint); }
.al-login-foot a { color: var(--primary); }

/* ==================== 登录：网站应用扫码入口 ==================== */
.al-website { margin-top: 20px; }
.al-btn-block { display: block; width: 100%; }
.al-website-tip { font-size: 12px; color: var(--faint); margin-top: 8px; }
.al-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 4px;
  font-size: 12px;
  color: var(--faint);
}
.al-or::before,
.al-or::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

/* ==================== 通用按钮 ==================== */
.al-btn {
  display: inline-block;
  padding: 9px 18px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  background: #F1F5FF;
  color: var(--primary);
  transition: background .18s, box-shadow .18s, color .18s;
}
.al-btn:hover { background: #E5EDFF; }
.al-btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.al-btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.al-btn-primary {
  background: linear-gradient(135deg, #165DFF 0%, #3B82F6 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(22, 93, 255, .25);
}
.al-btn-primary:hover { background: linear-gradient(135deg, #0F44D8 0%, #165DFF 100%); }
.al-btn-sm { padding: 7px 14px; font-size: 13px; }

/* ==================== 看板框架 ==================== */
.al-app { min-height: 100vh; background: var(--bg); }

.al-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.al-header-in {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.al-logo { display: flex; align-items: center; gap: 10px; }
.al-logo img { height: 28px; width: auto; }
.al-logo span { font-size: 16px; font-weight: 700; color: var(--ink); }
.al-user { display: flex; align-items: center; gap: 12px; }
.al-avatar { width: 36px; height: 36px; border-radius: 50%; background: #E8F3FF; object-fit: cover; }
.al-user-info { display: flex; flex-direction: column; line-height: 1.3; }
.al-user-info b { font-size: 14px; color: var(--ink); }
.al-user-info span { font-size: 12px; color: var(--muted); }

.al-body {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 48px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.al-side { flex: 0 0 176px; }
.al-menu {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 76px;
}
.al-menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 14px;
  color: var(--ink-2);
  transition: background .16s, color .16s;
}
.al-menu a i { font-style: normal; font-size: 15px; }
.al-menu a:hover { background: #F4F8FF; color: var(--primary); }
.al-menu a.active { background: var(--primary-ghost); color: var(--primary); font-weight: 600; }

.al-main { flex: 1 1 auto; min-width: 0; }
.al-view-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.al-h2 { font-size: 19px; font-weight: 800; color: var(--ink); margin-bottom: 16px; }
.al-faint { font-size: 12px; color: var(--faint); }

/* 数据卡片 */
.al-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.al-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 16px 18px;
}
.al-card .k { font-size: 13px; color: var(--muted); }
.al-card .v { font-size: 24px; font-weight: 800; color: var(--ink); margin-top: 6px; letter-spacing: -.5px; }
.al-card .v.green { color: var(--green); }
.al-card .v.blue { color: var(--primary); }
.al-card .v.orange { color: var(--orange); }
.al-card .s { font-size: 12px; color: var(--faint); margin-top: 4px; }

/* 面板 */
.al-panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.al-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.al-panel-head h3 { font-size: 15px; font-weight: 700; color: var(--ink); }

/* 趋势图（纯 CSS 柱状） */
.al-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 150px;
  padding-bottom: 22px;
  position: relative;
  border-bottom: 1px solid var(--line);
}
.al-bar {
  flex: 1 1 0;
  min-width: 3px;
  background: linear-gradient(180deg, #4E8CFF, #165DFF);
  border-radius: 3px 3px 0 0;
  position: relative;
  transition: opacity .16s;
  min-height: 2px;
}
.al-bar:hover { opacity: .78; }
.al-bar .d {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--faint);
  white-space: nowrap;
}
.al-chart-empty { color: var(--faint); font-size: 13px; align-self: center; margin: 0 auto; }

/* 推广数据 */
.al-promo { display: flex; gap: 32px; flex-wrap: wrap; }
.al-promo .item { font-size: 13px; color: var(--muted); }
.al-promo .item b { display: block; font-size: 22px; font-weight: 800; color: var(--ink); margin-top: 4px; }

/* ==================== 筛选条 ==================== */
.al-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.al-input {
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.al-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22, 93, 255, .12); }
input.al-input[type="text"] { min-width: 190px; }
.al-sep { font-size: 12px; color: var(--faint); }
.al-grow { flex: 1 1 auto; }
.al-hint { font-size: 12px; color: var(--faint); margin: -4px 0 12px; }

/* ==================== 数据表格 ==================== */
.al-table-wrap { overflow-x: auto; }
.al-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.al-table th, .al-table td { padding: 11px 12px; text-align: left; white-space: nowrap; }
.al-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: #F8FAFF;
  border-bottom: 1px solid var(--line);
}
.al-table tbody tr { border-bottom: 1px solid #F1F4F9; }
.al-table tbody tr:last-child { border-bottom: none; }
.al-table tbody tr:hover { background: #FAFCFF; }
.al-table .tr { text-align: right; }
.al-td-wide { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.al-td-empty { text-align: center !important; color: var(--faint); padding: 40px 0 !important; }
.al-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--ink-2); }
.al-green { color: var(--green); font-weight: 600; }

.al-cell-user { display: flex; align-items: center; gap: 9px; }
.al-cell-txt { display: flex; flex-direction: column; line-height: 1.35; }
.al-cell-txt b { font-size: 13px; font-weight: 600; color: var(--ink); }
.al-cell-txt span { font-size: 11px; }
.al-tavatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #E8F3FF; }
.al-tavatar-txt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.al-tag {
  display: inline-block;
  padding: 2px 9px;
  font-size: 12px;
  border-radius: 999px;
  background: #F1F4F9;
  color: var(--muted);
}
.al-tag.green { background: #E8F8EF; color: #12A150; }
.al-tag.blue { background: #EAF2FF; color: #165DFF; }
.al-tag.orange { background: #FFF4E6; color: #E8801A; }
.al-tag.red { background: #FFECEC; color: #E5484D; }

/* ==================== 分页 ==================== */
.al-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.al-pg-group { display: flex; gap: 6px; }
.al-pg {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .16s, color .16s, background .16s;
}
.al-pg:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.al-pg.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.al-pg:disabled { opacity: .45; cursor: not-allowed; }

/* ==================== 表单（提现） ==================== */
.al-form { max-width: 560px; }
.al-field { margin-bottom: 16px; }
.al-field > label {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.al-field .al-input { width: 100%; box-sizing: border-box; }
.al-input-group { display: flex; gap: 8px; }
.al-input-group .al-input { flex: 1 1 auto; }
.al-input-group .al-btn { white-space: nowrap; }
.al-radio-group { display: flex; gap: 18px; }
.al-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.al-radio input { accent-color: var(--primary); }
.al-fee-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ink-2);
  background: #F8FAFF;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.al-fee-preview b { font-size: 15px; color: var(--ink); }
.al-form-actions { display: flex; gap: 10px; }

/* ==================== 推广码结果 ==================== */
.al-promo-result { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.al-promo-result:empty { display: none; }
.al-promo-img {
  width: 260px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.al-promo-info { font-size: 13px; color: var(--ink-2); line-height: 2; }
.al-promo-info b { font-size: 15px; color: var(--ink); }
.al-link { color: var(--primary); }
.al-link:hover { color: #0F44D8; text-decoration: underline; }

/* 开发中占位 */
.al-soon {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 72px 24px;
  text-align: center;
}
.al-soon-icon { font-size: 40px; }
.al-soon h3 { font-size: 16px; font-weight: 700; color: var(--ink); margin-top: 14px; }
.al-soon p { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* ==================== 响应式 ==================== */
@media (max-width: 960px) {
  .al-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .al-body { flex-direction: column; padding: 16px 14px 40px; }
  .al-side { flex: none; width: 100%; }
  .al-menu {
    flex-direction: row;
    overflow-x: auto;
    position: static;
    gap: 6px;
    padding: 8px;
  }
  .al-menu a { white-space: nowrap; padding: 8px 12px; }
  .al-header-in { padding: 10px 14px; }
  .al-user-info { display: none; }
}
@media (max-width: 520px) {
  .al-cards { grid-template-columns: 1fr; }
}

/* ==================== 海报预览 ==================== */
.al-poster-preview {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 12px;
  padding: 12px;
  background: #F8FAFF;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.al-poster-preview:empty { display: none; }
.al-poster-preview img {
  width: 200px;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}
.al-poster-preview-t { font-size: 13px; color: var(--muted); line-height: 1.8; }

/* ==================== 代理申请页 ==================== */
.al-apply-box { width: 460px; max-width: 92vw; }
.al-req { color: #F04438; }
textarea.al-input {
  min-height: 76px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}
.al-form .al-field + .al-field { margin-top: 14px; }
.al-apply-box .al-form { text-align: left; }
.al-apply-box .al-form-actions { justify-content: center; margin-top: 18px; }
.al-apply-box .al-btn { text-align: center; text-decoration: none; }
