/* 登录 / 安装共用门面 —— 墨色品牌面 + 纸色表单 */
:root {
  --ink: #121614;
  --ink-soft: #1c221f;
  --paper: #ecefec;
  --panel: #f7f8f6;
  --line: #cfd6d1;
  --muted: #5f6b64;
  --text: #151b18;
  --accent: #0c6b4d;
  --accent-hover: #09553d;
  --danger: #b42318;
  --ok: #0a5840;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "Cascadia Code", Consolas, "SF Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.gate {
  font-family: var(--font);
  color: var(--text);
  background: var(--ink);
  min-height: 100vh;
}

.gate-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(240px, 0.92fr) minmax(320px, 1.08fr);
}

.gate-brand {
  position: relative;
  background:
    linear-gradient(160deg, rgba(12, 107, 77, 0.18) 0%, transparent 42%),
    linear-gradient(25deg, transparent 55%, rgba(255, 255, 255, 0.03) 55%),
    var(--ink);
  color: #e8ece9;
  padding: 48px 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.gate-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  pointer-events: none;
}
.gate-brand > * { position: relative; z-index: 1; }

.gate-kicker {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(232, 236, 233, 0.55);
}
.gate-logo {
  margin: 28px 0 0;
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 650;
  letter-spacing: 0.28em;
  line-height: 1.1;
}
.gate-tag {
  margin-top: 14px;
  max-width: 16em;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(232, 236, 233, 0.72);
}
.gate-foot {
  font-size: 12px;
  color: rgba(232, 236, 233, 0.4);
  letter-spacing: 0.04em;
}

.gate-main {
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(12, 107, 77, 0.07), transparent 55%),
    var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
}

.gate-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 32px 32px 28px;
}

.gate-card h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: 0.06em;
}
.gate-card .lead {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.gate-tip {
  margin: 18px 0 0;
  padding: 10px 12px;
  background: #e4ebe6;
  border-left: 3px solid var(--accent);
  font-size: 12px;
  line-height: 1.55;
  color: #345246;
}
.gate-tip code {
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.65);
  padding: 1px 5px;
}

.gate-err {
  margin: 16px 0 0;
  padding: 10px 12px;
  background: #fff5f5;
  border: 1px solid #efc4c4;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.55;
}
.gate-ok {
  margin: 16px 0 0;
  padding: 14px 14px;
  background: #e7f4ee;
  border: 1px solid #b5dcc8;
  color: var(--ok);
  font-size: 13px;
  line-height: 1.65;
}
.gate-ok a { color: var(--accent); font-weight: 600; }

.gate-form {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 14px;
}

.gate-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.gate-field.full { grid-column: 1 / -1; }
.gate-field > span {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.gate-field > small {
  font-size: 11px;
  color: #85918a;
  line-height: 1.4;
}

/* 与后台统一：底边强调的控件，避免原生细框 */
.gate-field input,
.gate-card input,
.gate-field select,
.gate-field textarea {
  display: block;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-bottom: 2px solid var(--line);
  background: #eef1ef;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
}
.gate-field input:hover,
.gate-card input:hover {
  background: #e8ece9;
}
.gate-field input:focus,
.gate-card input:focus {
  outline: none;
  background: #fff;
  border-bottom-color: var(--accent);
  box-shadow: 0 3px 0 rgba(12, 107, 77, 0.12);
}
.gate-field input::placeholder {
  color: #8f9a94;
  opacity: 1;
}

.gate-sec {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding-top: 12px;
  border-top: 1px solid #dde3df;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.gate-btn {
  grid-column: 1 / -1;
  margin-top: 4px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.gate-btn:hover { background: var(--accent); }

.gate-note {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.gate-note code {
  font-family: var(--mono);
  font-size: 11px;
  background: #e4e9e5;
  padding: 1px 5px;
}

@media (max-width: 820px) {
  .gate-shell { grid-template-columns: 1fr; min-height: 100vh; }
  .gate-brand {
    min-height: auto;
    padding: 22px 18px 18px;
  }
  .gate-logo { font-size: 32px; margin-top: 12px; letter-spacing: 0.18em; }
  .gate-tag { font-size: 13px; max-width: none; }
  .gate-foot { display: none; }
  .gate-main {
    padding: 18px 14px 32px;
    align-items: stretch;
    flex: 1;
  }
  .gate-card {
    padding: 22px 16px 20px;
    max-width: none;
  }
  .gate-form { grid-template-columns: 1fr; }
  .gate-field.full { grid-column: auto; }
  .gate-sec, .gate-btn { grid-column: auto; }
  .gate-btn { min-height: 48px; }
}
