@font-face {
  font-family: "element-icons";
  src: url("../fonts/element-icons.woff") format("woff"),
       url("../fonts/element-icons.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

:root {
  --blue: #1890ff;
  --platform-blue: #00a0e9;
  --text: #4a4848;
  --muted: #606266;
  --line: #dcdfe6;
  --font: "微软雅黑", "Microsoft YaHei", "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: #303133;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
button, input { font-family: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; }
[hidden] { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ============================ 登录页 ============================ */
.login-page {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  background: #fff;
}

.login-bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: calc(100% - 103px);
  background-image: url("../images/login-bg.png");
  background-repeat: no-repeat;
  background-position: left top;
  background-size: 100% 100%;
}

.login-center {
  position: absolute;
  inset: 0 0 103px;
  min-height: 500px;
}

.welcome-panel {
  position: absolute;
  top: 37%;
  left: 10%;
  width: 45%;
  padding: 10px;
  border-radius: 10px;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, .914), rgba(255, 255, 255, 0));
}
.welcome-panel h3 {
  margin: 15px 0 0;
  padding-left: 5px;
  border-left: 4px solid #1890ff;
  color: var(--text);
  font-size: 18.72px;
  font-weight: 700;
  line-height: 21.53px;
}
.welcome-panel ul {
  min-height: 260px;
  max-height: 260px;
  margin-top: 25px;
  overflow: auto;
  padding-left: 0;
  list-style: none;
}
.welcome-panel li {
  padding: 10px;
  color: var(--text);
  font-size: 16px;
  line-height: 24px;
  list-style: none;
}
.welcome-panel a {
  display: inline-flex;
  align-items: center;
  color: #606266;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  transition: color .18s ease;
}
.welcome-panel a:hover { color: #1890ff; }
.arrow-ico {
  width: 15px;
  height: 15px;
  margin-right: 7px;
  flex: 0 0 15px;
  color: #555;
  transform: translateY(1px);
}

.login-card {
  position: absolute;
  top: calc(37% - 68px);
  right: 15%;
  width: 450px;
  height: 586px;
  padding: 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 16px -1px #00a0e9;
}

.brand-row {
  position: relative;
  width: 100%;
  height: 60px;
  margin: 0 0 8px;
  color: var(--platform-blue);
  font-weight: 700;
  line-height: 60px;
}
.brand-logo {
  position: absolute;
  left: 0;
  top: 12px;
  width: 35px;
  height: 35px;
  object-fit: contain;
}
.brand-row h1 {
  position: absolute;
  left: 45px;
  top: 0;
  margin: 0;
  color: var(--platform-blue);
  font-size: 29.6px;
  font-weight: 700;
  line-height: 60px;
  letter-spacing: -.3px;
  white-space: nowrap;
}

.welcome-line {
  display: flex;
  align-items: center;
  height: 29px;
  margin-bottom: 7px;
  color: var(--platform-blue);
  font-size: 18px;
  line-height: 28px;
}
.welcome-bar {
  width: 4px;
  height: 27px;
  margin-right: 10px;
  border-radius: 1px;
  background: linear-gradient(180deg, #25a7e9, #008fd2);
  box-shadow: 1px 0 2px rgba(0, 160, 233, .22);
}

#loginForm { display: block; }
.form-item { position: relative; margin: 0 0 25px; }
.radio-row { padding: 6px 0; margin-bottom: 25px; }
.code-row { display: flex; align-items: center; gap: 10px; width: calc(100% - 48px); }
.links-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 24px;
  padding-right: 10px;
  margin: 0 0 22px;
}
.submit-row { margin: 0; }

.input-wrap {
  position: relative;
  width: 100%;
  height: 36px;
}
.input-wrap input {
  display: block;
  width: 100%;
  height: 36px;
  padding: 0 32px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  line-height: 36px;
  transition: border-color .2s ease;
}
.input-wrap input::placeholder { color: #b7b9bd; opacity: 1; }
.input-wrap input:focus { border-bottom-color: #409eff; }
.prefix-ico {
  position: absolute;
  left: 5px;
  top: 10px;
  z-index: 1;
  width: 16px;
  height: 16px;
  color: #c0c4cc;
  pointer-events: none;
}
.eye-btn {
  position: absolute;
  right: 5px;
  top: 9px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #c0c4cc;
  line-height: 0;
}
.eye-btn:hover { color: #909399; }
.eye-ico { width: 18px; height: 18px; }

.radio-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 30px;
  color: #606266;
  font-size: 14px;
  font-weight: 500;
  line-height: 14px;
  cursor: pointer;
  user-select: none;
}
.radio-item input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}
.radio-dot {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 7px;
  border: 1px solid #dcdfe6;
  border-radius: 50%;
  background: #fff;
  transition: all .18s ease;
}
.radio-item.is-checked .radio-dot {
  border-color: #409eff;
  background: #409eff;
}
.radio-item.is-checked .radio-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: #fff;
}
.radio-item.is-checked .radio-text { color: #606266; }

.code-input-wrap { flex: 1 1 auto; min-width: 0; }
.code-input-wrap input { padding-left: 15px; padding-right: 8px; }
.code-btn {
  flex: 0 0 112px;
  width: 112px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: #606266;
  font-size: 14px;
  font-weight: 400;
  line-height: 34px;
  text-align: center;
  transition: border-color .18s, color .18s, background .18s;
}
.code-btn:hover { border-color: #409eff; color: #409eff; }
.code-btn.counting {
  flex-basis: 112px;
  width: 112px;
  margin-left: 0;
  border-color: transparent;
  background: transparent;
  color: #606266;
  cursor: default;
}
.code-btn:disabled { cursor: default; }

.links-row a {
  color: #1890ff;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  white-space: nowrap;
}
.links-row a:hover { color: #409eff; text-decoration: underline; }
.links-row i {
  display: inline-block;
  width: 1px;
  height: 10px;
  margin: 0 7px;
  background: rgba(0, 0, 0, .44);
}

.login-button {
  display: block;
  width: 128px;
  height: 36px;
  margin: 0 auto;
  padding: 0;
  border: 1px solid #1890ff;
  border-radius: 4px;
  background: #1890ff;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 34px;
  letter-spacing: .5px;
  transition: background .18s, border-color .18s, box-shadow .18s;
}
.login-button:hover { background: #40a9ff; border-color: #40a9ff; box-shadow: 0 2px 8px rgba(24, 144, 255, .28); }
.login-button:active { background: #096dd9; border-color: #096dd9; }

.login-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 103px;
  padding-top: 11px;
  background: transparent;
  color: #000;
  text-align: center;
  line-height: 1.75;
}
.login-footer p {
  margin: 4px 0;
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
}

/* ============================ 工作台 ============================ */
.dashboard {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #fdfbf6;
  font-family: var(--font);
}
.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 64px;
  height: 64px;
  padding: 0 30px 0 34px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 92px 100%,
    linear-gradient(180deg, #2d9bc9 0%, #1689bd 52%, #0d7db2 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(255, 255, 255, .18);
}
.topbar-brand { display: flex; align-items: center; gap: 18px; min-width: 0; }
.topbar-brand img { width: 42px; height: 42px; object-fit: contain; filter: brightness(0) invert(1); opacity: .95; }
.topbar-brand span {
  font-size: 29px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .5px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
  white-space: nowrap;
}
.topbar-right { display: flex; align-items: center; gap: 18px; }
.top-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  opacity: .92;
}
.top-icon svg { width: 23px; height: 23px; }
.top-icon:hover { opacity: 1; }
.top-divider { width: 1px; height: 24px; margin: 0 2px; background: rgba(255, 255, 255, .28); }
.user-center {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0 4px 4px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 14px;
}
.user-avatar { width: 22px; height: 22px; opacity: .95; }
.user-center .chev { width: 14px; height: 14px; margin-left: 1px; }
.dashboard-body { display: flex; flex: 1 1 auto; min-height: 0; }
.sidebar {
  flex: 0 0 220px;
  width: 220px;
  padding-top: 20px;
  border-right: 1px solid #e8e6e1;
  background: rgba(255, 253, 248, .84);
}
.sidebar nav { display: flex; flex-direction: column; }
.menu-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 44px;
  padding: 0 22px;
  color: #646464;
  font-size: 14px;
  font-weight: 400;
  transition: background .18s, color .18s;
}
.menu-item svg { width: 15px; height: 15px; flex: 0 0 15px; color: #9b9b9b; }
.menu-item:hover { color: #1890ff; background: rgba(24, 144, 255, .04); }
.menu-item.active { color: #5d5d5d; background: rgba(0, 160, 233, .075); font-weight: 600; }
.menu-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: #18a0e8;
}
.menu-item.active svg { color: #18a0e8; }
.dashboard-main {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  background: #fdfbf6;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 14px 0 0 22px;
  color: #666;
  font-size: 13px;
}
.breadcrumb svg { width: 15px; height: 15px; color: #8e8e8e; }
.content-watermark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  transform: translate(-50%, -54%);
  opacity: .045;
  pointer-events: none;
  user-select: none;
}
.content-watermark img { width: 210px; height: 210px; filter: grayscale(1); }
.content-watermark p { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: 8px; white-space: nowrap; }
.support-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #8e5bc4;
  color: #fff;
  box-shadow: 0 3px 10px rgba(80, 45, 120, .3);
}
.support-fab svg { width: 22px; height: 22px; }

/* ============================ Loading ============================ */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #fff;
}
.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e4e4e4;
  border-top-color: #409eff;
  border-radius: 50%;
  animation: spin .85s linear infinite;
}
.loading-text { color: #777; font-size: 13px; letter-spacing: .5px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================ 贺信 ============================ */
.letter-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
  animation: letterOverlayIn .12s linear both;
}
.letter-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1600px;
}
.letter-rotor {
  transform-origin: 50% 50%;
  animation: letterSpinIn 820ms cubic-bezier(.18, .68, .2, 1) both;
  will-change: transform, opacity, filter;
}
.letter-image {
  display: block;
  width: auto;
  height: min(88vh, 840px);
  max-width: 72vw;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 12px 34px rgba(70, 0, 0, .16);
  backface-visibility: hidden;
  transform: translateZ(0);
}
.letter-close {
  position: absolute;
  top: -4px;
  right: -62px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #858585;
  color: #fff;
  animation: letterCloseIn .18s .18s linear both;
  transition: background .18s, transform .18s;
}
.letter-close:hover { background: #6b6b6b; transform: scale(1.04); }
.letter-close svg { width: 24px; height: 24px; }

@keyframes letterOverlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes letterCloseIn { from { opacity: 0; } to { opacity: 1; } }

/* 卡片从极小尺寸旋转一整圈甩入，再轻微回弹，复刻视频里的贺信弹出 */
@keyframes letterSpinIn {
  0% {
    opacity: 0;
    transform: rotate(-58deg) scale(.025);
    filter: blur(6px);
  }
  14% {
    opacity: .55;
    transform: rotate(-66deg) scale(.18);
    filter: blur(3px);
  }
  32% {
    opacity: 1;
    transform: rotate(24deg) scale(.42);
    filter: blur(1.5px);
  }
  48% {
    transform: rotate(172deg) scale(.65);
    filter: blur(.6px);
  }
  66% {
    transform: rotate(278deg) scale(.91);
    filter: blur(0);
  }
  82% {
    transform: rotate(366deg) scale(1.055);
  }
  91% {
    transform: rotate(357deg) scale(.99);
  }
  100% {
    opacity: 1;
    transform: rotate(360deg) scale(1);
    filter: blur(0);
  }
}

.letter-overlay.is-closing .letter-rotor {
  animation: letterSpinOut .28s cubic-bezier(.55, 0, .85, .4) both;
}
.letter-overlay.is-closing .letter-close {
  opacity: 0;
  transition: opacity .12s linear;
}
.letter-overlay.is-closing {
  animation: letterOverlayOut .18s .12s linear both;
}
@keyframes letterSpinOut {
  from { opacity: 1; transform: rotate(360deg) scale(1); }
  to { opacity: 0; transform: rotate(402deg) scale(.62); }
}
@keyframes letterOverlayOut { to { opacity: 0; } }

/* ============================ Toast ============================ */
.toast-host {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 380px;
  height: 56px;
  padding: 0 18px;
  border: 1px solid #e1f3d8;
  border-radius: 4px;
  background: #f0f9eb;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .1);
  color: #67c23a;
  font-size: 14px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .22s ease, transform .22s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: #fde2e2; background: #fef0f0; color: #f56c6c; }
.toast svg { width: 18px; height: 18px; flex: 0 0 18px; }

@media (max-width: 1500px) {
  .login-card { right: 11%; }
  .welcome-panel { left: 6%; width: 52%; }
  .brand-row h1 { font-size: 26px; }
}
@media (max-width: 1180px) {
  .login-card { right: 6%; transform: scale(.94); transform-origin: right top; }
  .welcome-panel { left: 4%; width: 49%; transform: scale(.94); transform-origin: left top; }
  .topbar-brand span { font-size: 23px; }
}
@media (max-height: 930px) and (min-width: 901px) {
  .login-card { transform: scale(.88); transform-origin: right top; }
  .welcome-panel { transform: scale(.94); transform-origin: left top; }
}
@media (max-height: 820px) and (min-width: 901px) {
  .login-card { transform: scale(.78); }
  .welcome-panel { transform: scale(.88); }
}
@media (max-width: 900px) {
  .login-page { min-height: 720px; }
  .login-bg { height: 100%; background-size: cover; background-position: center; }
  .login-center { inset: 0; display: flex; align-items: center; justify-content: center; }
  .welcome-panel { display: none; }
  .login-card { position: relative; top: auto; right: auto; transform: none; width: min(450px, calc(100vw - 32px)); height: auto; min-height: 586px; }
  .login-footer { position: relative; bottom: auto; height: auto; padding: 18px 12px 24px; }
  .login-footer p { white-space: normal; font-size: 12px; }
  .sidebar { flex-basis: 72px; width: 72px; }
  .menu-item { justify-content: center; padding: 0; }
  .menu-item span { display: none; }
  .topbar { padding: 0 14px; }
  .topbar-brand { gap: 8px; }
  .topbar-brand span { font-size: 17px; }
  .topbar-brand img { width: 32px; height: 32px; }
  .top-icon { display: none; }
  .letter-image { width: min(430px, 78vw); height: auto; max-width: 78vw; }
  .letter-close { top: -52px; right: 0; }
}
