/* 海木云 — 登录页 + 顶栏用户区（深色仅限登录/顶栏，勿污染全局 :root） */
body.hm-agent-login,
.hm-agent-navbar {
  --hm-primary: #40a0a0;
  --hm-primary-dark: #004060;
  --hm-accent: #E0A020;
  --hm-surface: #22262b;
  --hm-muted: #64748b;
  --hm-border: #2d3239;
  --hm-bg: #1a1d21;
  --hm-text: #e2e8f0;
  --hm-text-dim: #94a3b8;
}

/* ---------- 登录页 — 居中布局 ---------- */
body.hm-agent-login {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: #050b14;
  background-image: url('../img/hm-login-bg.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--hm-text);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* 轻遮罩：保证表单可读，同时露出背景 */
body.hm-agent-login::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(5, 11, 20, 0.42);
  z-index: 0;
  pointer-events: none;
}

body.hm-agent-login::after {
  content: none;
}

/* ---------- 登录卡片 ---------- */
.hm-login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 0;
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 卡片头部 — logo + 标题 */
.hm-login-header {
  background: rgba(0, 64, 96, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(64, 160, 160, 0.2);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  padding: 36px 32px 28px;
  text-align: center;
}

.hm-login-logo {
  height: 56px;
  width: auto;
  max-width: 220px;
  margin: 0 auto 16px;
  display: block;
  object-fit: contain;
}

.hm-login-header h1 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
  letter-spacing: 0.02em;
  line-height: 1.45;
}

.hm-login-header .hm-login-features {
  font-size: 12px;
  color: rgba(125, 211, 220, 0.9);
  margin: 0;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.hm-login-header p {
  font-size: 13px;
  color: rgba(226, 232, 240, 0.6);
  margin: 0;
}

/* 卡片主体 — 表单 */
.hm-login-body {
  background: rgba(26, 29, 33, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(64, 160, 160, 0.15);
  border-top: none;
  border-radius: 0 0 16px 16px;
  padding: 32px 32px 28px;
}

/* ---------- 表单字段 ---------- */
.hm-login-field {
  margin-bottom: 20px;
}

.hm-login-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--hm-text-dim);
  margin-bottom: 8px;
}

.hm-login-input-wrap {
  position: relative;
}

.hm-login-input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #475569;
  font-size: 15px;
  transition: color 0.2s;
}

.hm-login-input-wrap input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 42px;
  border: 1px solid var(--hm-border);
  border-radius: 10px;
  font-size: 14px;
  background: var(--hm-surface);
  color: var(--hm-text);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.hm-login-input-wrap input::placeholder {
  color: #475569;
}

.hm-login-input-wrap input:focus {
  outline: none;
  border-color: var(--hm-primary);
  box-shadow: 0 0 0 3px rgba(64, 160, 160, 0.15);
}

.hm-login-input-wrap input:focus ~ i {
  color: var(--hm-primary);
}

/* 登录按钮 */
.hm-login-submit {
  width: 100%;
  height: 48px;
  margin-top: 8px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #004060 0%, #40a0a0 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  letter-spacing: 0.5px;
}

.hm-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(64, 160, 160, 0.3);
}

.hm-login-submit:active {
  transform: translateY(0);
  opacity: 0.9;
}

.hm-login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: #475569;
}

/* 底部装饰线 */
.hm-login-decor {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #004060, #40a0a0, #E0A020, #004060);
  opacity: 0.5;
  z-index: 1;
}

/* ---------- 平台入口区 ---------- */
.hm-platforms {
  background: rgba(26, 29, 33, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(64, 160, 160, 0.15);
  border-right: 1px solid rgba(64, 160, 160, 0.15);
  padding: 18px 24px 14px;
}

.hm-platforms-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--hm-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  text-align: center;
}

.hm-platform-group {
  margin-bottom: 10px;
}

.hm-platform-group:last-child {
  margin-bottom: 0;
}

.hm-platform-group-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--hm-text-dim);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hm-platform-group-label img {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
}

.hm-platform-items {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.hm-platform-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(34, 38, 43, 0.8);
  border: 1px solid var(--hm-border);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}

.hm-platform-item:hover {
  border-color: rgba(64, 160, 160, 0.4);
  background: rgba(0, 64, 96, 0.3);
  color: var(--hm-text);
  transform: translateY(-1px);
}

.hm-platform-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hm-platform-item.hm-ai-item {
  background: linear-gradient(135deg, rgba(0, 64, 96, 0.4) 0%, rgba(64, 160, 160, 0.2) 100%);
  border-color: rgba(64, 160, 160, 0.3);
  color: var(--hm-primary);
  font-weight: 600;
  padding: 7px 14px;
}

.hm-platform-item.hm-ai-item:hover {
  background: linear-gradient(135deg, rgba(0, 64, 96, 0.6) 0%, rgba(64, 160, 160, 0.35) 100%);
  border-color: rgba(64, 160, 160, 0.5);
  color: #5bc4c4;
  box-shadow: 0 4px 16px rgba(64, 160, 160, 0.2);
}

.hm-ai-row {
  display: flex;
  justify-content: center;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(64, 160, 160, 0.1);
}

/* 分隔线 */
.hm-login-divider {
  background: rgba(26, 29, 33, 0.92);
  border-left: 1px solid rgba(64, 160, 160, 0.15);
  border-right: 1px solid rgba(64, 160, 160, 0.15);
  padding: 0 32px;
}

.hm-login-divider-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hm-login-divider-inner::before,
.hm-login-divider-inner::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hm-border);
}

.hm-login-divider-inner span {
  font-size: 10px;
  color: #475569;
  white-space: nowrap;
}

/* ---------- 响应式 ---------- */
@media (max-width: 480px) {
  .hm-login-card {
    max-width: 100%;
    margin: 16px;
  }

  .hm-login-header {
    padding: 28px 20px 22px;
  }

  .hm-login-body {
    padding: 24px 20px 20px;
  }

  .hm-login-header h1 {
    font-size: 18px;
  }
}

/* ---------- 顶栏用户区 ---------- */
.hm-agent-navbar {
  background: var(--hm-surface);
  border: 1px solid var(--hm-border);
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.hm-agent-navbar .navbar-brand {
  font-weight: 700;
  color: var(--hm-primary) !important;
  padding-top: 8px;
  padding-bottom: 8px;
}

.hm-agent-navbar .hm-nav-logo-img {
  display: block;
  height: 32px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.hm-agent-navbar .nav > li > a {
  color: var(--hm-text-dim);
  font-size: 14px;
}

.hm-agent-navbar .nav > li > a:hover,
.hm-agent-navbar .nav > li > a:focus {
  color: var(--hm-primary);
  background: rgba(64, 160, 160, 0.08);
}

.hm-agent-user > a {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 10px 14px !important;
}

.hm-agent-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--hm-border);
}

.hm-agent-user-meta {
  line-height: 1.2;
  text-align: left;
}

.hm-agent-user-meta .name {
  font-weight: 600;
  font-size: 13px;
  color: var(--hm-text);
}

.hm-agent-user-meta .role {
  font-size: 11px;
  color: var(--hm-muted);
}

.hm-agent-user-menu {
  min-width: 220px;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
  background: var(--hm-surface);
  border: 1px solid var(--hm-border);
}

.hm-agent-user-menu .dropdown-header {
  padding: 14px 16px;
  background: rgba(64, 160, 160, 0.06);
  white-space: normal;
}

.hm-agent-user-menu .dropdown-header strong {
  display: block;
  font-size: 14px;
  color: var(--hm-text);
}

.hm-agent-user-menu .dropdown-header small {
  display: block;
  color: var(--hm-muted);
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.4;
}

.hm-agent-user-menu > li > a {
  padding: 10px 16px;
  color: var(--hm-text-dim);
}

.hm-agent-user-menu > li > a:hover {
  background: rgba(64, 160, 160, 0.08);
  color: var(--hm-primary);
}

.hm-agent-user-menu > li > a.text-danger {
  color: #f87171 !important;
}

.hm-agent-user-menu > li > a.text-danger:hover {
  background: rgba(220, 38, 38, 0.1);
}

/* ---------- 个人中心 ---------- */
.hm-profile-page .profile-card {
  background: var(--hm-surface);
  border: 1px solid var(--hm-border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  margin-bottom: 20px;
}

.hm-profile-page .profile-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--hm-border);
  font-weight: 600;
  font-size: 15px;
  background: rgba(64, 160, 160, 0.04);
  border-radius: 12px 12px 0 0;
  color: var(--hm-text);
}

.hm-profile-page .profile-card-body {
  padding: 20px;
}

.hm-profile-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--hm-border);
}

.hm-profile-hero img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--hm-border);
}

.hm-profile-hero h3 {
  margin: 0 0 4px;
  font-size: 20px;
  color: var(--hm-text);
}

.hm-profile-tags .label {
  margin-right: 6px;
  font-weight: 500;
}

.hm-profile-info dt {
  color: var(--hm-muted);
  font-weight: 500;
  font-size: 12px;
}

.hm-profile-info dd {
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--hm-text);
}
