/*
  GeoPoints → CSV (Native)
  Copyright © 2026 Devin Frederick
*/

:root{
  color-scheme: dark;
  --bg:#0b0d10;
  --card:#12161c;
  --card2:#0f1319;
  --border:#212a38;
  --border2:#2a3444;
  --text:#e8eef6;
  --muted:#9db0c6;
  --blue:#2f6dff;
  --blue2:#5f8cff;
  --radius:14px;
  --radius2:12px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
}

.wrap{
  max-width: 980px;
  margin:0 auto;
  padding: 26px 18px 44px;
}

.header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
h1{ margin:0 0 6px; font-size:28px; letter-spacing:.2px; }
.sub{ margin:0; color:var(--muted); }

.pill{
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: #0f1319;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  padding:16px;
}

.dropzone{
  border: 2px dashed var(--border2);
  background: var(--card2);
  border-radius: var(--radius2);
  padding: 22px;
  text-align:center;
  cursor:pointer;
  outline:none;
}
.dropzone.drag{
  border-color: var(--blue2);
}
.dz-title{ font-weight:700; font-size:16px; }
.dz-sub{ color:var(--muted); margin-top:6px; }
.link{ color:#7fb0ff; cursor:pointer; }
.link input{ display:none; }

.grid{
  margin-top: 14px;
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  align-items:end;
}
.field{
  display:grid;
  gap:6px;
  font-size: 13px;
  color: #c7d3e2;
}
.field input[type="text"], .field input[type="number"], .field select{
  background: var(--card2);
  color: var(--text);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 10px 10px;
}
.field.checkbox{
  grid-template-columns: auto 1fr;
  align-items:center;
  gap:10px;
  padding-top: 22px;
}
.field.checkbox input{
  width:18px;
  height:18px;
}

.actions{
  display:flex;
  gap:10px;
  margin-top:14px;
}
button{
  background: var(--blue);
  border:0;
  color:white;
  padding:10px 14px;
  border-radius: 10px;
  cursor:pointer;
  font-weight:700;
}
button:disabled{ opacity:.5; cursor:not-allowed; }
button.ghost{
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text);
}

.hr{
  height:1px;
  background: var(--border);
  margin: 16px 0;
}

.row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
}
.muted{ color: var(--muted); }

.fileList{
  margin-top: 10px;
  display:grid;
  gap:8px;
}
.fileItem{
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display:flex;
  justify-content:space-between;
  gap:10px;
}
.fileName{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fileMeta{ color: var(--muted); font-size: 13px; white-space:nowrap; }

.logWrap{
  margin-top: 16px;
}
.log{
  background: #0a0d12;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  max-height: 240px;
  overflow:auto;
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.35;
  color: #cfe0ff;
}

.footer{
  margin-top: 12px;
  font-size: 13px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

/* Fields panel */
.small{ font-size: 12px; }
.fieldsPanel{
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0f1319;
}
.fieldBtns{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.smallBtn{
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
}
.fieldsList{
  margin-top: 10px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.fieldChip{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #0a0d12;
}
.fieldChip input{ width: 18px; height: 18px; }
.fieldName{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width: 0;
}
.fieldName .k{
  font-size: 13px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.fieldName .t{
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 860px){
  .grid{ grid-template-columns: 1fr 1fr; }
  .fieldsList{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px){
  .grid{ grid-template-columns: 1fr; }
  .fieldsList{ grid-template-columns: 1fr; }
}
