/* =============================================================
   华仁亚麻 · Dex 登录页主题（替换 dex 自带 light 主题）
   挂载：-v /opt/huaren-jindu/dex-styles.css:/srv/dex/web/themes/light/styles.css:ro
   服务路径：https://jindu.gehaoai01.cn/dex/theme/styles.css
   回滚：去掉该挂载即可恢复 dex 原版灰色主题
   ============================================================= */

:root {
  --hr-primary: #4A6FA5;
  --hr-primary-hover: #3D5D8A;
  --hr-primary-active: #2F4A70;
  --hr-border: #E5E7EB;
  --hr-text: #1F2937;
  --hr-text-muted: #6B7280;
}

/* ---------- 页面底 ---------- */
.theme-body {
  background: linear-gradient(180deg, #F6F8FB 0%, #E8EDF4 100%);
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--hr-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 顶部那条带 Grist logo 的白条：直接去掉，改由卡片自己承担品牌 */
.theme-navbar,
.theme-navbar__logo-wrap,
.theme-navbar__logo {
  display: none !important;
}

/* ---------- 居中容器 ---------- */
.dex-container {
  color: var(--hr-text);
  margin: 0 auto;
  max-width: 420px;
  min-width: 300px;
  text-align: center;
  padding: 0 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------- 白色圆角卡片 ---------- */
.theme-panel {
  background-color: #fff;
  border: 1px solid #EDEFF3;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04),
              0 12px 32px rgba(17, 24, 39, 0.08);
  padding: 40px 36px 32px;
  text-align: left;
}

/* ---------- 品牌区 ---------- */
.hr-brand {
  text-align: center;
  margin-bottom: 28px;
}

.hr-brand__mark {
  width: 52px;
  height: 52px;
  line-height: 52px;
  margin: 0 auto 16px;
  border-radius: 13px;
  background: linear-gradient(135deg, #5A80B8 0%, #4A6FA5 100%);
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 1px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(74, 111, 165, 0.28);
}

.hr-brand__title {
  font-size: 19px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px;
  letter-spacing: 0.3px;
  line-height: 1.4;
}

.hr-brand__subtitle {
  font-size: 13px;
  color: var(--hr-text-muted);
  margin: 0;
  letter-spacing: 0.5px;
}

/* dex 原来的 h2 标题不再使用，兜底藏掉 */
.theme-heading { display: none; }

/* ---------- 表单 ---------- */
.theme-form-row {
  display: block;
  margin: 0 0 18px;
}

.theme-form-label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin: 0 0 7px;
  text-align: left;
  width: 100%;
  position: relative;
}

.theme-form-input {
  border-radius: 8px;
  border: 1px solid var(--hr-border);
  box-shadow: none;
  color: var(--hr-text);
  display: block;
  font-size: 14px;
  height: 42px;
  line-height: 1.5;
  margin: 0;
  padding: 8px 13px;
  width: 100%;
  background: #FCFCFD;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  font-family: inherit;
}

.theme-form-input::placeholder {
  color: #9CA3AF;
}

.theme-form-input:focus,
.theme-form-input:active {
  border-color: var(--hr-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.13);
  outline: none;
}

/* ---------- 登录按钮 ---------- */
.dex-btn {
  border-radius: 8px;
  border: 0;
  box-shadow: none;
  cursor: pointer;
  font-size: 15px;
  padding: 0;
  font-family: inherit;
}

.theme-btn--primary {
  background-color: var(--hr-primary);
  border: none;
  color: #fff;
  width: 100%;
  min-width: 0;
  height: 42px;
  margin-top: 6px;
  font-weight: 500;
  letter-spacing: 2px;
  transition: background-color .15s ease;
}

.theme-btn--primary:hover {
  background-color: var(--hr-primary-hover);
  color: #fff;
}

.theme-btn--primary:active {
  background-color: var(--hr-primary-active);
  box-shadow: none;
}

.theme-btn--primary:disabled {
  opacity: .65;
  cursor: not-allowed;
}

/* ---------- 错误提示：原版是刺眼的大红条 ---------- */
.dex-error-box {
  background-color: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 8px;
  color: #B91C1C;
  font-size: 13px;
  font-weight: normal;
  max-width: 100%;
  padding: 9px 12px;
  margin: 0 0 16px;
  text-align: center;
}

/* ---------- 卡片底部说明 ---------- */
.hr-foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #F0F2F5;
  font-size: 12px;
  color: #9CA3AF;
  text-align: center;
  line-height: 1.6;
}

.theme-link-back { margin-top: 14px; text-align: center; }
.dex-subtle-text { color: #9CA3AF; font-size: 12px; }

/* 其它 dex 页面（error / approval / oob）沿用同一套观感 */
.theme-btn-provider {
  background-color: #fff;
  color: var(--hr-text);
  min-width: 250px;
  border: 1px solid var(--hr-border);
}
.theme-btn--success {
  background-color: var(--hr-primary);
  color: #fff;
  width: 100%;
  border-radius: 8px;
  height: 42px;
}
.theme-btn--success:hover { background-color: var(--hr-primary-hover); }
