:root {
  color-scheme: light;
  font-family: Inter, 'SF Pro', Arial, sans-serif;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --bg: #f9fafb;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #6b7280;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.page {
  padding-top: 24px;
  padding-bottom: 24px;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  min-height: 68px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-weight: 600;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.top-nav a.active {
  color: var(--text);
  font-weight: 600;
}

h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 0 0 12px;
}

h2 {
  font-size: 24px;
  margin: 0 0 12px;
}

p,
li,
td,
th {
  font-size: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.hero {
  background: #eff6ff;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 16px;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.btn-danger {
  background: #fee2e2;
  color: #b91c1c;
}

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

.actions-col {
  flex-direction: column;
}

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

.upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  background: #f8fafc;
  padding: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--border);
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}

.badge.normal {
  background: #dcfce7;
  color: #166534;
}

.badge.below {
  background: #fee2e2;
  color: #991b1b;
}

.badge.above,
.badge.warning {
  background: #fef3c7;
  color: #92400e;
}

.badge.unknown {
  background: #f3f4f6;
  color: #374151;
}

.alert {
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
}

.alert.info {
  background: #eff6ff;
}

.notice {
  margin-top: 8px;
  padding: 14px;
  border-radius: 10px;
  font-size: 14px;
  background: #fef3c7;
}

.status-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.analysis-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.analysis-item:last-child {
  border-bottom: 0;
}

.chart-placeholder {
  min-height: 160px;
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--muted);
  text-align: left;
  padding: 16px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: #f8fafc;
}

.kpi span {
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

.kpi strong {
  font-size: 26px;
}

@media (max-width: 900px) {
  .container {
    padding: 0 16px;
  }

  .grid-two,
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 28px;
  }
}


.analysis-result-placeholder {
  min-height: 160px;
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: var(--muted);
  text-align: left;
  padding: 16px;
  background: #f8fafc;
}

.analysis-result-card h3 {
  margin: 16px 0 8px;
  font-size: 18px;
}

.analysis-result-card p {
  margin: 0;
  line-height: 1.45;
}

.analysis-meta {
  margin-bottom: 8px;
  font-size: 13px;
}

.result-table-wrap {
  overflow-x: auto;
}
