*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0d0d0f;
  color: #e8e8ed;
  min-height: 100vh;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 16px 64px;
}

header {
  text-align: center;
  margin-bottom: 32px;
}

.site-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.home-btn {
  display: inline-block;
  background: #1c1c1e;
  border: 1px solid #3a3a3c;
  color: #e8e8ed;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.home-btn:hover {
  background: #2c2c2e;
  border-color: #636366;
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0a84ff, #5e5ce6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.notice-danger {
  background: #2e0d0d;
  border: 1px solid #ff453a;
  border-left: 3px solid #ff453a;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #ff6b6b;
  font-weight: 600;
  line-height: 1.7;
  display: inline-block;
  text-align: left;
  margin-bottom: 20px;
}

.notice {
  background: #1c1c1e;
  border: 1px solid #3a3a3c;
  border-left: 3px solid #ff9f0a;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #aeaeb2;
  line-height: 1.7;
  display: inline-block;
  text-align: left;
  margin-bottom: 20px;
}

.meta {
  font-size: 0.85rem;
  color: #636366;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.btn-refresh {
  background: none;
  border: 1px solid #3a3a3c;
  color: #0a84ff;
  padding: 3px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.82rem;
  transition: background 0.15s, border-color 0.15s;
}
.btn-refresh:hover { background: #1c1c1e; border-color: #0a84ff; }
.btn-refresh:disabled { opacity: 0.5; cursor: not-allowed; }

.loading {
  text-align: center;
  color: #636366;
  padding: 60px 0;
  font-size: 0.95rem;
}

.error-msg {
  text-align: center;
  color: #ff453a;
  padding: 20px;
  font-size: 0.9rem;
}

/* Cards grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.card {
  background: #1c1c1e;
  border: 1px solid #3a3a3c;
  border-radius: 12px;
  padding: 16px;
  transition: border-color 0.2s;
}
.card:hover { border-color: #636366; }

.card.status-normal  { border-left: 3px solid #30d158; }
.card.status-abnormal { border-left: 3px solid #ff453a; }
.card.status-pending { border-left: 3px solid #ff9f0a; }
.card.status-detecting { border-left: 3px solid #0a84ff; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.source-label {
  font-size: 0.72rem;
  color: #636366;
  background: #2c2c2e;
  padding: 2px 8px;
  border-radius: 10px;
}

.status-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.status-badge.normal   { background: #0d2e1a; color: #30d158; }
.status-badge.abnormal { background: #2e0d0d; color: #ff453a; }
.status-badge.pending  { background: #2e1e00; color: #ff9f0a; }
.status-badge.detecting { background: #001a2e; color: #0a84ff; }
.status-badge.unknown  { background: #2c2c2e; color: #aeaeb2; }

.field {
  margin-bottom: 10px;
}

.field-label {
  font-size: 0.7rem;
  color: #636366;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.field-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-value {
  flex: 1;
  background: #2c2c2e;
  border: 1px solid #3a3a3c;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.88rem;
  font-family: "SF Mono", "Menlo", monospace;
  color: #e8e8ed;
  word-break: break-all;
  min-width: 0;
}

.btn-copy {
  flex-shrink: 0;
  background: #2c2c2e;
  border: 1px solid #3a3a3c;
  color: #0a84ff;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-copy:hover { background: #3a3a3c; }
.btn-copy.copied { color: #30d158; }

.card-footer {
  margin-top: 12px;
  font-size: 0.72rem;
  color: #48484a;
  display: flex;
  justify-content: space-between;
}

/* Empty state */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: #48484a;
}
