:root {
  color-scheme: light;
  --bg: #f3f6fb;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-2: #0f4fdc;
  --border: #dbe3ef;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --good: #16a34a;
  --warning: #d97706;
  --bad: #dc2626;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #eef4ff 0%, var(--bg) 100%);
  color: var(--text);
  min-height: 100vh;
}

.app-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px 24px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-size: 22px;
  font-weight: 700;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

h1,
h2,
p {
  margin: 0;
}

.status-pill {
  background: #e8f0ff;
  color: var(--accent);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  margin-top: 24px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-header {
  margin-bottom: 18px;
}

.card-header h2 {
  font-size: 20px;
  margin-bottom: 6px;
}

.card-header p {
  color: var(--muted);
}

.input-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.input-row {
  display: flex;
  gap: 12px;
}

input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease;
}

input::placeholder {
  color: #9ca3af;
}

input:focus {
  border-color: var(--accent);
}

button {
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

button:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.result-panel {
  display: grid;
  gap: 12px;
}

.result-panel.hidden {
  display: none;
}

.summary-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f8fbff;
  border: 1px solid #e7effb;
}

.summary-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.status-badge {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.status-badge.good {
  background: rgba(22, 163, 74, 0.12);
  color: var(--good);
}

.status-badge.warning {
  background: rgba(217, 119, 6, 0.12);
  color: var(--warning);
}

.status-badge.bad {
  background: rgba(220, 38, 38, 0.12);
  color: var(--bad);
}

.status-badge.neutral {
  background: #edf2f7;
  color: var(--muted);
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  padding: 14px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e7effb;
}

.metric-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.metric-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.wifi-card {
  grid-column: span 2;
}

.detail-list {
  display: grid;
  gap: 8px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fbfdff;
  border: 1px solid #e7effb;
}

.detail-item span {
  color: var(--muted);
  font-size: 13px;
}

.detail-item strong {
  color: var(--text);
  text-align: right;
  font-size: 13px;
}

@media (max-width: 860px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .input-row {
    flex-direction: column;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .report-grid {
    grid-template-columns: 1fr;
  }

  .wifi-card {
    grid-column: auto;
  }
}
