:root {
  --brand: #5b5bf5;
  --brand-2: #8b5cf6;
  --ok: #10b981;
  --warn: #f59e0b;
  --danger: #ef4444;
  --page: #e9ecf6;
  --bg: #f6f7fb;
  --card: #ffffff;
  --soft: #f1f3fa;
  --text: #12141d;
  --muted: #6b7280;
  --line: #e8eaf2;
  --shadow: 0 10px 30px rgba(18, 20, 29, 0.07);
}

[data-theme="dark"] {
  --page: #05060b;
  --bg: #0b0d15;
  --card: #151826;
  --soft: #1c2030;
  --text: #f1f3fa;
  --muted: #8f96ab;
  --line: #232839;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--page);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.app {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
  box-shadow: 0 0 70px rgba(10, 12, 30, 0.1);
}

/* ------------------------------- hero ------------------------------- */

.hero {
  position: relative;
  padding: 18px 20px 32px;
  background: linear-gradient(165deg, #5b5bf5 0%, #7c3aed 52%, #a855f7 100%);
  color: #fff;
  border-radius: 0 0 30px 30px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  top: -150px;
  right: -100px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  position: relative;
  z-index: 2;
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  flex: none;
}

.logo svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  flex: 1;
  min-width: 0;
}

.brand-text h1 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text p {
  margin: 2px 0 0;
  font-size: 11.5px;
  opacity: 0.78;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: var(--soft);
  color: var(--muted);
  font-size: 15px;
  font-family: inherit;
}

.icon-btn.ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ------------------------------- dial ------------------------------- */

.dial {
  width: 196px;
  height: 196px;
  margin: 22px auto 0;
  position: relative;
  display: grid;
  place-items: center;
}

.dial-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 7px solid rgba(255, 255, 255, 0.18);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.dial.is-on .dial-ring {
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.12);
}

.dial.is-on::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(52, 211, 153, 0.35);
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.96);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.1);
    opacity: 0;
  }
}

.dial-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 5px;
  background: radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.05));
}

.dial-time {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.dial-time.small {
  font-size: 22px;
}

.dial-label {
  font-size: 12px;
  opacity: 0.82;
  letter-spacing: 0.4px;
}

.hero-actions {
  position: relative;
  z-index: 2;
}

.cta {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 24px auto 0;
  border: 0;
  border-radius: 999px;
  padding: 15px 24px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  background: #fff;
  color: #5b5bf5;
  box-shadow: 0 10px 24px rgba(24, 10, 70, 0.28);
  transition: transform 0.15s ease, opacity 0.2s ease;
}

.cta:active {
  transform: scale(0.97);
}

.cta.is-on {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: none;
}

.cta:disabled {
  opacity: 0.55;
  cursor: default;
}

/* --------------------------- 设备与线路 --------------------------- */

.link-btn {
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  padding: 2px 0;
}

.device-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.device {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.device-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--brand);
  flex: none;
}

.device-icon svg {
  width: 20px;
  height: 20px;
}

.device-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.device-main strong {
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-main span {
  font-size: 11.5px;
  color: var(--muted);
}

.device:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.device-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0 16px;
}

.device-actions:last-child {
  padding-bottom: 0;
}

.device-actions button {
  flex: 1;
  min-width: 74px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 8px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.device-actions button:active {
  background: var(--soft);
}

.device-actions button:disabled {
  opacity: 0.4;
  cursor: default;
}

.device-actions button.danger {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
}

.node-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.node {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 13px;
  padding: 11px 13px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

.node.current {
  border-color: var(--brand);
  background: rgba(91, 91, 245, 0.08);
}

.node-region {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--brand);
  background: var(--card);
  border-radius: 6px;
  padding: 3px 7px;
  flex: none;
}

.node-name {
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.node-tag {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.node.current .node-tag {
  color: var(--brand);
}

.empty-hint {
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
  padding: 18px 8px;
  line-height: 1.6;
}

/* ----------------------------- 配置弹层 ----------------------------- */

.qr-box {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  display: grid;
  place-items: center;
  min-height: 180px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
}

.qr-box svg {
  width: 180px;
  height: 180px;
  display: block;
}

.code-pill {
  background: var(--soft);
  border-radius: 12px;
  padding: 11px 13px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--muted);
  max-height: 132px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0 0 12px;
}

#cfgHint {
  display: block;
  margin: 0 0 10px;
  line-height: 1.5;
}

/* 设备类型选择 */
.kind-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.kind-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 13px;
  padding: 14px 6px;
  font-family: inherit;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}

.kind-btn svg {
  width: 22px;
  height: 22px;
}

.kind-btn.active {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(91, 91, 245, 0.09);
  font-weight: 600;
}

/* 切到「我的」时收起连接表盘，让账号信息直接露出来 */
body[data-tab="me"] .dial,
body[data-tab="me"] .hero-actions {
  display: none;
}

body[data-tab="me"] .hero {
  padding-bottom: 30px;
}

.hero-hint {
  text-align: center;
  font-size: 11.5px;
  opacity: 0.75;
  margin: 10px 0 0;
  min-height: 16px;
}

/* ---------------------------- overview ---------------------------- */

.overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: -26px 16px 0;
  padding: 14px 10px;
  background: var(--card);
  border-radius: 20px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 3;
  border: 1px solid var(--line);
}

.ov-item {
  text-align: center;
  min-width: 0;
}

.ov-label {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  margin-bottom: 4px;
}

.ov-value {
  font-size: 14px;
  font-weight: 700;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ov-value.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

/* ---------------------------- content ---------------------------- */

.content {
  padding: 18px 16px 0;
}

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.card-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.hint {
  font-size: 10.5px;
  color: var(--muted);
}

.notice {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.32);
  color: #b45309;
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 14px;
}

[data-theme="dark"] .notice {
  color: #fbbf24;
}

/* --------------------------- announcements --------------------------- */

.ann-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ann-item {
  --accent: var(--brand);
  padding: 10px 12px;
  border-radius: 13px;
  background: var(--soft);
  border-left: 3px solid var(--accent);
}

.ann-item[data-level="warn"] {
  --accent: var(--warn);
}

.ann-item[data-level="success"] {
  --accent: var(--ok);
}

.ann-title {
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ann-pin {
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

.ann-body {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.ann-time {
  font-size: 10px;
  color: var(--muted);
  opacity: 0.75;
  margin-top: 6px;
}

/* ------------------------------ plans ------------------------------ */

.plan-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.plan {
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 12px;
  background: var(--soft);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease;
}

.plan:active {
  transform: scale(0.98);
  border-color: var(--brand);
}

.plan-name {
  font-size: 12.5px;
  font-weight: 700;
}

.plan-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--brand);
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}

.plan-price small {
  font-size: 10.5px;
  font-weight: 500;
  margin-right: 1px;
}

.plan-desc {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.4;
}

.plan-dur {
  font-size: 10.5px;
  color: var(--brand);
  font-weight: 600;
  margin-top: 7px;
}

/* ----------------------------- profile ----------------------------- */

.profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 19px;
  color: #fff;
  background: linear-gradient(140deg, #5b5bf5, #a855f7);
  flex: none;
  text-transform: uppercase;
}

.profile-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-text strong {
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-text span {
  font-size: 11.5px;
  color: var(--muted);
}

.badge {
  font-size: 10.5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-weight: 600;
  flex: none;
}

.badge.on {
  background: rgba(16, 185, 129, 0.14);
  color: #0e9f6e;
}

/* ------------------------------ rows ------------------------------ */

.rows {
  display: flex;
  flex-direction: column;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.row:first-child {
  padding-top: 0;
}

.row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.row span {
  color: var(--muted);
}

.row em {
  font-style: normal;
  font-weight: 600;
  text-align: right;
}

.row em.dim {
  font-weight: 500;
  color: var(--muted);
}

/* ----------------------------- inputs ----------------------------- */

input:not([type="checkbox"]) {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--text);
  border-radius: 13px;
  padding: 13px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
}

input:not([type="checkbox"]):focus {
  border-color: var(--brand);
}

input::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

.form-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inline-form {
  display: flex;
  gap: 9px;
}

.inline-form input {
  flex: 1;
  min-width: 0;
}

.btn {
  border: 0;
  border-radius: 13px;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn-primary {
  width: 100%;
  border-radius: 999px;
  padding: 15px;
  font-size: 15px;
}

.btn-danger-ghost {
  width: 100%;
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.35);
  margin-bottom: 14px;
}

/* ----------------------------- switch ----------------------------- */

.switch {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  flex: none;
  border: 0;
  transition: background 0.2s ease;
  margin: 0;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease;
}

.switch:checked {
  background: var(--brand);
}

.switch:checked::after {
  transform: translateX(18px);
}

/* ----------------------------- tabbar ----------------------------- */

.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 20;
}

.tab {
  background: none;
  border: 0;
  font-family: inherit;
  padding: 10px 0 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.tab svg {
  width: 22px;
  height: 22px;
}

.tab.active {
  color: var(--brand);
}

/* ------------------------------ sheet ------------------------------ */

.sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 20, 0.55);
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border-radius: 26px 26px 0 0;
  padding: 16px 20px calc(24px + env(safe-area-inset-bottom));
  animation: slideUp 0.26s cubic-bezier(0.2, 0.8, 0.3, 1);
  max-height: 92vh;
  overflow: auto;
}

@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0.5;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.seg {
  display: flex;
  gap: 5px;
  background: var(--soft);
  padding: 4px;
  border-radius: 13px;
  flex: 1;
}

.seg-item {
  flex: 1;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13px;
  padding: 8px;
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 600;
}

.seg-item.active {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
}

.sheet-title {
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 700;
}

.form-error {
  margin: 0;
  font-size: 12px;
  color: var(--danger);
  background: rgba(239, 68, 68, 0.09);
  padding: 9px 12px;
  border-radius: 11px;
}

/* ------------------------------ toast ------------------------------ */

.toast-wrap {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  z-index: 80;
}

.toast {
  background: rgba(20, 22, 32, 0.93);
  color: #fff;
  font-size: 12.5px;
  padding: 10px 16px;
  border-radius: 12px;
  max-width: 88%;
  text-align: center;
  line-height: 1.45;
  animation: toastIn 0.2s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.toast.ok {
  background: rgba(16, 185, 129, 0.96);
}

.toast.err {
  background: rgba(239, 68, 68, 0.96);
}

@keyframes toastIn {
  from {
    transform: translateY(-8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ----------------------------- utility ----------------------------- */

.hidden {
  display: none !important;
}

.foot {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  opacity: 0.8;
  margin: 6px 0 0;
}

.debug-box {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 10.5px;
  color: var(--muted);
  background: var(--soft);
  border-radius: 11px;
  padding: 10px;
  margin-top: 10px;
  white-space: pre-wrap;
  word-break: break-all;
}

@media (min-width: 640px) {
  .sheet-wrap {
    align-items: center;
  }

  .sheet {
    border-radius: 24px;
    max-width: 400px;
  }
}

/* ==================== v2.1 三个页签 / 圆盘按钮 ==================== */

/* 圆盘变成按钮 */
button.dial {
  border: 0;
  padding: 0;
  background: none;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  transition: transform 0.15s ease;
}

button.dial:active {
  transform: scale(0.97);
}

.dial.text .dial-time,
.dial.is-busy .dial-time {
  font-size: 19px;
  letter-spacing: 0.6px;
}

.dial.text .dial-label,
.dial.is-busy .dial-label {
  font-size: 11.5px;
}

.dial-spin {
  display: none;
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-top-color: #ffffff;
  animation: dialspin 0.9s linear infinite;
}

.dial.is-busy .dial-spin {
  display: block;
}

@keyframes dialspin {
  to {
    transform: rotate(360deg);
  }
}

/* 延迟 / 丢包 */
.metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.82);
}

.metrics b {
  color: #fff;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-left: 2px;
}

.metric-sep {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.35);
}

/* 线路列表两行式 */
.node-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.node-name {
  flex: none;
}

.node-meta {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

/* 设备删除按钮 */
.device-del {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  padding: 6px 2px;
  cursor: pointer;
  font-family: inherit;
}

.device-del:active {
  color: var(--danger);
}

/* 套餐页脚注 */
.tip-line {
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  margin: 6px 0 0;
}

.tip-line b {
  color: var(--text);
  font-weight: 700;
}

/* 三栏底栏 */
.tabbar {
  grid-template-columns: repeat(3, 1fr);
}

/* 非「线路」页签收起圆盘 */
body[data-tab="me"] .dial,
body[data-tab="me"] .metrics,
body[data-tab="me"] .hero-actions,
body[data-tab="me"] .hero-hint,
body[data-tab="plans"] .dial,
body[data-tab="plans"] .metrics,
body[data-tab="plans"] .hero-actions,
body[data-tab="plans"] .hero-hint {
  display: none;
}

body[data-tab="plans"] .hero,
body[data-tab="me"] .hero {
  padding-bottom: 30px;
}

/* 线路卡片可折叠 */
.card-toggle {
  width: 100%;
  border: 0;
  background: none;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
  margin-bottom: 14px;
  text-align: left;
  align-items: center;
  -webkit-appearance: none;
}

.card-toggle .chev {
  width: 18px;
  height: 18px;
  color: var(--muted);
  flex: none;
  transition: transform 0.2s ease;
}

#nodeCard.is-open .card-toggle .chev {
  transform: rotate(180deg);
}

#nodeCard:not(.is-open) .card-toggle {
  margin-bottom: 0;
}

#nodeCard:not(.is-open) .node-list {
  display: none;
}

#nodeCard:not(.is-open) {
  padding-bottom: 16px;
}

/* 未登录时点头像栏去登录 */
.profile-clickable {
  cursor: pointer;
}

.profile-clickable:active {
  opacity: 0.85;
}
