@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  color-scheme: light;
  --bg: #EFF7F6;
  --card: #FFFFFF;
  --text: #233937;
  --text-secondary: #587370;
  --border: #DCEAE8;
  --accent: #2E9C8F;
  --accent-hover: #237E72;
}

body {
  font-family: 'Inter', sans-serif;
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
  background: var(--bg);
  color: var(--text);
}

h1, h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
}

h1 {
  font-size: 1.5rem;
}

form {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
}

input, textarea, select {
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
}

textarea {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
}

button {
  padding: 0.6rem 1rem;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: var(--card);
  cursor: pointer;
}

button:hover {
  background: var(--accent-hover);
}

button:disabled {
  background: var(--border);
  color: var(--text-secondary);
  cursor: default;
}

a {
  color: var(--accent);
}

.error-banner {
  background: #FAEAE5;
  color: #9C3B1F;
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.hidden {
  display: none;
}

.status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.map-layout {
  display: flex;
  gap: 12px;
  height: 520px;
}

.lead-list {
  width: 25%;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.lead-item {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.lead-item:last-child {
  border-bottom: none;
}

.lead-item:hover {
  background: var(--bg);
}

.lead-name {
  font-weight: 700;
  font-size: 0.85rem;
  margin: 0 0 2px;
}

.lead-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
}

.expand-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.75rem;
}

.company-meta {
  color: var(--text-secondary);
  margin: 0.2rem 0;
}

.company-section {
  margin-top: 1.5rem;
}

.company-table {
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.company-table td {
  padding: 0.3rem 0.8rem 0.3rem 0;
  font-size: 0.9rem;
}

.company-table td:first-child {
  color: var(--text-secondary);
}

#map {
  width: 75%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}

.map-pin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--card);
}

.mapboxgl-popup-content {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: var(--text);
}

.login-form {
  max-width: 320px;
  margin-top: 2rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.site-logo {
  height: 40px;
  width: auto;
}

.nav-links {
  font-size: 0.85rem;
  white-space: nowrap;
}

.username-line {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: -0.5rem;
}

.info-banner {
  background: #DDEFEC;
  color: #1F6B5F;
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.settings-form {
  max-width: 480px;
}

.optional {
  color: var(--text-secondary);
  font-weight: normal;
}

.hint {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: -0.5rem;
}

.connection-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
  max-width: 700px;
}

.connection-card {
  display: block;
  width: 100%;
  height: 100%;
  text-align: left;
  background: var(--card);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  cursor: pointer;
}

.connection-card:hover {
  border-color: var(--accent);
}

.connection-card.current {
  border-color: var(--accent);
  background: var(--card);
}

.connection-card h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
}

.connection-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.current-badge {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--accent);
}

code {
  font-family: ui-monospace, monospace;
  background: var(--bg);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
}
