/* ═══════════════════════════════════════════
   DEEPTRUST 官网站群 - 统一认证弹窗样式
   版本: V1.0
   日期: 2026-08-04
   引用方式: <link rel="stylesheet" href="../shared/css/auth.css">
   ═══════════════════════════════════════════ */

/* ── 遮罩 ── */
.dt-auth-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

/* ── 弹窗容器 ── */
.dt-auth-modal {
  background: #fff;
  border-radius: 12px;
  width: 400px;
  max-width: 90vw;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

/* ── 头部 ── */
.dt-auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e8ecf1;
}
.dt-auth-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a2b4a;
}
.dt-auth-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s;
}
.dt-auth-close:hover { color: #333; }

/* ── Tab 切换 ── */
.dt-auth-tabs {
  display: flex;
  gap: 0;
  padding: 0 24px;
  margin-top: 4px;
  border-bottom: 1px solid #e8ecf1;
}
.dt-auth-tab {
  flex: 1;
  padding: 12px 0;
  background: none;
  border: none;
  font-size: 15px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}
.dt-auth-tab.active {
  color: #1890ff;
}
.dt-auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: #1890ff;
  border-radius: 1px;
}

/* ── 表单体 ── */
.dt-auth-body { padding: 24px; }
.dt-auth-form { margin-top: 16px; }

/* ── 字段 ── */
.dt-auth-field { margin-bottom: 18px; }
.dt-auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
}
.dt-auth-field input[type="tel"],
.dt-auth-field input[type="password"],
.dt-auth-field input[type="text"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.dt-auth-field input:focus {
  border-color: #1890ff;
  box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.1);
}

/* ── 验证码行 ── */
.dt-auth-captcha-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.dt-auth-captcha-row input { flex: 1; }

/* ── 按钮 ── */
.dt-auth-btn-primary,
.dt-auth-btn-secondary {
  width: 100%;
  padding: 11px 0;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.dt-auth-btn-primary {
  background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
  color: #fff;
  margin-top: 8px;
}
.dt-auth-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}
.dt-auth-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.dt-auth-btn-secondary {
  background: #f0f5ff;
  color: #1890ff;
  white-space: nowrap;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: normal;
  border-radius: 6px;
  flex-shrink: 0;
}
.dt-auth-btn-secondary:hover:not(:disabled) {
  background: #d6e8ff;
}
.dt-auth-btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── 错误提示 ── */
.dt-auth-error {
  color: #ff4d4f;
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
}

/* ── 头像组件（右上角） ── */
#dt-avatar-mount,
.dt-avatar-container {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dt-login-trigger {
  padding: 7px 18px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.dt-login-trigger:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.dt-user-avatar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: default;
  position: relative;
  padding: 3px 8px 3px 3px;
  border-radius: 20px;
  transition: background 0.2s;
}
.dt-user-avatar:hover { background: rgba(255, 255, 255, 0.1); }

.dt-avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1890ff, #096dd9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.dt-avatar-name {
  color: #fff;
  font-size: 13px;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dt-logout-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
}
.dt-user-avatar:hover .dt-logout-btn { opacity: 1; }
.dt-logout-btn:hover { color: #ff4d4f; }

/* ── 响应式 ── */
@media (max-width: 480px) {
  .dt-auth-modal { width: 92vw; }
  .dt-auth-header { padding: 16px 18px 12px; }
  .dt-auth-body { padding: 18px; }
  .dt-auth-tabs { padding: 0 18px; }
}

/* ═════════════════════════════════════════
   工作台按钮 + 弹窗样式（账户/工作台）
   ═════════════════════════════════════════ */

/* ── 工作台按钮 ── */
#dt-workbench-mount,
.dt-workbench-container {
  display: inline-flex;
  align-items: center;
}

.dt-wb-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.dt-wb-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}
.dt-wb-icon { font-size: 14px; }
.dt-wb-text { font-weight: 500; }

.dt-wb-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 16px; height: 16px;
  background: #ff6b35;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ── 通用弹窗遮罩 ── */
.dt-popup-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 70px; /* 导航栏下方 */
  opacity: 0;
  transition: opacity 0.15s ease;
}
.dt-popup-overlay.active { opacity: 1; }

.dt-popup-box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  transform: translateY(-10px);
  transition: transform 0.2s ease;
}
.dt-popup-overlay.active .dt-popup-box { transform: translateY(0); }

.dt-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e8ecf1;
  font-size: 15px;
  font-weight: 600;
  color: #1a2b4a;
}

.dt-popup-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
}
.dt-popup-close:hover { color: #333; }

.dt-popup-body { padding: 16px 20px; }

.dt-popup-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid #e8ecf1;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.dt-popup-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dt-btn-primary {
  background: linear-gradient(135deg, #1890ff, #096dd9);
  color: #fff;
  width: 100%;
}
.dt-btn-primary:hover { box-shadow: 0 3px 10px rgba(24,144,255,0.3); }
.dt-btn-secondary {
  background: #f5f5f5;
  color: #666;
  flex: 1;
}
.dt-btn-danger {
  background: #fff2f0;
  color: #ff4d4f;
  flex: 1;
}
.dt-btn-danger:hover { background: #ffecec; }

/* ── 账户弹窗内容 ── */
.dt-acct-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1890ff, #096dd9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  margin: 0 auto 8px;
}
.dt-acct-name {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #1a2b4a;
  margin-bottom: 12px;
}
.dt-acct-fields { display: flex; flex-direction: column; gap: 8px; }
.dt-acct-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px dashed #f0f0f0;
}
.dt-acct-label { color: #888; flex-shrink: 0; margin-right: 12px; }
.dt-acct-row > span:last-child { color: #333; font-weight: 500; }

/* ── 工作台弹窗内容 ── */
.dt-wb-stats {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
}
.dt-wb-stat {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  background: #fafafa;
  border-radius: 8px;
  border-right: 1px solid #eee;
}
.dt-wb-stat:last-child { border-right: none; }
.dt-wb-stat-num {
  font-size: 22px;
  font-weight: 700;
  color: #1890ff;
  line-height: 1.2;
}
.dt-wb-stat-label {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

.dt-wb-tasks-title {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
}

.dt-wb-task-list { max-height: 160px; overflow-y: auto; }

.dt-wb-task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 4px;
  background: #fafbfc;
  font-size: 13px;
}
.dt-wb-task-name { color: #333; font-weight: 500; }
.dt-wb-task-status { font-size: 12px; font-weight: 500; }

.dt-wb-empty {
  text-align: center;
  color: #bbb;
  padding: 20px;
  font-size: 13px;
}
