/* ============================================================
   壹号博客 · 授权管理服务端
   手机优先 · 卡片式控制台
   ============================================================ */
:root {
  --primary: #2952E3;
  --tech: #00E5A8;
  --ink: #0A0F1C;
  --text: #4C586C;
  --text-3: #7B8798;
  --canvas: #F4F7FC;
  --line: #E3E9F2;
  --line-strong: #D2DBE8;
  --paper: #FFFFFF;
  --success: #168A5B;
  --danger: #B42318;
  --warn: #B45309;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(10, 15, 30, .04), 0 12px 32px rgba(10, 15, 30, .06);
  --font: "Avenir Next", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display: "Bahnschrift", "DIN Alternate", "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body.ls-body {
  min-height: 100vh;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--canvas);
  background-image:
    linear-gradient(rgba(10, 15, 30, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 15, 30, .022) 1px, transparent 1px),
    radial-gradient(620px 320px at 100% -8%, rgba(41, 82, 227, .10), transparent 62%),
    radial-gradient(520px 300px at 0% 4%, rgba(0, 229, 168, .07), transparent 58%);
  background-size: 24px 24px, 24px 24px, auto, auto;
  background-attachment: fixed;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 14px; }
ul, ol { list-style: none; }
::selection { background: rgba(0, 229, 168, .28); color: var(--ink); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

.ls-top {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  height: 62px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: rgba(247, 250, 255, .94);
  background-image: linear-gradient(100deg, rgba(41, 82, 227, .10), rgba(255, 255, 255, 0) 48%, rgba(0, 229, 168, .08));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(41, 82, 227, .14);
  box-shadow: 0 8px 26px rgba(10, 15, 30, .05);
}
.ls-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ls-logo {
  width: 36px; height: 36px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--tech));
  color: #fff; font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .04em;
  box-shadow: 0 8px 18px rgba(41, 82, 227, .22);
  flex: 0 0 auto;
}
.ls-brand-text { min-width: 0; }
.ls-brand-text strong { display: block; font-size: 14.5px; line-height: 1.25; }
.ls-brand-text small {
  display: block; margin-top: 2px;
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .14em; color: var(--text-3);
}
.ls-online {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .06em;
  color: var(--success);
  white-space: nowrap;
}

.ls-main { width: 100%; max-width: 560px; margin: 0 auto; padding: 18px 16px 26px; }

.ls-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ls-page-head h1 { font-family: var(--display); font-size: 28px; line-height: 1.25; letter-spacing: -.02em; }
.ls-kicker {
  margin-bottom: 4px;
  font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .16em; color: var(--tech);
}
.ls-muted { color: var(--text); font-size: 12px; line-height: 1.65; }
.ls-page-head .ls-muted { margin-top: 5px; max-width: 320px; }

.ls-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 42px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: 11px;
  background: #fff; color: var(--ink);
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.ls-btn:hover { text-decoration: none; transform: translateY(-1px); border-color: rgba(41, 82, 227, .3); box-shadow: 0 8px 20px rgba(10, 15, 30, .08); }
.ls-btn:active { transform: none; box-shadow: none; }
.ls-btn-primary {
  background: linear-gradient(135deg, #2952E3, #3E6BFF);
  border-color: transparent; color: #fff;
  box-shadow: 0 10px 24px rgba(41, 82, 227, .24);
}
.ls-btn-primary:hover { filter: brightness(.96); }
.ls-btn-block { width: 100%; }
.ls-btn-warn { color: var(--warn); background: #FFFBEB; border-color: #FDE68A; }
.ls-btn-danger-ghost { color: var(--danger); background: #FFF7F7; border-color: #FECACA; }

.ls-flash {
  margin-bottom: 14px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.6;
  background: #F0FDF4; color: #15803D; border: 1px solid #BBF7D0;
}
.ls-flash-error { background: #FEF2F2; color: var(--danger); border-color: #FECACA; }

.ls-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.ls-stat {
  position: relative;
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 15px;
  color: var(--ink); box-shadow: var(--shadow);
  overflow: hidden;
}
.ls-stat::before {
  content: ""; position: absolute; top: 0; left: 14px; right: 14px; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--tech)); opacity: .5;
}
.ls-stat:hover { text-decoration: none; border-color: rgba(41, 82, 227, .28); }
.ls-stat.on { border-color: rgba(41, 82, 227, .38); box-shadow: 0 0 0 3px rgba(41, 82, 227, .08); }
.ls-stat span { font-size: 11px; color: var(--text-3); }
.ls-stat strong { font-family: var(--display); font-size: 25px; line-height: 1.2; letter-spacing: -.02em; }

.ls-search { display: flex; gap: 8px; margin-bottom: 14px; }
.ls-search input {
  flex: 1; min-width: 0; height: 42px; padding: 0 13px;
  border: 1px solid var(--line-strong); border-radius: 11px;
  background: rgba(255, 255, 255, .9); color: var(--ink); outline: 0;
}
.ls-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(41, 82, 227, .09); }
.ls-search button {
  height: 42px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 11px;
  background: #fff; color: var(--ink); font-weight: 600; cursor: pointer;
}

.ls-list { display: flex; flex-direction: column; gap: 12px; }
.ls-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.ls-license.is-new { border-color: rgba(0, 229, 168, .55); box-shadow: 0 0 0 3px rgba(0, 229, 168, .08), var(--shadow); }
.ls-lic-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ls-lic-head h2 { font-family: var(--display); font-size: 19px; line-height: 1.3; letter-spacing: -.01em; word-break: break-all; }
.ls-badge {
  display: inline-flex; align-items: center; margin-top: 5px; padding: 2px 9px;
  border-radius: 999px; font-size: 10px; line-height: 1.7; border: 1px solid transparent;
}
.ls-badge.ok { background: #ECFDF5; color: #047857; border-color: #A7F3D0; }
.ls-badge.warn { background: #FFFBEB; color: var(--warn); border-color: #FDE68A; }
.ls-badge.muted { background: #F4F6F9; color: var(--text-3); border-color: var(--line); }
.ls-badge.info { background: #EEF4FF; color: var(--primary); border-color: #D3E1FF; }
.ls-copy {
  height: 32px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: #fff; color: var(--text); font-size: 11.5px; cursor: pointer; flex: 0 0 auto;
}
.ls-copy:hover { border-color: var(--primary); color: var(--primary); }
.ls-key {
  margin: 11px 0;
  padding: 10px 12px;
  border: 1px dashed #CDDCF1;
  border-radius: 10px;
  background: #F7FAFF;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  word-break: break-all;
}
.ls-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.ls-meta dt { font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em; color: var(--text-3); }
.ls-meta dd { margin: 2px 0 0; font-size: 12.5px; color: var(--ink); word-break: break-all; }
.ls-note { margin-top: 10px; font-size: 11.5px; color: var(--text); line-height: 1.6; }
.ls-note.is-error { color: var(--danger); }
.ls-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ls-actions form { margin: 0; }
.ls-actions .ls-btn { height: 36px; font-size: 12px; padding: 0 13px; }

.ls-empty {
  padding: 40px 18px;
  text-align: center;
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
}
.ls-empty strong { display: block; font-size: 15px; color: var(--ink); margin-bottom: 5px; }
.ls-empty p { font-size: 12px; }

.ls-tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 40;
  width: 100%;
  max-width: 560px;
  height: calc(66px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background-color: rgba(247, 250, 255, .97);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(237, 244, 255, .97));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(41, 82, 227, .14);
}
.ls-tabbar a, .ls-tabbar form { flex: 1; display: flex; }
.ls-tabbar a, .ls-tabbar button {
  width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; background: none; color: #6B7789; font-size: 10px; text-decoration: none; cursor: pointer;
}
.ls-tabbar a.on, .ls-tabbar a:hover { color: var(--primary); font-weight: 700; }
.ls-tabbar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.ls-login { min-height: calc(100vh - 140px); display: flex; align-items: center; justify-content: center; padding: 8px 0 24px; }
.ls-login-card {
  width: 100%;
  max-width: 420px;
  padding: 26px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(10, 15, 30, .12);
  position: relative;
  overflow: hidden;
}
.ls-login-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--tech));
}
.ls-login-card h1 { font-family: var(--display); font-size: 30px; line-height: 1.2; letter-spacing: -.02em; margin: 4px 0 6px; }
.ls-login-card .ls-muted { margin-bottom: 18px; }
.ls-login-foot {
  margin-top: 16px; text-align: center;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; color: var(--text-3);
}

.ls-form { display: flex; flex-direction: column; gap: 13px; }
.ls-field { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--text); }
.ls-field > span { font-weight: 600; color: var(--ink); }
.ls-field em { color: #FF3B5C; font-style: normal; }
.ls-field input {
  height: 44px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 11px;
  background: #FBFDFF; color: var(--ink); outline: 0;
  font-size: 14px;
}
.ls-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(41, 82, 227, .09); background: #fff; }
.ls-field small { font-size: 10.5px; color: var(--text-3); line-height: 1.5; }

.ls-info-card .ls-card-title {
  font-size: 12.5px; font-weight: 700; color: var(--ink);
  padding-left: 9px; border-left: 3px solid var(--primary); line-height: 1.2;
  margin-bottom: 11px;
}
.ls-rules { display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--text); line-height: 1.65; }
.ls-rules li { position: relative; padding-left: 14px; }
.ls-rules li::before { content: "›"; position: absolute; left: 0; color: var(--tech); font-weight: 700; }

@media (max-width: 380px) {
  .ls-main { padding: 14px 12px 24px; }
  .ls-page-head h1 { font-size: 24px; }
  .ls-login-card { padding: 22px; }
  .ls-meta { grid-template-columns: 1fr; }
}
