/* 算数·FA管家登录 — Deal Room 气质 · 品牌主视觉 · 单屏 */
:root {
  --ink: #0b1f33;
  --ink-2: #14324d;
  --paper: #f7f4ef;
  --panel: #fffcf8;
  --line: rgba(11, 31, 51, .1);
  --muted: #5d6b7a;
  --brass: #b08d57;
  --brass-2: #d4b483;
  --sea: #1a6b6a;
  --danger: #9b2c2c;
  --danger-bg: #fdecec;
  --font-display: "Songti SC", "SimSun", Georgia, "Noto Serif SC", "Cormorant Garamond", serif;
  --font-ui: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.fa-login {
  font-family: var(--font-ui);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
  background: #0a1624;
  display: flex;
}

.fa-login-shell {
  display: grid;
  grid-template-columns: 1.08fr minmax(360px, 0.92fr);
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

/* —— 左侧品牌主视觉 —— */
.fa-login-brand {
  position: relative;
  color: #f4efe6;
  padding: clamp(28px, 5vh, 56px) clamp(28px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(145deg, #07131f 0%, #0f2a40 42%, #12383f 100%);
  animation: faBrandIn .7s ease both;
}
.fa-login-brand__veil {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(900px 520px at 12% 18%, rgba(176, 141, 87, .28), transparent 58%),
    radial-gradient(700px 420px at 88% 78%, rgba(26, 107, 106, .32), transparent 55%),
    linear-gradient(115deg, rgba(7, 19, 31, .2), rgba(7, 19, 31, .55));
}
.fa-login-brand__grid {
  position: absolute; inset: 0; z-index: 0; opacity: .22;
  background-image:
    linear-gradient(rgba(244, 239, 230, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 239, 230, .09) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 75% 70% at 40% 40%, #000 20%, transparent 75%);
}
.fa-login-brand__glow {
  position: absolute; z-index: 0;
  width: 42vw; height: 42vw; max-width: 520px; max-height: 520px;
  right: -8%; bottom: -12%;
  border-radius: 50%;
  border: 1px solid rgba(212, 180, 131, .28);
  box-shadow: inset 0 0 0 40px rgba(212, 180, 131, .04);
  animation: faOrbit 14s linear infinite;
}
.fa-login-brand__inner { position: relative; z-index: 1; max-width: 560px; }
.fa-login-kicker {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brass-2);
}
.fa-login-brand-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.2vw, 4.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: #fff8ee;
  text-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}
.fa-login-brand-sub {
  margin: 18px 0 0;
  max-width: 22em;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(244, 239, 230, .78);
  font-weight: 500;
}
.fa-login-flow {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(244, 239, 230, .55);
}
.fa-login-flow li {
  position: relative;
  padding-right: 18px;
}
.fa-login-flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 8px; height: 1px;
  background: rgba(212, 180, 131, .55);
}
.fa-login-brand-foot {
  position: relative; z-index: 1;
  margin: 24px 0 0;
  max-width: 36em;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(244, 239, 230, .55);
}

/* —— 右侧操作面板 —— */
.fa-login-panel {
  background:
    radial-gradient(600px 280px at 100% 0%, rgba(176, 141, 87, .08), transparent 55%),
    linear-gradient(180deg, var(--panel) 0%, var(--paper) 100%);
  padding: clamp(20px, 3.5vh, 40px) clamp(22px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  animation: faPanelIn .65s .08s ease both;
}

.fa-login-lang { margin-bottom: 18px; }
.fa-lang-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  background: rgba(11, 31, 51, .04);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.fa-lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: background .15s ease, color .15s ease;
  white-space: nowrap;
}
.fa-lang-btn:hover { color: var(--ink); background: rgba(255,255,255,.7); }
.fa-lang-btn.is-active {
  background: var(--ink);
  color: #f7f4ef;
}

.fa-login-panel-head h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.8vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}
.fa-login-panel-head p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  max-width: 36em;
}

.fa-login-form {
  display: grid;
  gap: 12px;
  max-width: 420px;
}
.fa-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.fa-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fa-field input:focus {
  outline: none;
  border-color: rgba(26, 107, 106, .55);
  box-shadow: 0 0 0 3px rgba(26, 107, 106, .12);
}
.fa-field input::placeholder { color: #9aa7b5; font-weight: 500; }

.fa-password-wrap { position: relative; }
.fa-password-wrap input { padding-right: 44px; }
.fa-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; cursor: pointer;
  width: 34px; height: 34px; border-radius: 8px;
  color: var(--muted);
  display: grid; place-items: center;
}
.fa-eye:hover, .fa-eye.is-on { color: var(--sea); background: rgba(26, 107, 106, .08); }

.fa-login-btn {
  margin-top: 4px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 13px 16px;
  background: linear-gradient(135deg, #1a6b6a 0%, #0f3d4a 55%, #0b1f33 100%);
  color: #fff8ee;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .16em;
  cursor: pointer;
  transition: filter .15s ease, transform .1s ease;
}
.fa-login-btn:hover { filter: brightness(1.08); }
.fa-login-btn:active { transform: scale(.99); }

.fa-login-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #f2c7c7;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
}

.fa-roles-block {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  flex: 1;
  min-height: 0;
}
.fa-roles-head h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.fa-roles-head p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.fa-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.fa-role-card {
  text-align: left;
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  display: grid;
  gap: 4px;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.fa-role-card:hover {
  border-color: rgba(176, 141, 87, .45);
  transform: translateY(-1px);
  background: #fff;
}
.fa-role-card.is-active {
  border-color: rgba(26, 107, 106, .55);
  background: #fff;
  box-shadow: inset 3px 0 0 var(--sea);
}
.fa-role-tag {
  display: inline-block;
  width: fit-content;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 800;
  letter-spacing: .04em;
}
.tag-admin { background: rgba(26, 107, 106, .12); color: #0f4f4e; }
.tag-lead { background: rgba(11, 31, 51, .08); color: #14324d; }
.tag-fa { background: rgba(176, 141, 87, .16); color: #7a5c2e; }
.tag-finance { background: rgba(155, 44, 44, .1); color: #8a3030; }

.fa-role-name { font-size: 13px; font-weight: 800; color: var(--ink); line-height: 1.3; }
.fa-role-user {
  color: var(--sea);
  font-size: 11px;
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 700;
}

.fa-login-foot-links {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}
.fa-login-foot-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid rgba(11, 31, 51, .2);
}
.fa-login-foot-links a:hover { border-bottom-color: var(--brass); color: var(--ink); }

@keyframes faBrandIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: none; }
}
@keyframes faPanelIn {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes faOrbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 960px) {
  .fa-login-shell { grid-template-columns: 1fr; }
  .fa-login-brand {
    min-height: 34vh;
    padding-bottom: 24px;
  }
  .fa-login-brand-title { font-size: clamp(2.2rem, 9vw, 3rem); }
  .fa-login-flow { margin-top: 20px; }
  .fa-login-brand-foot { display: none; }
  .fa-login-form { max-width: none; }
}

@media (max-width: 560px) {
  .fa-role-grid { grid-template-columns: 1fr 1fr; }
  .fa-lang-switch { width: 100%; }
  .fa-lang-btn { flex: 1; text-align: center; padding: 8px 4px; font-size: 11px; }
}

@media (max-height: 720px) and (min-width: 961px) {
  .fa-login-brand-sub { display: none; }
  .fa-login-brand-foot { display: none; }
  .fa-roles-head p { display: none; }
}
