@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700;800&family=Instrument+Serif:ital@0;1&display=swap');

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

:root {
  --bg: #050508;
  --surface: #0c0c12;
  --border: #1e1e2e;
  --accent: #00ff9f;
  --accent-dim: #00cc7f;
  --text: #e0e0e0;
  --text-dim: #888;
  --mono: 'JetBrains Mono', monospace;
  --serif: 'Instrument Serif', serif;
}

body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Landing */
#landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  text-align: center;
}

#landing h1 {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

#landing h1 span { color: var(--accent); }

#landing .subtitle {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  max-width: 500px;
}

#drop-zone {
  width: 100%;
  max-width: 500px;
  padding: 3rem 2rem;
  border: 2px dashed var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--surface);
}

#drop-zone:hover, #drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(0, 255, 159, 0.03);
}

#drop-zone .icon { font-size: 3rem; margin-bottom: 1rem; }
#drop-zone p { color: var(--text-dim); font-size: 0.85rem; }
#drop-zone .formats { font-size: 0.75rem; color: var(--text-dim); margin-top: 0.5rem; opacity: 0.6; }

.btn-row { margin-top: 1.5rem; display: flex; gap: 1rem; }

.btn {
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover { background: var(--accent); color: var(--bg); }

.note {
  margin-top: 2rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  opacity: 0.5;
}

/* Report */
#report { display: none; }

.header-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.header-bar .back-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

.header-bar .back-btn:hover { border-color: var(--accent); color: var(--accent); }

#file-name { font-weight: 700; font-size: 1.1rem; }

.badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 700;
}

.header-bar .meta { color: var(--text-dim); font-size: 0.8rem; }

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 0 2rem;
  overflow-x: auto;
}

.tab-btn {
  font-family: var(--mono);
  font-size: 0.8rem;
  padding: 0.8rem 1.2rem;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-panel { display: none; padding: 2rem; }
.tab-panel.active { display: block; }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem;
}

.card.full { grid-column: 1 / -1; }
.card h3 { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.card p { font-size: 1.2rem; font-weight: 700; }
.card p small { font-size: 0.7rem; font-weight: 400; color: var(--text-dim); }

.producers-info div { margin-bottom: 0.3rem; font-size: 0.85rem; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 0.5rem;
}

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

th {
  color: var(--text-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

tr:hover td { background: rgba(0, 255, 159, 0.03); }

.mono { font-family: var(--mono); }
.dim { color: var(--text-dim); }
.empty { color: var(--text-dim); font-style: italic; padding: 1rem 0; }

/* Badges */
.badge-import { background: #ff6b6b; color: #fff; font-size: 0.7rem; padding: 0.1rem 0.5rem; border-radius: 3px; }
.badge-export { background: var(--accent); color: var(--bg); font-size: 0.7rem; padding: 0.1rem 0.5rem; border-radius: 3px; }
.badge-internal { background: var(--border); color: var(--text-dim); font-size: 0.7rem; padding: 0.1rem 0.5rem; border-radius: 3px; }

/* Search */
.search-input {
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  width: 100%;
  max-width: 400px;
  margin-bottom: 1rem;
}

.search-input:focus { outline: none; border-color: var(--accent); }

/* Imports/Exports */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; } }

.import-group { margin-bottom: 1.5rem; }
.import-group h4 { color: var(--accent); font-size: 0.85rem; margin-bottom: 0.5rem; }
.import-group ul, .export-list { list-style: none; }
.import-group li, .export-list li { padding: 0.4rem 0; font-size: 0.85rem; border-bottom: 1px solid var(--border); }

h3 { font-size: 1rem; margin-bottom: 0.8rem; color: var(--accent); }

/* Custom section details */
.custom-detail { margin-top: 1.5rem; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.custom-detail h4 { color: var(--accent); font-size: 0.9rem; margin-bottom: 0.5rem; }

/* Charts */
.chart { width: 100%; height: 400px; margin-bottom: 2rem; }

/* Footer */
.landing-footer {
  margin-top: 3rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  opacity: 0.5;
}

.landing-footer a { color: var(--text-dim); }
.landing-footer a:hover { color: var(--accent); }

/* Hidden file input */
#file-input { display: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* Static pages */
.page { max-width: 700px; margin: 0 auto; padding: 3rem 2rem; }
.page h1 { font-family: var(--serif); font-size: 2rem; margin-bottom: 1.5rem; }
.page h2 { font-size: 1.1rem; color: var(--accent); margin-top: 2rem; margin-bottom: 0.5rem; }
.page p, .page li { font-size: 0.85rem; line-height: 1.8; color: var(--text-dim); }
.page ul { padding-left: 1.5rem; }
.page a { color: var(--accent); }
.page .back-link { display: inline-block; margin-bottom: 2rem; font-size: 0.8rem; }
