/* Bloomberg-inspired: dark UI, high contrast, subtle borders, orange accent */

:root{
  --bg: #0b0f14;          /* near-black */
  --panel: #101722;       /* dark panel */
  --panel-2: #0e1520;     /* slightly different dark */
  --text: #e6edf6;        /* off-white */
  --muted: #9aa7b5;       /* muted text */
  --border: #1f2a37;      /* subtle borders */
  --accent: #ff9900;      /* Bloomberg-ish orange */
  --pos: #2dd4bf;         /* teal-ish positive */
  --neg: #ff5c5c;         /* red-ish negative */
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: var(--sans);
  background: radial-gradient(1200px 700px at 20% 0%, #121a26 0%, var(--bg) 55%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 18px 28px;
}

header {
  text-align: left;
  margin-bottom: 18px;
  padding: 14px 0 8px;
  border-bottom: 1px solid var(--border);
}

header h1 {
  font-size: 1.85rem;
  letter-spacing: 0.2px;
  font-weight: 700;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

header h1::after{
  content: "•";
  color: var(--accent);
  font-weight: 900;
  transform: translateY(-1px);
}

header p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Summary cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 18px 0 18px;
}

.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 153, 0, 0.35);
}

.card h3 {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
  font-family: var(--mono);
}

.card span {
  display: block;
  font-family: var(--mono);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text);
}

/* Sections */
.data-section,
.chart-section {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
}

.data-section h2,
.chart-section h2 {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.data-section h2::before,
.chart-section h2::before{
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,153,0,0.12);
}

/* Table */
.table-container { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 6px;
  font-size: 0.95rem;
}

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

th {
  position: sticky;
  top: 0;
  background: rgba(12, 18, 28, 0.9);
  backdrop-filter: blur(6px);
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
  font-family: var(--mono);
  border-bottom: 1px solid rgba(255,153,0,0.18);
}

tbody tr:hover {
  background: rgba(255, 153, 0, 0.06);
}

td {
  color: var(--text);
}

td:nth-child(1) { /* Symbol */
  font-family: var(--mono);
  font-weight: 700;
}

td:nth-child(3), td:nth-child(4) { /* EBITDA & Growth */
  font-family: var(--mono);
}

/* Data Quality chip-ish look (assumes you output text like "complete") */
td:nth-child(5) {
  font-family: var(--mono);
  color: var(--muted);
}

/* Positive/Negative styling (your JS already uses these classes) */
.positive {
  color: var(--pos);
  font-weight: 700;
}

.negative {
  color: var(--neg);
  font-weight: 700;
}

/* Chart container */
#chart-container {
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(255,153,0,0.18);
  border-radius: calc(var(--radius) - 2px);
  background: rgba(0,0,0,0.15);
}

#ebitda-chart {
  max-width: 100%;
  max-height: 100%;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  .container { padding: 16px 14px 22px; }

  header h1 { font-size: 1.55rem; }

  .summary-cards { grid-template-columns: 1fr; }

  th, td { padding: 10px 10px; font-size: 0.9rem; }
}
