/* 继教通学分查询助手 · 自建版样式 */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  color: #333;
  background: #e9edf2;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.v-login { background: #0c82c4; }
#app {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: #f2f2f2;
  min-height: 100vh;
  box-shadow: 0 0 26px rgba(30,50,90,.08);
}
body.v-login #app { background: transparent; box-shadow: none; }
a { color: inherit; text-decoration: none; }
img { display: block; }
input, button { font-family: inherit; }
.hidden { display: none !important; }

/* ---------------- 顶栏 ---------------- */
.bar {
  position: sticky; top: 0; z-index: 50;
  height: 50px; background: #3da8f4; color: #fff;
  display: flex; align-items: center; padding: 0 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.bar .bar-back {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; line-height: 1; opacity: .95; cursor: pointer; flex: 0 0 auto;
  background: none; border: none; color: #fff;
}
.bar .bar-title {
  position: absolute; left: 0; right: 0; text-align: center;
  font-size: 19px; font-weight: 600; letter-spacing: 1px; pointer-events: none;
}
.bar .bar-title .sub { font-size: 14px; font-weight: 400; opacity: .9; }
.bar .bar-right {
  margin-left: auto; position: relative; z-index: 2;
  font-size: 14px; display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.18); border: none; color: #fff;
  padding: 6px 10px; border-radius: 14px; cursor: pointer;
}

/* ---------------- 登录页 ---------------- */
/* 整页虚化背景：取顶部蓝色画面（渐变 + 装饰图标 + logo）放大模糊 */
.bg-blur {
  position: fixed; inset: -50px; z-index: 0;
  background:
    radial-gradient(120% 80% at 50% 8%, rgba(90, 200, 255, .55) 0%, rgba(90, 200, 255, 0) 60%),
    linear-gradient(162deg, #2fb9f2 0%, #17a0de 26%, #1090ce 48%, #0d86c9 66%, #0b78ba 84%, #0a6cab 100%);
  filter: blur(18px) saturate(114%);
  overflow: hidden; pointer-events: none;
}
.bg-blur svg { position: absolute; fill: #fff; opacity: .3; }
.bg-blur .bg-logo {
  position: absolute; left: 50%; top: 116px;
  width: 250px; height: 250px; transform: translate(-50%, -50%);
  border-radius: 44px; opacity: .26; filter: blur(9px);
}

.header {
  position: relative; z-index: 1; overflow: hidden;
  background: linear-gradient(160deg, #1da8e8 0%, #0c82c4 100%);
  padding: 26px 24px 22px; text-align: center;
}
body.v-login .header { background: transparent; }
.header-icons { position: absolute; inset: 0; opacity: .22; pointer-events: none; }
.header-icons svg { position: absolute; fill: #fff; }
.logo-ring {
  position: relative; z-index: 2; width: 130px; height: 130px; margin: 0 auto 18px;
  border-radius: 26px; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
}
.logo-img { width: 110px; height: 110px; border-radius: 20px; }
.brand-line {
  position: relative; z-index: 2; display: flex; align-items: center;
  justify-content: center; gap: 14px;
}
.brand-line::before, .brand-line::after {
  content: ""; width: 42px; height: 2px; background: rgba(255,255,255,.6); border-radius: 2px;
}
.brand-text { color: #fff; font-size: 20px; font-weight: 700; letter-spacing: 2px; }

.body-wrap { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; padding: 14px 0 20px; }
.card { width: calc(100% - 32px); max-width: 440px; margin: 0 auto; background: #fff; padding: 20px 18px; border-radius: 14px; box-shadow: 0 5px 20px rgba(8, 58, 102, .14); }

.search-box-wrap { position: relative; }
.search-box {
  width: 100%; display: flex; align-items: center;
  background: #f5f7fb; border: 2px solid transparent; border-radius: 12px; padding: 0 16px;
  transition: border-color .15s, background .15s;
}
.search-box.focus { border-color: #4e6ef2; background: #fff; }
.search-icon { width: 22px; height: 22px; flex-shrink: 0; color: #aab4c8; }
.search-box.focus .search-icon { color: #4e6ef2; }
.search-input {
  flex: 1; min-width: 0; border: none; outline: none; font-size: 17px;
  padding: 15px 12px; background: transparent; color: #222; letter-spacing: .5px;
}
.search-input::placeholder { color: #b8c0d0; letter-spacing: 0; }
.clear-btn, .arrow-btn {
  background: none; border: none; padding: 4px; cursor: pointer;
  color: #c5ccd9; flex-shrink: 0; display: none;
}
.clear-btn { display: none; }
.arrow-btn { display: flex; color: #aab4c8; transition: transform .2s; }
.arrow-btn svg { width: 20px; height: 20px; }
.arrow-btn.open { transform: rotate(180deg); }
.clear-btn:active, .arrow-btn:active { color: #888; }

.history-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20;
  background: #fff; border-radius: 12px; box-shadow: 0 8px 24px rgba(20,40,80,.16);
  overflow: hidden; display: none; max-height: 340px; overflow-y: auto;
}
.history-panel.show { display: block; }
.history-empty { padding: 22px 0; text-align: center; color: #b8c0d0; font-size: 14px; }
.history-item {
  display: flex; align-items: center; padding: 12px 14px; cursor: pointer;
  border-bottom: 1px solid #f4f6fa;
}
.history-item:last-child { border-bottom: none; }
.history-item:active { background: #f7f9fc; }
.hi-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #1da8e8, #0c82c4); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600;
}
.hi-info { flex: 1; margin-left: 10px; min-width: 0; }
.hi-name { font-size: 15px; color: #333; }
.hi-idcard { font-size: 12px; color: #a0a8b8; margin-top: 2px; letter-spacing: .5px; }
.hi-del { padding: 6px; color: #ccd3e0; cursor: pointer; }

.btn-row { margin-top: 20px; }
.login-btn {
  width: 100%; height: 52px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #2fb6ef 0%, #1a8fd0 100%);
  color: #fff; font-size: 18px; font-weight: 600; letter-spacing: 4px;
  cursor: pointer; box-shadow: 0 6px 16px rgba(26,143,208,.28);
  transition: transform .12s, opacity .12s;
}
.login-btn:active { transform: scale(.985); }
.login-btn:disabled { opacity: .65; box-shadow: none; cursor: default; }

.tips {
  margin-top: 14px; display: flex; align-items: center; justify-content: center;
  gap: 6px; color: #98a2b3; font-size: 13px;
}
.tips-icon { width: 15px; height: 15px; flex-shrink: 0; }
.footer { position: relative; z-index: 1; text-align: center; color: rgba(255, 255, 255, .72); font-size: 12px; padding: 10px 0 14px; }

/* ---------------- 登录页广告位 ---------------- */
.ad-card {
  width: calc(100% - 32px); max-width: 440px; margin: 10px auto 0;
  background: #fff; border: 1px solid #e3eefb; border-radius: 14px;
  padding: 12px 14px 11px; text-align: center;
  box-shadow: 0 3px 14px rgba(24, 144, 255, .10);
}
.ad-head {
  display: flex; align-items: center; justify-content: center;
  gap: 7px; padding-bottom: 9px; border-bottom: 1px dashed #e8f0fa;
}
.ad-wx { width: 19px; height: 19px; color: #1aad19; flex-shrink: 0; }
.ad-brand { font-size: 16px; font-weight: 600; color: #2b3a4d; letter-spacing: .5px; }
.ad-badge {
  margin-left: 4px; padding: 2px 8px; border-radius: 9px;
  background: linear-gradient(135deg, #ff9d3c, #ff7a18);
  color: #fff; font-size: 11px; line-height: 1.5;
}
.ad-qr {
  display: block; width: 126px; height: 126px; margin: 11px auto 0;
  border-radius: 10px; cursor: zoom-in; transition: transform .15s;
  background: #fff;
}
.ad-qr:active { transform: scale(.97); }
.ad-qr.zoom {
  position: fixed; z-index: 999; left: 50%; top: 50%;
  width: min(86vw, 420px); height: min(86vw, 420px);
  transform: translate(-50%, -50%); cursor: zoom-out;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .78);
  border-radius: 12px;
}
.ad-slogan { margin-top: 10px; font-size: 14.5px; font-weight: 600; color: #1f6fd0; line-height: 1.4; letter-spacing: .3px; }
.ad-desc { margin-top: 5px; font-size: 12px; color: #7b8794; line-height: 1.6; padding: 0 2px; }
.ad-foot { margin-top: 7px; font-size: 11.5px; color: #a7b1bd; letter-spacing: .5px; }

/* ---------------- 我的 ---------------- */
.user-card { background: #fff; display: flex; align-items: center; padding: 20px 16px; border-bottom: 1px solid #eee; }
.avatar { width: 68px; height: 68px; border-radius: 50%; object-fit: cover; border: 1px solid #eee; flex-shrink: 0; background: #eee; }
.user-info { flex: 1; margin-left: 14px; min-width: 0; }
.user-name { font-size: 19px; font-weight: 600; margin-bottom: 6px; }
.user-unit { font-size: 15px; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gap { height: 14px; background: #f2f2f2; }
.menu-list { background: #fff; }
.menu-item { display: flex; align-items: center; padding: 18px 16px; border-bottom: 1px solid #f2f2f2; cursor: pointer; }
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: #fafbfd; }
.menu-icon { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
.menu-icon svg { width: 22px; height: 22px; }
.menu-text { flex: 1; margin-left: 14px; font-size: 17px; }
.arrow-r { color: #3da8f4; font-size: 22px; margin-left: 8px; flex-shrink: 0; }
.ico-green { background: #2ecc71; } .ico-orange { background: #e67e22; }
.ico-blue { background: #3da8f4; } .ico-purple { background: #9b59b6; }
.half-cell { flex: 1; display: flex; align-items: center; min-width: 0; }
.half-cell.left { justify-content: flex-start; overflow: hidden; }
.half-cell.right { justify-content: flex-end; padding-right: 16px; flex: 0 0 auto; }
.copy-link {
  display: flex; flex-direction: column; align-items: center; cursor: pointer;
  background: linear-gradient(135deg, #4ab8f5 0%, #3da8f4 100%);
  padding: 7px 12px; border-radius: 20px;
  box-shadow: 0 2px 8px rgba(61,168,244,.35);
  transition: transform .15s;
}
.copy-link:active { transform: scale(.96); }
.copy-link .copy-text { color: #fff; font-size: 13px; line-height: 1.2; font-weight: 500; white-space: nowrap; }
.copy-link .copy-desc { color: rgba(255,255,255,.85); font-size: 9px; line-height: 1.2; margin-top: 2px; white-space: nowrap; }
.menu-switch {
  position: relative; width: 48px; height: 28px; border-radius: 14px; background: #ddd;
  flex-shrink: 0; margin-left: 10px; transition: background .2s;
}
.menu-switch.on { background: #3da8f4; }
.menu-switch .sw-dot {
  position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .2s;
}
.menu-switch.on .sw-dot { left: 22px; }

/* ---------------- 下拉刷新 ---------------- */
.pull-refresh {
  height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center;
  gap: 8px; color: #8c96a6; font-size: 13px; transition: height .18s;
}
.pr-icon { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #c8d0dc; }
.pull-refresh.ready .pr-icon { border-color: #3da8f4; border-top-color: transparent; }
.pull-refresh.loading .pr-icon { border-color: #3da8f4; border-top-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.content-wrap { transition: transform .18s; }

/* ---------------- 通用列表 ---------------- */
.empty { padding: 60px 0; text-align: center; color: #a8b0be; font-size: 15px; }
.content { padding-bottom: 24px; }
.year-card, .group-card, .attend-item {
  background: #fff; margin: 12px; border-radius: 12px;
  box-shadow: 0 2px 10px rgba(30,50,90,.06); overflow: hidden;
}
.year-header, .group-header {
  display: flex; align-items: center; padding: 16px; cursor: pointer;
}
.year-icon, .group-icon {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.year-icon svg, .group-icon svg { width: 22px; height: 22px; fill: #fff; }
.green { background: #2ecc71; } .orange { background: #e67e22; } .blue { background: #3da8f4; }
.yellow { background: #f1c40f; } .purple { background: #9b59b6; } .pink { background: #e91e63; }
.teal { background: #1abc9c; } .red { background: #e74c3c; }
.year-text, .group-title { flex: 1; margin-left: 12px; font-size: 17px; font-weight: 600; }
.year-arrow, .group-arrow { color: #b6bfcd; transition: transform .2s; }
.year-arrow svg, .group-arrow svg { width: 22px; height: 22px; fill: currentColor; }
.year-arrow.open, .group-arrow.open { transform: rotate(180deg); }
.year-body, .group-body {
  max-height: 0; overflow: hidden; transition: max-height .28s ease;
  border-top: 1px solid #f2f4f8;
}
.year-body.open, .group-body.open { max-height: 6000px; }
.tabs { display: flex; gap: 0; padding: 14px 16px; border-bottom: 1px solid #f2f4f8; }
.tab-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; border: 1px solid #dbe6f2; background: #f7fafd; color: #2b7fc0;
  border-radius: 10px; font-size: 14px; cursor: pointer;
}
.tab-btn + .tab-btn { margin-left: 10px; }
.tab-btn svg { width: 17px; height: 17px; fill: currentColor; }
.tab-btn:active { background: #eef5fc; }
.detail-table { padding: 4px 16px 16px; }
.detail-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 11px 0; border-bottom: 1px dashed #eef1f6; font-size: 15px; gap: 12px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { color: #7b869a; display: flex; align-items: center; flex-shrink: 0; }
.detail-value { color: #222; text-align: right; word-break: break-all; }
.arrow-mark { display: inline-flex; margin-right: 6px; }
.arrow-mark svg { width: 16px; height: 11px; fill: #c3cddb; }

/* 项目卡片 */
.project-card { margin: 0 0 12px; padding: 14px; background: #f8fafd; border-radius: 10px; }
.project-card:last-child { margin-bottom: 0; }
.project-name { font-size: 15px; font-weight: 600; color: #1b3a5c; margin-bottom: 8px; line-height: 1.45; }
.field-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; }
.field-label { color: #7b869a; display: flex; align-items: center; flex-shrink: 0; }
.field-value { color: #333; text-align: right; word-break: break-all; }
.group-body-inner { padding: 12px 14px 14px; }

/* 汇总 */
.total-bar {
  display: flex; align-items: center; background: #fff; margin: 12px;
  border-radius: 12px; padding: 16px; box-shadow: 0 2px 10px rgba(30,50,90,.06);
}
.total-item { flex: 1; text-align: center; color: #7b869a; font-size: 14px; }
.total-item span { display: block; margin-top: 6px; font-size: 22px; font-weight: 700; color: #1a8fd0; }
.total-divider { width: 1px; height: 34px; background: #eef1f6; }
.group-block { background: #fff; margin: 12px; border-radius: 12px; box-shadow: 0 2px 10px rgba(30,50,90,.06); overflow: hidden; }
.group-block-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #f8fafd; }
.group-block-header .g-name { font-size: 16px; font-weight: 600; color: #1b3a5c; }
.group-block-header .g-num { font-size: 13px; color: #7b869a; }
.child-row { display: flex; justify-content: space-between; padding: 11px 16px; border-top: 1px dashed #eef1f6; font-size: 14px; }
.child-row .c-name { color: #4a5568; }
.child-row .c-num { color: #1a8fd0; }

/* 考勤 */
.attend-list { padding-top: 4px; }
.attend-item { padding: 0; }
.attend-row { display: flex; align-items: center; padding: 15px 14px; cursor: pointer; }
.attend-icon { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.attend-icon svg { width: 22px; height: 22px; fill: #fff; }
.attend-info { flex: 1; margin-left: 12px; min-width: 0; }
.attend-name { font-size: 15px; font-weight: 600; color: #23384f; line-height: 1.4; word-break: break-all; }
.attend-time { font-size: 12px; color: #98a2b3; margin-top: 4px; }
.attend-status { display: flex; align-items: center; gap: 4px; color: #2ecc71; font-size: 13px; flex-shrink: 0; margin-left: 8px; }
.status-arrow { color: #c3cddb; transition: transform .2s; display: inline-flex; }
.status-arrow svg { width: 20px; height: 20px; fill: currentColor; }
.attend-item.expanded .status-arrow { transform: rotate(180deg); }
.attend-detail { max-height: 0; overflow: hidden; transition: max-height .28s; border-top: 1px solid #f2f4f8; }
.attend-detail.open { max-height: 900px; }
.attend-detail .detail-row { padding: 10px 14px; font-size: 14px; }
.attend-detail .detail-label { color: #7b869a; }
.list-end { text-align: center; color: #b0b8c6; font-size: 12px; padding: 16px 0 26px; }

/* 验证 */
.verify-item { display: flex; align-items: center; background: #fff; margin: 12px; border-radius: 12px; padding: 15px 14px; cursor: pointer; box-shadow: 0 2px 10px rgba(30,50,90,.06); }
.verify-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.verify-icon svg { width: 22px; height: 22px; fill: #fff; }
.verify-icon.pass { background: #2ecc71; }
.verify-icon.fail { background: #f0a92e; }
.verify-info { flex: 1; margin-left: 12px; min-width: 0; }
.verify-year { font-size: 16px; font-weight: 600; margin-bottom: 5px; }
.verify-detail { font-size: 13px; color: #8c96a6; line-height: 1.7; }
.verify-detail span { color: #333; }
.verify-arrow { color: #c3cddb; font-size: 22px; }

/* 合格证 */
.cert-wrap { padding: 10px; }
.cert-frame-wrap { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(30,50,90,.06); }
.cert-frame { border: 0; display: block; transform-origin: top left; background: #fff; }

/* 年度选择 */
.picker-mask { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 80; display: none; }
.picker-mask.show { display: block; }
.picker-panel {
  position: fixed; left: 0; right: 0; bottom: -60vh; z-index: 81;
  background: #fff; border-radius: 16px 16px 0 0; transition: bottom .25s; padding-bottom: 10px;
}
.picker-panel.show { bottom: 0; }
.picker-head { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid #f2f4f8; }
.picker-head .ph-title { font-size: 16px; font-weight: 600; }
.picker-head .ph-done { color: #3da8f4; font-size: 15px; cursor: pointer; background: none; border: none; }
.picker-list { max-height: 46vh; overflow-y: auto; }
.picker-item { padding: 15px 16px; text-align: center; font-size: 16px; color: #4a5568; border-bottom: 1px solid #f7f9fc; cursor: pointer; }
.picker-item.active { color: #3da8f4; font-weight: 600; }
.picker-item:active { background: #f7fafd; }

/* toast */
.toast {
  position: fixed; top: 42%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,.78); color: #fff; padding: 11px 22px; border-radius: 10px;
  font-size: 14px; z-index: 999; display: none; max-width: 78vw; text-align: center; line-height: 1.5;
}
