@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --background: 36 45% 98%;
  --foreground: 222 47% 11%;
  --card: 0 0% 100%;
  --card-foreground: 222 47% 11%;
  --muted: 210 40% 96%;
  --muted-foreground: 215 16% 47%;
  --primary: 222 47% 11%;
  --primary-foreground: 0 0% 100%;
  --accent: 200 38% 93%;
  --accent-foreground: 222 47% 11%;
  --border: 214 32% 91%;
  --ring: 215 20% 65%;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  color: hsl(var(--foreground));
  background:
    radial-gradient(1200px 600px at 5% -10%, rgba(246, 226, 195, 0.75), transparent 60%),
    radial-gradient(900px 500px at 100% 10%, rgba(191, 215, 255, 0.45), transparent 60%),
    #f9f7f3;
  min-height: 100vh;
}

[v-cloak] {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1c2331, #3e4a68);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
}

.card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
  padding: 24px;
}

.card-header {
  margin-bottom: 18px;
}

.card-title {
  font-size: 22px;
  margin: 0 0 6px;
}

.card-subtitle {
  margin: 0;
  color: hsl(var(--muted-foreground));
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  font-size: 14px;
  background: #fff;
  color: hsl(var(--foreground));
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: hsl(var(--ring));
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}

.btn-primary {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: hsl(var(--border));
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: hsl(var(--accent));
  color: hsl(var(--accent-foreground));
}

.notice {
  padding: 10px 14px;
  border-radius: 12px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 14px;
}

.error {
  padding: 10px 14px;
  border-radius: 12px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 14px;
}

.zone-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.zone-row .btn {
  padding: 10px 12px;
}

.footer {
  margin-top: 28px;
  color: hsl(var(--muted-foreground));
  font-size: 13px;
}

.list {
  display: grid;
  gap: 12px;
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid hsl(var(--border));
  background: #fff;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

.muted {
  color: hsl(var(--muted-foreground));
  font-size: 13px;
}

.chart {
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  padding: 14px;
  background:
    radial-gradient(120px 80px at 10% 20%, rgba(99, 102, 241, 0.08), transparent 60%),
    radial-gradient(140px 90px at 90% 10%, rgba(34, 197, 94, 0.08), transparent 60%),
    #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.chart svg {
  width: 100%;
  height: 120px;
  display: block;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  margin-top: 8px;
  color: hsl(var(--muted-foreground));
}

.legend-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #1f2937;
}

.dot-risk {
  background: #ef4444;
}

.dot-reward {
  background: #22c55e;
}

.dot-entry {
  background: #0f172a;
}

.dot-avg {
  background: #6366f1;
}

.chart-caption {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-top: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid hsl(var(--border));
  background: #fff;
  font-weight: 600;
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #94a3b8;
}

.status-online .status-dot {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.status-offline .status-dot {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.meter {
  display: grid;
  place-items: center;
  padding: 16px 8px;
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  background:
    radial-gradient(140px 90px at 15% 20%, rgba(239, 68, 68, 0.08), transparent 60%),
    radial-gradient(160px 100px at 90% 10%, rgba(34, 197, 94, 0.08), transparent 60%),
    #f8fafc;
  position: relative;
  min-height: 220px;
}

.meter canvas {
  width: 180px;
  height: 180px;
  display: block;
}

.meter-track {
  stroke: rgba(148, 163, 184, 0.35);
  stroke-width: 12;
  fill: none;
}

.meter-risk {
  stroke: #ef4444;
  stroke-width: 12;
  fill: none;
  stroke-linecap: round;
}

.meter-reward {
  stroke: #22c55e;
  stroke-width: 12;
  fill: none;
  stroke-linecap: round;
}

.meter-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.meter-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: hsl(var(--muted-foreground));
}

.meter-value {
  font-size: 24px;
  font-weight: 700;
  margin-top: 6px;
}

.meter-sub {
  font-size: 12px;
  color: hsl(var(--muted-foreground));
  margin-top: 4px;
}

@media (max-width: 900px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .zone-row {
    grid-template-columns: 1fr;
  }
}
