/* 关键：hidden 属性必须真正隐藏，否则 display:flex 等作者样式会覆盖浏览器默认规则 */
[hidden] { display: none !important; }
:root {
  --bg: #0b1730;
  --bg-2: #101f3c;
  --card: rgba(24, 40, 70, 0.92);
  --card-border: rgba(120, 160, 220, 0.22);
  --text: #eef3fb;
  --muted: #9aa9c4;
  --accent: #ffd15c;
  --accent-soft: rgba(255, 209, 92, 0.14);
  --blue: #4d8dff;
  --green: #2fbf87;
  --radius: 16px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

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

body.customer-body {
  min-height: 100vh;
  background: radial-gradient(120% 90% at 50% 0%, #16305c 0%, #0b1730 55%, #08101f 100%);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding: 28px 18px 36px;
}

.customer-shell { width: 100%; max-width: 480px; margin: 0 auto; }

.view { animation: fade 0.28s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { text-align: center; margin: 12px 0 20px; }
.page-head h1 { font-size: 24px; font-weight: 600; letter-spacing: 0.5px; margin: 0 0 6px; }
.page-sub { margin: 0; color: var(--muted); font-size: 13.5px; }

.warn-banner {
  display: flex; align-items: center; gap: 10px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 209, 92, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
.warn-banner p { margin: 0; color: var(--accent); font-size: 14.5px; font-weight: 500; }
.warn-banner strong { font-weight: 700; }
.warn-icon {
  flex: 0 0 20px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #4a3400;
  font-size: 13px; font-weight: 700; line-height: 20px; text-align: center;
}

.countdown-row { display: flex; align-items: center; gap: 8px; margin: 0 4px 14px; }
.clock {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.6px solid var(--text); position: relative;
}
.clock::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 1.6px; height: 5px; background: var(--text);
  transform: translate(-50%, -100%); transform-origin: bottom center;
}
.countdown-label { color: var(--text); font-size: 15px; }
.countdown-value { color: var(--accent); font-size: 17px; font-weight: 700; letter-spacing: 0.6px; font-variant-numeric: tabular-nums; }

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

.device-card {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px 14px;
  color: inherit; font-family: inherit;
  cursor: pointer;
  transition: border-color 0.18s, transform 0.12s, background 0.18s;
}
.device-card:hover:not(:disabled) { border-color: rgba(120, 170, 255, 0.55); background: #16294b; }
.device-card:active:not(:disabled) { transform: scale(0.995); }
.device-card:disabled { opacity: 0.45; cursor: not-allowed; }

.device-icon {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 12px;
  background: #f4f7fc; position: relative;
}
.icon-phone .phone-body {
  position: absolute; left: 14px; top: 10px; width: 18px; height: 26px;
  border: 2.5px solid #2f7ce0; border-radius: 5px;
}
.icon-phone .phone-dot {
  position: absolute; left: 21px; top: 13px; width: 4px; height: 4px;
  background: #2f7ce0; border-radius: 50%; opacity: 0.65;
}
.icon-pc .pc-screen {
  position: absolute; left: 9px; top: 11px; width: 28px; height: 18px;
  border: 2.5px solid #e6a33a; border-radius: 4px;
}
.icon-pc .pc-base {
  position: absolute; left: 15px; top: 31px; width: 16px; height: 2.5px;
  background: #e6a33a; border-radius: 2px;
}

.device-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.device-text strong { font-size: 16px; font-weight: 600; }
.device-text small { color: var(--muted); font-size: 12.5px; }
.device-expiry { color: var(--accent); font-size: 12px; font-style: normal; }
.device-expiry:empty { display: none; }

.chev {
  flex: 0 0 8px; width: 8px; height: 8px; margin-right: 4px;
  border-right: 2px solid rgba(220, 232, 255, 0.75);
  border-bottom: 2px solid rgba(220, 232, 255, 0.75);
  transform: rotate(-45deg);
}

.guide-box {
  margin-top: 18px;
  background: rgba(70, 110, 190, 0.22);
  border: 1px solid rgba(110, 150, 235, 0.35);
  border-radius: 12px;
  padding: 14px 16px;
}
.guide-box p { margin: 0 0 6px; font-size: 13.5px; color: #dbe6fb; }
.guide-box p:last-child { margin-bottom: 0; }

.status-line { min-height: 20px; margin: 12px 2px 0; color: var(--accent); font-size: 13px; text-align: center; }

.card-panel {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 6px 16px; margin-bottom: 18px;
}
.panel-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid rgba(120, 160, 220, 0.14);
}
.panel-row:last-child { border-bottom: 0; }
.panel-label { color: var(--muted); font-size: 13.5px; }
.panel-value { font-size: 15px; font-weight: 600; text-align: right; }
.panel-value.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: 0.4px; }
.panel-value.accent { color: var(--accent); }

.primary-btn {
  display: block; width: 100%;
  background: linear-gradient(180deg, #4d8dff, #2f6fe0);
  color: #fff; border: 0; border-radius: 12px;
  padding: 14px 18px; font-size: 16px; font-weight: 600;
  text-align: center; text-decoration: none; cursor: pointer;
  font-family: inherit;
}
.primary-btn:active { transform: translateY(1px); }
.primary-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.ghost-btn {
  background: transparent; color: var(--text);
  border: 1px solid rgba(160, 190, 240, 0.4); border-radius: 12px;
  padding: 13px 18px; font-size: 15px; font-family: inherit; cursor: pointer;
}

.hint { color: var(--muted); font-size: 12.5px; text-align: center; margin: 12px 4px 0; }
.foot-note { color: rgba(154, 169, 196, 0.7); font-size: 12px; text-align: center; margin: 26px 0 0; }

.notice-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: var(--radius); padding: 28px 22px; text-align: center;
}
.notice-card h1 { font-size: 19px; margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.notice-card a { color: var(--blue); }

.confirm-mask {
  position: fixed; inset: 0; background: rgba(4, 10, 22, 0.72);
  display: flex; align-items: center; justify-content: center; padding: 22px; z-index: 20;
}
.confirm-mask[hidden] { display: none; }
.confirm-box {
  width: 100%; max-width: 380px; background: #16264a;
  border: 1px solid rgba(120, 160, 220, 0.3); border-radius: 18px;
  padding: 22px 20px;
}
.confirm-box h2 { margin: 0 0 8px; font-size: 17px; }
.confirm-box p { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }
.confirm-actions { display: flex; gap: 10px; }
.confirm-actions > * { flex: 1; }

@media (max-width: 360px) {
  body.customer-body { padding: 20px 12px 30px; }
  .page-head h1 { font-size: 21px; }
  .device-text strong { font-size: 15px; }
}
