/* ==========================================================================
 * 共享工单系统 · 平台运营后台 特有样式
 * 公共能力全部来自 assets/base.css，本文件只补平台端独有的部分：
 *   1. 登录页左右分栏
 *   2. 顶栏 / 侧栏的少量补充（通知面板、移动端抽屉遮罩）
 *   3. 零星平台端专用小件（图标块、勾选组内条目禁用态、密钥掩码提示）
 * 说明：不引外部 CDN，图标全部内联 SVG 或 emoji。
 * ========================================================================== */

/* ============================ 登录页 ============================ */

.login-wrap {
  display: flex;
  min-height: 100vh;
}

/* 左：品牌区（深色渐变） */
.login-brand {
  flex: 1 1 52%;
  min-width: 0;
  background: linear-gradient(150deg, #1b2440 0%, #232c52 45%, #2b3a7a 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}
.login-brand::after {
  content: '';
  position: absolute;
  right: -120px; top: -120px;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43,108,246,.45), transparent 70%);
}
.login-brand::before {
  content: '';
  position: absolute;
  left: -80px; bottom: -160px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,240,.32), transparent 70%);
}

.lb-inner { position: relative; z-index: 1; max-width: 460px; }

.lb-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; }
.lb-logo-mark {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2b6cf6, #6a4bf5);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
}
.lb-logo-text { font-size: 17px; font-weight: 600; letter-spacing: 1px; }

.lb-slogan {
  font-size: 30px;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: .5px;
  margin-bottom: 14px;
}
.lb-desc {
  font-size: 14px;
  line-height: 1.9;
  color: rgba(255, 255, 255, .72);
  margin-bottom: 38px;
}

.lb-feats { list-style: none; }
.lb-feats li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.lb-feats li .ico {
  width: 20px; height: 20px; flex: 0 0 20px;
  margin-top: 2px;
  color: #8fb4ff;
}
.lb-feats b { display: block; font-size: 14px; font-weight: 600; }
.lb-feats span { font-size: 12.5px; color: rgba(255, 255, 255, .62); }

.lb-ver {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: 12px;
  color: rgba(255, 255, 255, .42);
  letter-spacing: .5px;
}

/* 右：表单区 */
.login-form {
  flex: 0 0 480px;
  width: 480px;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lf-inner { width: 100%; max-width: 340px; }
.lf-title { font-size: 22px; font-weight: 650; }
.lf-sub { font-size: 13px; color: var(--text-3); margin: 6px 0 24px; }
.lf-tip { font-size: 11.5px; color: var(--text-4); margin-top: 18px; text-align: center; }

/* 错误提示区：必须带 hidden */
.login-msg {
  background: var(--danger-bg);
  border: 1px solid #f7c8c4;
  color: #a8352c;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  word-break: break-all;
}
.login-msg.ok {
  background: var(--success-bg);
  border-color: #b9e6cd;
  color: #0d7a41;
}

/* ============================ 顶栏补充 ============================ */

.tb-user-wrap { position: relative; display: flex; align-items: center; }

/* 通知面板 */
.notice-pop { width: 288px; padding: 0; }
.notice-pop-hd {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-2);
  font-size: 13px;
  font-weight: 600;
}
.notice-pop .notice-list { max-height: 300px; overflow-y: auto; padding: 6px; }
.notice-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
}
.notice-row:hover { background: var(--bg-2); }
.notice-row .nr-num { font-weight: 650; }
.notice-row .nr-num.hot { color: var(--danger); }

.menu-toggle { display: none; }

/* 移动端侧栏抽屉遮罩 */
.mask-shade {
  position: fixed; inset: 0;
  background: rgba(23, 26, 31, .4);
  z-index: 850;
}

/* ============================ 零星平台端小件 ============================ */

/* 应用图标块（应用中心 / 套餐弹窗里显示） */
.app-ico {
  width: 30px; height: 30px;
  flex: 0 0 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
  vertical-align: middle;
}
.app-ico.sm { width: 22px; height: 22px; flex: 0 0 22px; font-size: 12px; border-radius: 6px; }

/* 勾选项禁用（不在套餐内） */
.check-item.dis {
  opacity: .5;
  cursor: not-allowed;
  border-style: dashed;
}
.check-item.dis::after {
  content: '不在当前套餐内';
  font-size: 11px;
  color: var(--text-3);
}

/* 掩码密钥提示 */
.mask-note {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 3px;
}

/* 一次性凭据展示（初始密码 / 授权码 / 新密码） */
.cred-box {
  background: var(--brand-soft);
  border: 1px dashed var(--brand);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-align: center;
}
.cred-box .cred-label { font-size: 12.5px; color: var(--text-2); }
.cred-box .cred-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--brand-dark);
  margin: 8px 0 4px;
  word-break: break-all;
  font-family: Consolas, Monaco, monospace;
}

/* 授权商家的行 */
.grant-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.grant-row.on { border-color: var(--brand); background: var(--brand-soft); }
.grant-row.off-limit { opacity: .72; background: var(--bg-2); }
.grant-row .gr-main { flex: 1; min-width: 0; }
.grant-row .gr-name { font-size: 13.5px; font-weight: 500; }
.grant-row .gr-sub { font-size: 12px; color: var(--text-3); }

/* 待办中心条目 */
.todo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.todo-row:hover { border-color: var(--brand); background: var(--brand-soft); }
.todo-row .td-l { font-size: 13.5px; }
.todo-row .td-n { font-size: 20px; font-weight: 700; }
.todo-row .td-n.hot { color: var(--danger); }
.todo-row .td-n.warn { color: var(--warning); }
.todo-row .td-go { font-size: 12.5px; color: var(--brand); }

/* 趋势图的月份切换按钮组 */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.seg button {
  border: 0;
  background: var(--card);
  padding: 4px 12px;
  font-size: 12.5px;
  cursor: pointer;
  border-right: 1px solid var(--line);
  color: var(--text-2);
}
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--brand); color: #fff; }

/* 更新日志内容区（长文本） */
.log-content {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12.5px;
  color: var(--text-2);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  max-height: 220px;
  overflow-y: auto;
}

/* 系统信息体检的表 */
.kv-table td { padding: 6px 10px; font-size: 12.5px; border-bottom: 1px solid var(--line-2); }
.kv-table td:first-child { color: var(--text-3); width: 180px; }

/* ============================ 响应式 ============================ */

@media (max-width: 860px) {
  .login-wrap { flex-direction: column; }
  .login-brand { flex: none; padding: 28px 24px; }
  .lb-slogan { font-size: 22px; margin-bottom: 10px; }
  .lb-desc, .lb-feats { display: none; }
  .lb-logo { margin-bottom: 16px; }
  .lb-ver { margin-top: 14px; padding-top: 10px; }
  .login-form { flex: 1; width: 100%; padding: 28px 24px; }

  .menu-toggle { display: flex; }
  .tb-crumb { display: none; }
}

@media (max-width: 1100px) and (min-width: 861px) {
  .login-brand { padding: 28px; }
  .lb-slogan { font-size: 24px; }
}

/* ============================================================
 * 遮罩层兜底（必须保留）
 * ★ hidden 属性来自浏览器 UA 样式表，display:none 权重极低，
 *   会被 .modal-mask{display:flex} 直接盖掉 →
 *   「隐藏状态」的遮罩照样显示 → 登录页一打开就压着空弹窗，
 *   登录按钮点不到，整个系统无法登录。
 *   本文件自身定义遮罩类，必须自配 [hidden] 兜底。
 * ============================================================ */
[hidden] { display: none !important; }
