:root {
  --c-primary: #0288D1;
  --c-primary-d: #0277bd;
  --c-bg: #F4FAFD;
  --c-text: #1f2d3d;
  --c-text-weak: #7F8FA3;
  --c-line: rgba(2, 136, 209, 0.15);
  --radius: 20rpx;
  --shadow: 0 10rpx 30rpx rgba(2, 136, 209, 0.12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(160deg, #e8f4fb 0%, #f4fafd 40%, #ffffff 100%);
  color: var(--c-text);
  min-height: 100vh;
}
.hidden { display: none !important; }

.glass {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
}
.glass-solid {
  background: #ffffff;
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow);
}

/* 登录 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 360px; max-width: 90vw; border-radius: 24px; padding: 40px 32px; text-align: center; }
.login-logo { font-size: 56px; }
.login-title { font-size: 22px; margin: 12px 0 4px; color: var(--c-primary); }
.login-sub { color: var(--c-text-weak); font-size: 13px; margin-bottom: 24px; }
.login-card .ipt { width: 100%; margin-bottom: 14px; }

/* 输入 */
.ipt {
  border: 1px solid var(--c-line);
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--c-text);
  outline: none;
  transition: border-color .2s;
}
.ipt:focus { border-color: var(--c-primary); }
.ipt.sm { width: 160px; }

.btn-primary {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-d));
  color: #fff; border: none; border-radius: 12px;
  padding: 12px 20px; font-size: 15px; font-weight: 600; cursor: pointer;
  width: 100%;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost {
  background: transparent; border: 1px solid var(--c-line); color: var(--c-primary);
  border-radius: 12px; padding: 8px 16px; cursor: pointer; font-size: 14px;
}
.btn-ghost:hover { background: rgba(2,136,209,0.06); }

/* 顶栏 */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-radius: 0; }
.brand { font-size: 18px; font-weight: 700; color: var(--c-primary); }

/* tabs */
.tabs { display: flex; gap: 8px; padding: 16px 24px 0; }
.tab {
  background: rgba(255,255,255,0.7); border: 1px solid var(--c-line); color: var(--c-text-weak);
  border-radius: 12px 12px 0 0; padding: 10px 22px; font-size: 15px; cursor: pointer;
}
.tab.active { background: #fff; color: var(--c-primary); font-weight: 700; border-bottom: 2px solid var(--c-primary); }

/* 内容 */
.content { padding: 20px 24px 60px; max-width: 980px; margin: 0 auto; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-head h2 { font-size: 18px; color: var(--c-text); }

.table-wrap { border-radius: 16px; overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--c-line); }
.tbl th { background: #f0f8fd; color: var(--c-primary); font-weight: 600; }
.tbl tr:last-child td { border-bottom: none; }
.tag-on { color: #1ca05a; font-weight: 600; }
.tag-off { color: #b0b0b0; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { border-radius: 16px; padding: 20px; }
.card h3 { color: var(--c-primary); margin-bottom: 14px; font-size: 16px; }
.row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; gap: 12px; font-size: 14px; }
.row.col { flex-direction: column; align-items: stretch; gap: 6px; }
.row.col span { color: var(--c-text-weak); font-size: 13px; }
.msg { margin-top: 14px; color: #1ca05a; font-size: 14px; }

/* 弹窗 */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-mask { position: absolute; inset: 0; background: rgba(15, 40, 60, 0.35); backdrop-filter: blur(2px); }
.modal-box { position: relative; width: 440px; max-width: 94vw; max-height: 88vh; overflow-y: auto; border-radius: 20px; padding: 24px; }
.modal-box h3 { color: var(--c-primary); margin-bottom: 16px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 16px; }
.modal-actions .btn-primary { width: auto; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  background: rgba(31,45,61,0.92); color: #fff; padding: 12px 22px; border-radius: 12px; font-size: 14px; z-index: 99;
}
.err { color: #e5484d; font-size: 13px; margin-top: 10px; min-height: 16px; }
.act-link { color: var(--c-primary); cursor: pointer; margin-right: 12px; font-size: 13px; }
.act-del { color: #e5484d; cursor: pointer; font-size: 13px; }
@media (max-width: 720px) { .cards { grid-template-columns: 1fr; } }
