* { margin: 0; padding: 0; box-sizing: border-box; }

:root{
  --bg1:#667eea;
  --bg2:#764ba2;

  --text:#101828;
  --muted:#667085;

  --border: rgba(16, 24, 40, 0.12);
  --shadow: 0 12px 32px rgba(16, 24, 40, 0.18);

  --primary:#2e8b57;
  --nav:#0b1220;
  --nav2:#111a2e;

  --ok:#12b76a;
  --warn:#f79009;
  --danger:#d92d20;
}

body{
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 600px at 15% 0%, rgba(255,255,255,0.18), transparent 55%),
              linear-gradient(135deg, var(--bg1) 0%, var(--bg2) 100%);
  min-height: 100vh;
}

.container{
  max-width: 980px;
  margin: 0 auto;
  padding: 0 18px;
}

/* NAV */
.navbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, var(--nav) 0%, var(--nav2) 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.nav-inner{
  padding: 14px 0;
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 16px;
}

.brand{ display:flex; flex-direction:column; line-height: 1.05; }
.logo{ font-size: 1.15rem; font-weight: 800; letter-spacing: 0.4px; }
.brand-sub{ font-size: 0.82rem; color: rgba(255,255,255,0.70); margin-top: 4px; }

.nav-links{
  display:flex;
  list-style:none;
  gap: 14px;
  flex-wrap: wrap;
}

.nav-link{
  display:inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  color:#fff;
  text-decoration:none;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.nav-link:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.18);
}

/* HERO */
.hero{
  text-align:center;
  color:#fff;
  margin: 28px 0 18px;
}
.hero h1{
  font-size: 2.35rem;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.subtitle{
  font-size: 1.05rem;
  color: rgba(255,255,255,0.88);
}

/* CARDS */
.card{
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(255,255,255,0.30);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.card-title{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card h2{ font-size: 1.25rem; margin: 0; }
.muted{ color: var(--muted); }

.pill{
  font-size: 0.82rem;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, #2f9d66 100%);
}

/* FORM */
.form-group{ margin-top: 6px; margin-bottom: 14px; }
.form-group label{ display:block; margin-bottom: 8px; color: var(--text); }
.form-group textarea{
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
  resize: vertical;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.form-group textarea:focus{
  border-color: rgba(46, 139, 87, 0.55);
  box-shadow: 0 0 0 4px rgba(46, 139, 87, 0.18);
}
.form-group small{
  display:block;
  margin-top: 8px;
  color: var(--muted);
}

/* BUTTONS */
.button-group{ display:flex; gap: 12px; margin: 14px 0 18px; }
.btn{
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  cursor:pointer;
  font-weight: 800;
  font-size: 0.98rem;
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn-primary{
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, #2f9d66 100%);
  box-shadow: 0 10px 22px rgba(18, 183, 106, 0.18);
}
.btn-primary:hover{ transform: translateY(-1px); }
.btn-secondary{ background: #eef2f7; color: var(--text); }
.btn-secondary:hover{ opacity: 0.92; }
.btn-sm{ padding: 8px 10px; border-radius: 10px; font-size: 0.9rem; }

/* RESULT */
.result-box{
  background: #0b1220;
  color: #e5e7eb;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
}

/* DASH CONTROLS */
.dash-controls{ display:flex; align-items:center; gap: 10px; flex-wrap: wrap; }
.select{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 700;
}

/* DASH TABLE */
.table-wrap{
  overflow: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
}

.table{
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.table th, .table td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(16, 24, 40, 0.08);
  vertical-align: top;
  font-size: 0.92rem;
}

.table th{
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 1;
  text-align: left;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #344054;
}

.table tr:nth-child(even) td{ background: rgba(16,24,40,0.02); }

.badge{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.82rem;
  border: 1px solid transparent;
}
.badge.positive{ color: #027a48; background: rgba(18,183,106,0.12); border-color: rgba(18,183,106,0.20); }
.badge.neutral{  color: #b54708; background: rgba(247,144,9,0.12);  border-color: rgba(247,144,9,0.22); }
.badge.negative{ color: #b42318; background: rgba(217,45,32,0.10);  border-color: rgba(217,45,32,0.22); }

.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
.truncate{ max-width: 520px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* FOOTER */
footer{
  text-align:center;
  color: rgba(255,255,255,0.85);
  padding: 22px 0 26px;
  margin-top: 10px;
}

/* RESPONSIVE */
@media (max-width: 820px){
  .hero h1{ font-size: 2.0rem; }
  .button-group{ flex-direction: column; }
  .nav-links{ gap: 10px; }
}
