/* ============================================================
   迈境科技 · 内部业务门户  —  简洁风格样式表
   ============================================================ */

:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #1c2530;
  --muted: #64707f;
  --faint: #97a1af;
  --line: #e7ebf2;
  --brand: #3b5bdb;
  --brand-deep: #2e47b5;

  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-sm: 0 1px 2px rgba(20, 32, 58, 0.05);
  --shadow-md: 0 10px 28px -12px rgba(28, 46, 96, 0.16);
  --shadow-hover: 0 18px 40px -16px rgba(28, 46, 96, 0.24);

  --tint-indigo-bg: #eaeeff;
  --tint-indigo-fg: #3b5bdb;
  --tint-violet-bg: #f1ecff;
  --tint-violet-fg: #7c3aed;
  --tint-cyan-bg: #e3f6fb;
  --tint-cyan-fg: #0e7f9c;
  --tint-emerald-bg: #e2f6ec;
  --tint-emerald-fg: #0b8a5a;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(1100px 420px at 50% -120px, rgba(59, 91, 219, 0.07), transparent 70%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

::selection { background: rgba(59, 91, 219, 0.16); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: block;
  width: 34px;
  height: 34px;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-text small {
  font-size: 10px;
  letter-spacing: 2.5px;
  color: var(--faint);
}

.internal-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.internal-tag .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22a06b;
  box-shadow: 0 0 0 3px rgba(34, 160, 107, 0.15);
}

/* ---------------- 主区域 ---------------- */
.site-main { flex: 1 0 auto; padding: 72px 0 48px; }

.hero { text-align: center; margin-bottom: 52px; }

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--brand);
  background: rgba(59, 91, 219, 0.08);
  border: 1px solid rgba(59, 91, 219, 0.18);
  padding: 5px 16px;
  border-radius: 999px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 4.6vw, 44px);
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.25;
}

.hero-sub {
  margin: 14px auto 0;
  max-width: 560px;
  font-size: 15.5px;
  color: var(--muted);
}

/* ---------------- 入口卡片 ---------------- */
.entries {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.entry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 24px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.entry-card:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 91, 219, 0.35);
  box-shadow: var(--shadow-hover);
}

.entry-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  margin-bottom: 4px;
}

.entry-icon svg { width: 26px; height: 26px; }

.tint-indigo  { background: var(--tint-indigo-bg);  color: var(--tint-indigo-fg); }
.tint-violet  { background: var(--tint-violet-bg);  color: var(--tint-violet-fg); }
.tint-cyan    { background: var(--tint-cyan-bg);    color: var(--tint-cyan-fg); }
.tint-emerald { background: var(--tint-emerald-bg); color: var(--tint-emerald-fg); }

.entry-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.3;
}

.entry-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  flex: 1 0 auto;
}

.entry-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.badge {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 2px 10px;
  border-radius: 999px;
  letter-spacing: 1px;
}

.entry-arrow {
  width: 16px;
  height: 16px;
  color: var(--faint);
  transition: color 0.2s ease, transform 0.2s ease;
}

.entry-card:hover .entry-arrow {
  color: var(--brand);
  transform: translate(2px, -2px);
}

.help-tip {
  margin: 34px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--faint);
}

/* ---------------- 页脚 ---------------- */
.site-footer {
  flex: none;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 26px 0 30px;
  text-align: center;
}

.footer-copy,
.footer-beian,
.footer-note {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.footer-copy { color: var(--text); font-weight: 500; }

.footer-beian a {
  display: inline-block;
  color: var(--muted);
  transition: color 0.15s ease;
}

.footer-beian a:hover { color: var(--brand); }

.footer-note { font-size: 12.5px; color: var(--faint); }

/* ---------------- 轻提示 Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  z-index: 50;
  max-width: min(92vw, 420px);
  padding: 11px 20px;
  background: rgba(24, 32, 46, 0.94);
  color: #fff;
  font-size: 14px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
  .entries { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .site-main { padding-top: 44px; }
  .entries { grid-template-columns: 1fr; }
  .internal-tag { display: none; }
  .hero-sub { font-size: 14.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .entry-card { transition: none; }
}

/* ============================================================
   登录视图 / 会话状态样式
   ============================================================ */
.hidden { display: none !important; }

.auth-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 34px 32px 28px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.auth-brand img {
  width: 46px;
  height: 46px;
  flex: none;
}

.auth-brand-text h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
}

.auth-brand-text p {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.auth-card label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 14px 0 6px;
}

.auth-card input[type="text"],
.auth-card input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-card input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.12);
}

.auth-tip {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--faint);
  line-height: 1.7;
}

.auth-error {
  margin-top: 12px;
  padding: 9px 12px;
  font-size: 13px;
  color: #b3261e;
  background: #fdecea;
  border: 1px solid #f5c6c2;
  border-radius: 8px;
  line-height: 1.6;
}

.btn-primary {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 6px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover { opacity: 0.92; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.auth-foot {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--faint);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.user-chip-name {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-link {
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
}

.btn-link:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .auth-card { padding: 26px 20px 22px; }
  .user-chip-name { max-width: 130px; }
}
