/* ===========================================================
   软考智能学习平台 · 登录页样式（独立，不依赖 admin.css）
   视觉参考：校园插画 + 白色圆角卡片 + 蓝色渐变主按钮
   =========================================================== */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --rk-blue: #1466f0;
  --rk-blue-light: #3a8dff;
  --rk-ink: #101b2d;
  --rk-muted: #7c8ba1;
  --rk-field: #eef4fd;
  --rk-icon: #93a9c8;
}

html, body { height: 100%; margin: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--rk-ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.rk-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- 顶部校园插画 ---------- */
.rk-hero {
  position: relative;
  flex: 0 0 auto;
  height: 38vh;
  min-height: 210px;
  overflow: hidden;
  background: #7cb6ee;
}

.rk-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  display: block;
}

.rk-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 42, 92, .22) 0%, rgba(6, 42, 92, 0) 44%, rgba(255, 255, 255, .05) 100%),
    linear-gradient(90deg, rgba(6, 42, 92, .20) 0%, rgba(6, 42, 92, 0) 55%);
}

.rk-hero-text {
  position: absolute;
  z-index: 2;
  left: 22px;
  top: 26px;
  color: #fff;
  max-width: 78%;
}

.rk-hero-text h2 {
  margin: 0;
  font-size: 29px;
  line-height: 1.42;
  font-weight: 700;
  letter-spacing: .6px;
  text-shadow: 0 2px 16px rgba(4, 30, 68, .35);
}

.rk-hero-text p {
  margin: 10px 0 0;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .8px;
  color: rgba(255, 255, 255, .88);
  text-shadow: 0 1px 8px rgba(4, 30, 68, .3);
}

/* ---------- 白色卡片面板 ---------- */
.rk-panel {
  position: relative;
  z-index: 3;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: -30px;
  padding: 28px 22px calc(16px + env(safe-area-inset-bottom));
  background: #fff;
  border-radius: 30px 30px 0 0;
}

.rk-card {
  width: 100%;
  max-width: 400px;
}

/* 品牌行 */
.rk-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2px 0 26px;
}

.rk-logo {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(140deg, #3d90ff 0%, #0d55e8 100%);
  box-shadow: 0 10px 20px -9px rgba(19, 101, 240, .7);
}

.rk-logo svg {
  width: 27px;
  height: 27px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rk-brand h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .4px;
}

.rk-brand p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--rk-muted);
  letter-spacing: .3px;
}

/* 输入框 */
.rk-field {
  position: relative;
  margin-bottom: 14px;
}

.rk-field .ico {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  stroke: var(--rk-icon);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: stroke .18s;
}

.rk-field input {
  width: 100%;
  height: 54px;
  padding: 0 50px 0 46px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: var(--rk-field);
  font-family: inherit;
  font-size: 16px;
  color: var(--rk-ink);
  outline: none;
  transition: background .18s, border-color .18s, box-shadow .18s;
  -webkit-appearance: none;
}

.rk-field input::placeholder {
  color: #98a8be;
  font-size: 15px;
}

.rk-field input:focus {
  background: #fff;
  border-color: #79b0ff;
  box-shadow: 0 0 0 4px rgba(47, 134, 255, .12);
}

.rk-field input:focus ~ .ico {
  stroke: var(--rk-blue);
}

.rk-field .eye {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.rk-field .eye svg {
  width: 21px;
  height: 21px;
  stroke: var(--rk-icon);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rk-field .eye:active { background: rgba(20, 102, 240, .06); }

/* 主按钮 */
.rk-submit {
  width: 100%;
  height: 54px;
  margin-top: 12px;
  border: 0;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(96deg, var(--rk-blue-light) 0%, #0f5cf0 100%);
  color: #fff;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 14px 26px -13px rgba(15, 92, 240, .85);
  transition: transform .12s ease, box-shadow .2s ease, opacity .2s;
  -webkit-tap-highlight-color: transparent;
}

.rk-submit .arrow {
  width: 18px;
  height: 18px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  letter-spacing: 0;
  transition: transform .18s;
}

.rk-submit:hover { box-shadow: 0 16px 30px -12px rgba(15, 92, 240, .9); }
.rk-submit:hover .arrow { transform: translateX(3px); }
.rk-submit:active { transform: translateY(1px); }
.rk-submit[disabled] { opacity: .72; cursor: default; }

/* 错误提示 */
.rk-err {
  min-height: 18px;
  margin: 10px 0 0;
  font-size: 13px;
  color: #e03131;
  text-align: center;
  letter-spacing: .2px;
}

/* 副文案 */
.rk-note {
  margin: 22px 0 0;
  text-align: center;
  font-size: 13.5px;
  line-height: 2;
  letter-spacing: 1.2px;
  color: #9aa8bb;
}

/* 页脚 */
.rk-foot {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: 22px 0 10px;
  text-align: center;
  font-size: 11.5px;
  letter-spacing: 4px;
  color: #94a6bd;
}

/* 底部浅蓝波浪 */
.rk-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 134px;
  display: block;
  pointer-events: none;
}

/* ---------- 平板竖屏：卡片整体居中 ---------- */
@media (min-width: 640px) and (max-width: 899px) {
  .rk-hero { height: 44vh; min-height: 300px; }
  .rk-hero-text { left: 34px; top: 34px; }
  .rk-hero-text h2 { font-size: 32px; }
  .rk-panel {
    justify-content: center;
    gap: 26px;
    padding: 30px 32px 24px;
  }
  .rk-card { max-width: 400px; }
  .rk-foot { margin-top: 0; padding: 0; }
}

/* ---------- 桌面端：左图右表单 ---------- */
@media (min-width: 900px) {
  .rk-wrap {
    flex-direction: row;
    height: 100vh;
    height: 100dvh;
    min-height: 620px;
  }

  .rk-hero {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    border-radius: 0;
  }

  .rk-hero::after {
    background:
      linear-gradient(180deg, rgba(6, 42, 92, .16) 0%, rgba(6, 42, 92, 0) 40%),
      linear-gradient(90deg, rgba(6, 42, 92, .34) 0%, rgba(6, 42, 92, .06) 58%, rgba(6, 42, 92, 0) 100%);
  }

  .rk-hero-text {
    left: clamp(44px, 5.2vw, 92px);
    top: 50%;
    transform: translateY(-50%);
    max-width: 70%;
  }

  .rk-hero-text h2 {
    font-size: clamp(33px, 3vw, 44px);
    line-height: 1.46;
    letter-spacing: 1px;
  }

  .rk-hero-text p {
    margin-top: 16px;
    font-size: 14.5px;
    letter-spacing: 1.4px;
  }

  .rk-panel {
    flex: 0 0 480px;
    width: 480px;
    margin-top: 0;
    padding: 0 44px;
    border-radius: 0;
    justify-content: center;
    background: linear-gradient(180deg, #f7fbff 0%, #eaf3ff 100%);
    box-shadow: -30px 0 66px -44px rgba(9, 44, 96, .3);
  }

  .rk-card {
    max-width: 400px;
    padding: 36px 32px 32px;
    background: #fff;
    border-radius: 26px;
    box-shadow: 0 26px 60px -34px rgba(12, 52, 110, .45), 0 2px 6px rgba(12, 52, 110, .04);
  }
  .rk-brand { margin-bottom: 30px; }
  .rk-wave { display: none; }
  .rk-foot {
    position: static;
    padding: 0;
    margin: 26px 0 0;
    color: #9db0c8;
  }
  .rk-note { margin-top: 24px; }
}

@media (min-width: 1600px) {
  .rk-panel { flex-basis: 600px; width: 600px; padding: 0 64px; }
  .rk-card { max-width: 440px; padding: 40px 36px 34px; }
  .rk-hero-text h2 { font-size: clamp(44px, 3.2vw, 58px); }
  .rk-hero-text p { font-size: 16px; margin-top: 18px; }
  .rk-brand h1 { font-size: 24px; }
  .rk-field input { height: 56px; }
  .rk-submit { height: 56px; }
}

/* 矮屏手机（iPhone SE / 小屏安卓）压缩尺寸，保证一屏内不滚动 */
@media (max-height: 700px) and (max-width: 899px) {
  .rk-hero { height: 30vh; min-height: 164px; }
  .rk-hero > img { object-position: center 56%; }
  .rk-hero-text { top: 16px; left: 20px; }
  .rk-hero-text h2 { font-size: 23px; line-height: 1.36; }
  .rk-hero-text p { margin-top: 7px; font-size: 11.5px; }
  .rk-panel { padding-top: 18px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .rk-brand { gap: 11px; margin-bottom: 16px; }
  .rk-logo { width: 46px; height: 46px; border-radius: 14px; }
  .rk-logo svg { width: 23px; height: 23px; }
  .rk-brand h1 { font-size: 19px; }
  .rk-brand p { margin-top: 4px; font-size: 12px; }
  .rk-field { margin-bottom: 10px; }
  .rk-field input { height: 48px; padding: 0 46px 0 42px; }
  .rk-field input::placeholder { font-size: 14px; }
  .rk-field .ico { left: 14px; width: 18px; height: 18px; }
  .rk-submit { height: 48px; margin-top: 8px; font-size: 16px; }
  .rk-err { min-height: 16px; margin-top: 6px; font-size: 12px; }
  .rk-note { margin-top: 12px; font-size: 12.5px; line-height: 1.9; }
  .rk-foot { padding-top: 12px; }
  .rk-wave { height: 96px; }
}

/* 隐藏 ThinkPHP 页面 Trace 面板（APP_DEBUG 开启时会自动注入，生产环境不应展示） */
#think_page_trace,
#think_page_trace_open { display: none !important; }
