/* predict.data.nexyo.io — nexyo brand
   Primary #1B6B93, Accent #00BFA6, Dark #1A1A2E, Light #F0F7FA, Font Inter */

:root {
  --primary: #1B6B93;
  --accent: #00BFA6;
  --dark: #1A1A2E;
  --light: #F0F7FA;
  --text: #1F2A33;
  --muted: #6B7B85;
  --warn: #B8740A;
  --border: #DDE6EB;
  --shadow: 0 2px 8px rgba(26, 26, 46, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--light);
  line-height: 1.5;
}

header {
  background: var(--dark);
  color: var(--light);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 3px solid var(--accent);
}
header .logo {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.2px;
}
header .tagline {
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
}
header .right {
  margin-left: auto;
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
  color: #cfd6dc;
}
header .right code {
  background: rgba(255,255,255,0.08);
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 11px;
}

main {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
}

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

h2 {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.field select, .field input[type=number] {
  width: 100%;
  padding: 9px 12px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
}
.field select:focus, .field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 191, 166, 0.18);
}
.row { display: flex; gap: 10px; }
.row .field { flex: 1; }

button.primary {
  width: 100%;
  padding: 12px 16px;
  background: var(--primary);
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.15s;
}
button.primary:hover:not(:disabled) { background: #145272; }
button.primary:disabled {
  background: var(--muted);
  cursor: progress;
  opacity: 0.7;
}

.status {
  font-size: 13px;
  margin-top: 14px;
  color: var(--muted);
}
.status.error { color: #B6253E; }

.chart-panel { min-height: 480px; display: flex; flex-direction: column; }
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.chart-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--dark);
}
.chart-meta {
  font-size: 12px;
  color: var(--muted);
}
.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.badge {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: var(--light);
  color: var(--primary);
  border: 1px solid var(--border);
}
.badge.accent {
  background: rgba(0, 191, 166, 0.12);
  color: #0a7e6e;
  border-color: rgba(0, 191, 166, 0.3);
}
.badge.warn {
  background: rgba(184, 116, 10, 0.12);
  color: var(--warn);
  border-color: rgba(184, 116, 10, 0.3);
}
.badge .label { color: var(--muted); font-weight: 500; margin-right: 4px; }

#chart-wrap {
  position: relative;
  flex: 1;
  min-height: 360px;
}
#chart-wrap canvas { width: 100% !important; height: 100% !important; }
#chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 360px;
  color: var(--muted);
  font-size: 14px;
  border: 1px dashed var(--border);
  border-radius: 6px;
}

footer {
  margin: 12px auto 32px;
  max-width: 1200px;
  padding: 0 24px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}
footer strong { color: var(--warn); font-weight: 600; }

@media (max-width: 820px) {
  main { grid-template-columns: 1fr; }
}
