/* RemoteSys 全站样式：落地页 / 控制台 / 远程视图 */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #f4f6fa; --card: #fff; --line: #e6e9ef; --text: #161a22; --muted: #7b8494;
  --primary: #2b6cf6; --primary-d: #1f57d0; --green: #12a05c; --orange: #d98600; --red: #e5484d;
}
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }
.hidden { display: none !important; }
.hide { display: none !important; }
#sec-tip { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 30;
  max-width: 80%; padding: 8px 16px; border-radius: 20px; font-size: 12.5px;
  background: rgba(17,21,30,.88); color: #cfd6e4; pointer-events: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.35); }

.btn-p { background: var(--primary); color: #fff; border: 0; border-radius: 8px;
  padding: 10px 18px; font-size: 14px; font-weight: 600; transition: .15s; }
.btn-p:hover { background: var(--primary-d); }
.btn-p:disabled { opacity: .55; cursor: not-allowed; }
.btn-g { background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 16px; font-size: 13px; transition: .15s; }
.btn-g:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: #fff; color: var(--red); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 12px; font-size: 12px; }
.btn-danger:hover { border-color: var(--red); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

input[type=text], input[type=password], input[type=email] {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; background: #fff; outline: none; transition: border-color .15s;
}
input:focus { border-color: var(--primary); }
.err { color: var(--red); font-size: 12.5px; min-height: 18px; margin-top: 8px; }
.muted { color: var(--muted); }

/* ============ 落地页 ============ */
.lnav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.lnav-in { max-width: 1080px; margin: 0 auto; display: flex; align-items: center;
  padding: 14px 24px; }
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; }
.lnav .sp { flex: 1; }
.lnav .nav-right { display: inline-flex; align-items: center; }
.lnav .who-mini { color: var(--muted); font-size: 13px; margin-right: 12px;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero { max-width: 1080px; margin: 0 auto; padding: 72px 24px 40px; text-align: center; }
.hero h1 { font-size: 40px; line-height: 1.25; letter-spacing: -1px; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p.sub { color: var(--muted); font-size: 17px; margin: 16px auto 30px; max-width: 620px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; }
.hero .cta .btn-p { padding: 12px 28px; font-size: 15px; }
.hero-shot { max-width: 880px; margin: 48px auto 0; }

.features { max-width: 1080px; margin: 24px auto 0; padding: 40px 24px 8px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.feat .ic { width: 40px; height: 40px; border-radius: 10px; background: #eef3ff;
  display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 14px; }
.feat h3 { font-size: 15px; margin-bottom: 8px; }
.feat p { color: var(--muted); font-size: 13px; line-height: 1.7; }

.sect { max-width: 1080px; margin: 0 auto; padding: 56px 24px; }
.sect h2 { font-size: 26px; text-align: center; margin-bottom: 10px; }
.sect .sub { text-align: center; color: var(--muted); margin-bottom: 34px; }
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dl-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 26px; text-align: center; }
.dl-card .os-ic { font-size: 34px; }
.dl-card h3 { margin: 12px 0 6px; font-size: 16px; }
.dl-card p { color: var(--muted); font-size: 12.5px; margin-bottom: 18px; }
.dl-main { background: #eef3ff; border-color: var(--primary); }
.cmd-line { font-family: Consolas, "SF Mono", Menlo, monospace; font-size: 11.5px;
  background: #f0f3f9; border: 1px dashed var(--line); border-radius: 8px;
  padding: 9px 10px; margin-bottom: 14px; word-break: break-all;
  user-select: all; cursor: pointer; color: var(--text); }
.cmd-line:hover { border-color: var(--primary); }
.ver-table { width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ver-table th, .ver-table td { padding: 11px 16px; text-align: left; font-size: 13px;
  border-bottom: 1px solid var(--line); }
.ver-table th { background: #fafbfd; color: var(--muted); font-weight: 500; }
.ver-table tr:last-child td { border-bottom: 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
.step b { display: inline-block; width: 24px; height: 24px; border-radius: 50%; background: var(--primary);
  color: #fff; text-align: center; line-height: 24px; font-size: 13px; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 13px; line-height: 1.7; margin-top: 4px; }
footer { border-top: 1px solid var(--line); padding: 28px 24px; text-align: center;
  color: var(--muted); font-size: 12.5px; }

/* ============ 控制台 ============ */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 34px 32px; box-shadow: 0 12px 40px rgba(22,26,34,.06); }
.auth-card .brand { text-align: center; margin-bottom: 24px; }
.auth-card h1 { font-size: 20px; margin-top: 10px; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.auth-card label { display: block; font-size: 12.5px; color: var(--muted); margin: 14px 0 6px; }
.auth-tabs { display: flex; gap: 4px; background: #eef1f6; border-radius: 10px; padding: 4px; margin-bottom: 8px; }
.auth-tabs button { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 7px;
  font-size: 13px; color: var(--muted); }
.auth-tabs button.on { background: #fff; color: var(--text); font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.code-row2 { display: flex; gap: 10px; }
.code-row2 input { flex: 1; }
.code-row2 .btn-g { white-space: nowrap; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 12.5px; color: var(--muted); }

.topbar { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; padding: 13px 24px; gap: 18px; }
.topbar .nav { display: flex; gap: 4px; }
.topbar .nav button { border: 0; background: transparent; padding: 8px 14px; border-radius: 8px;
  font-size: 13.5px; color: var(--muted); }
.topbar .nav button.on { background: #eef3ff; color: var(--primary); font-weight: 600; }
.topbar .nav a { display: inline-flex; align-items: center; border: 0; background: transparent; padding: 8px 14px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; font-family: inherit; cursor: pointer; }
.topbar .nav a:hover { background: #f5f7fb; }
.topbar .nav a.on { background: #eef3ff; color: var(--primary); font-weight: 600; }
.topbar .sp { flex: 1; }
.who { color: var(--muted); font-size: 13px; }

.main { max-width: 1080px; margin: 0 auto; padding: 26px 24px 60px; }
.connect-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 24px; margin-bottom: 22px; }
.connect-card h2 { font-size: 16px; margin-bottom: 6px; }
.connect-card .desc { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.connect-row { display: flex; gap: 10px; max-width: 460px; }
.sect-h { display: flex; align-items: center; margin: 4px 0 14px; }
.sect-h h3 { font-size: 15px; flex: 1; }
.sect-h .sec-acts { display: flex; gap: 8px; }

/* ============ 管理面板：左侧导航 + 单页切换 ============ */
.admin-wrap { display: flex; gap: 18px; align-items: flex-start; }
.admin-side { width: 172px; flex-shrink: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; position: sticky; top: 84px; }
.admin-side .as-title { font-size: 12px; color: var(--muted); padding: 4px 10px 10px; letter-spacing: .5px; }
.as-item { display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 11px 14px; border-radius: 8px; font-size: 13.5px; color: var(--muted); margin-bottom: 4px; transition: .15s; }
.as-item:hover { color: var(--primary); }
.as-item.on { background: #eef3ff; color: var(--primary); font-weight: 600; }
.admin-content { flex: 1; min-width: 0; }
.admin-pane { animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* 系统设置表单 */
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; max-width: 580px; }
.form-row { margin-bottom: 16px; }
.form-row > label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.form-row.inline { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-row.inline > label { margin-bottom: 0; }
.form-row .chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); cursor: pointer; }
.form-row .chk input { width: auto; }
.form-card .btn-p, .form-card .btn-g { padding: 9px 18px; }

.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.dev-card { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 18px; }
.dev-top { display: flex; align-items: flex-start; gap: 12px; }
.dev-ic { width: 42px; height: 42px; border-radius: 11px; background: #eef3ff;
  display: flex; align-items: center; justify-content: center; font-size: 21px; flex-shrink: 0; }
.dev-tt { flex: 1; min-width: 0; }
.dev-name { font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.dev-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.on { background: var(--green); box-shadow: 0 0 0 3px rgba(18,160,92,.15); }
.dot.off { background: #c3cad6; }
.badge { font-size: 11px; padding: 3px 8px; border-radius: 20px; font-weight: 600; flex-shrink: 0; }
.badge.on { background: #e8f7ef; color: var(--green); }
.badge.off { background: #f0f2f6; color: #98a1b0; }
.dev-code { font-family: "SF Mono", Consolas, monospace; font-size: 22px; font-weight: 700;
  letter-spacing: 3px; margin: 14px 0 2px; }
.dev-meta { color: var(--muted); font-size: 12px; margin-bottom: 14px; }
.dev-acts { display: flex; gap: 8px; }
.dev-acts .btn-p { flex: 1; padding: 8px; font-size: 13px; }

.tbl { width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tbl th, .tbl td { padding: 11px 14px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--line); }
.tbl th { background: #fafbfd; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .mono { font-family: Consolas, monospace; }

.list-row { display: flex; align-items: center; gap: 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.list-row .mono { font-family: Consolas, monospace; font-weight: 700; }
.empty { text-align: center; color: var(--muted); padding: 44px 0; font-size: 13.5px;
  background: var(--card); border: 1px dashed var(--line); border-radius: 12px; }

.modal { position: fixed; inset: 0; background: rgba(13,17,26,.5); z-index: 100;
  display: flex; align-items: center; justify-content: center; }
.modal-box { width: 380px; background: #fff; border-radius: 14px; padding: 26px 26px 20px; }
.modal-box h3 { font-size: 16px; margin-bottom: 16px; }
.modal-box label { display: block; font-size: 12.5px; color: var(--muted); margin: 12px 0 6px; }
.modal-acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* 权限配置弹窗 */
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 11px 0; border-bottom: 1px solid var(--line); }
.perm-row:last-of-type { border-bottom: 0; }
.perm-row .perm-t { font-size: 13.5px; }
.perm-row .perm-d { color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.perm-row input[type=checkbox] { width: auto; transform: scale(1.15); cursor: pointer; }
.perm-row input[type=checkbox]:disabled { cursor: not-allowed; opacity: .5; }

/* ============ 远程视图 ============ */
#view-remote { position: fixed; inset: 0; background: #0b0d12; display: flex; flex-direction: column; }
.stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#screen { background: #0b0d12; box-shadow: 0 0 60px rgba(0,0,0,.6); }
.overlay { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 16px;
  align-items: center; justify-content: center; background: rgba(11,13,18,.86); color: #dfe4ee; z-index: 5; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.18);
  border-top-color: #6f9dff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ov-text { font-size: 14px; }
.toolbar { position: relative; z-index: 10; flex: 0 0 auto; height: 42px; box-sizing: border-box;
  order: -1; display: flex; align-items: center; padding: 0 14px; gap: 14px;
  background: rgba(17,21,30,.92); color: #cfd6e4;
  transform: translateY(-100%); margin-top: -42px;
  transition: transform .25s, margin-top .25s; }
.toolbar.show { transform: translateY(0); margin-top: 0; }
.tb-btn.on { background: var(--primary); color: #fff; }
#tb-grip { position: fixed; top: 0; left: 50%; width: 88px; height: 5px; margin-left: -44px;
  z-index: 9; background: rgba(255,255,255,.25); border-radius: 0 0 6px 6px;
  opacity: 0; transition: opacity .25s; pointer-events: none; }
body.tb-hidden #tb-grip { opacity: 1; }
.tb-left { display: flex; align-items: center; gap: 10px; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 6px var(--green); }
#tb-name { font-weight: 600; color: #fff; }
.tb-meta { font-size: 12px; color: #8b94a7; }
.toolbar .sp { flex: 1; }
.tb-stat { font-size: 12px; color: #8b94a7; font-family: Consolas, monospace; }
.tb-btn, .toolbar select { background: rgba(255,255,255,.09); color: #dfe4ee; border: 0;
  border-radius: 7px; padding: 7px 13px; font-size: 12.5px; }
.tb-btn:hover { background: rgba(255,255,255,.16); }
.tb-btn.danger { background: rgba(229,72,77,.85); color: #fff; }
.toolbar select option { color: #161a22; }

/* 锁屏解锁浮层 */
.lockbar { position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 8;
  display: flex; gap: 14px; align-items: flex-start; width: min(520px, calc(100% - 40px));
  padding: 18px 20px; border-radius: 14px; background: rgba(23,28,40,.96);
  border: 1px solid rgba(255,255,255,.12); box-shadow: 0 18px 50px rgba(0,0,0,.55);
  color: #e6eaf3; backdrop-filter: blur(12px); }
.lock-icon { font-size: 22px; line-height: 1; }
.lock-body { flex: 1; }
.lock-title { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; }
.lock-sub { font-size: 12px; color: #97a1b6; line-height: 1.5; }
.lock-row { display: flex; gap: 8px; margin-top: 12px; }
.lock-row input { flex: 1; padding: 9px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.07); color: #fff; font-size: 13.5px; outline: none; }
.lock-row input:focus { border-color: #4d8bff; background: rgba(255,255,255,.1); }
.lock-row button { padding: 9px 20px; border: 0; border-radius: 8px; cursor: pointer;
  background: #2b6cf6; color: #fff; font-size: 13.5px; font-weight: 600; }
.lock-msg { font-size: 12px; color: #ffb4b4; margin-top: 8px; min-height: 15px; }

@media (max-width: 860px) {
  .features, .dl-grid, .steps { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .admin-wrap { flex-direction: column; }
  .admin-side { width: 100%; position: static; display: flex; gap: 8px; padding: 8px; }
  .admin-side .as-title { display: none; }
  .as-item { margin-bottom: 0; flex: 1; text-align: center; padding: 10px 8px; }
}
