/* devices.css — /devices 页设备管理。
   按 project_global_access_portal.md：MAC+device_id 四重锁。
   按 feedback_dashboard_minimal.md：极简，只管设备本身。 */

/* === Hero === */
.devices-hero {
  text-align: center;
  padding: 80px 48px 40px;
  max-width: 720px;
  margin: 0 auto;
}
.devices-meta {
  display: inline-flex;
  gap: 12px;
  padding: 10px 20px;
  background: var(--bg-soft);
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-soft);
  margin-top: 12px;
}
.devices-meta strong { color: var(--ink); font-weight: 600; }
.devices-meta .dot { color: var(--muted); }

/* === Device grid === */
.devices { padding-top: 40px; }
.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.device-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}
.device-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--ink-soft);
}
.device-card.current {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 98, 74, 0.08);
}

.device-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.device-icon {
  font-size: 36px;
  line-height: 1;
}

.device-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-soft);
}
.device-status .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}
.status-online {
  background: rgba(46, 184, 114, 0.12);
  color: #1F8F58;
}
.status-online .status-dot { background: #2EB872; }

.device-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.device-meta {
  list-style: none;
  flex: 1;
  margin-bottom: 20px;
  padding: 0;
}
.device-meta li {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 14px;
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--line);
}
.device-meta li:last-child { border-bottom: none; }
.device-meta li .muted { font-size: 13px; }
.device-meta code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  background: var(--bg-soft);
  padding: 2px 6px;
  border-radius: 4px;
}

.device-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* === Empty add-device card === */
.device-card.empty {
  background: var(--bg-soft);
  border: 2px dashed var(--line);
  text-align: center;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.device-card.empty:hover {
  border-color: var(--accent);
  background: var(--bg-card);
}
.device-card.empty h3 { margin-bottom: 8px; }
.device-card.empty p { font-size: 14px; line-height: 1.5; margin-bottom: 20px; max-width: 240px; }
.empty-icon {
  font-size: 48px;
  font-weight: 200;
  color: var(--muted);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  line-height: 1;
}

/* === Small + Danger button variants === */
.btn-small { padding: 10px 18px; font-size: 14px; }
.btn-danger {
  background: transparent;
  color: #C0473A;
  border: 1px solid rgba(192, 71, 58, 0.25);
}
.btn-danger:hover {
  background: rgba(192, 71, 58, 0.08);
  border-color: #C0473A;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* === Trust grid === */
.devices-trust { max-width: 1000px; }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.trust-item {
  background: var(--bg-card);
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.trust-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.trust-item h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.trust-item p { font-size: 14px; line-height: 1.6; }

/* === Responsive === */
@media (max-width: 768px) {
  .devices-hero { padding: 48px 24px 32px; }
  .device-card { padding: 24px; }
  .device-card.empty { min-height: 220px; }
  .device-meta li { font-size: 13px; }
  .device-actions { width: 100%; }
  .device-actions .btn { flex: 1; }
}
