:root {
  --bg: #fff;
  --text: #0f172a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #2563eb;
  --star: #f59e0b;
  --surface: #ffffff;
  --shadow: 0 4px 18px rgba(0,0,0,0.06);
  --radius: 14px;
}

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

.app {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--border);
  padding: 18px;
  background: #fafafa;
}

.sidebar h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 120px);
  overflow: auto;
}

.list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.list-item:hover { border-color: #d1d5db; }

.list-item .name { font-weight: 600; }
.list-item .meta { color: var(--muted); font-size: 12px; }

.main {
  padding: 24px;
}

.header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

input[type="text"] {
  width: 420px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
}

button {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}
button.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
button.danger {
  color: #ef4444;
  border-color: #fecaca;
  background: #fff5f5;
}

.results {
  margin: 10px 0 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.card {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.google-widget {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  width: fit-content;
}

.google-logo {
  width: 42px;
  height: 42px;
}

.widget-info { display: flex; flex-direction: column; gap: 4px; }
.widget-title { font-weight: 700; }
.stars { color: var(--star); font-size: 18px; }
.widget-sub { color: var(--muted); font-size: 13px; }
.widget-links a { color: var(--primary); text-decoration: none; font-size: 13px; }
.widget-links a:hover { text-decoration: underline; }

.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { height: 10px; }
hr { border: none; border-top: 1px solid var(--border); margin: 18px 0; }

.label-input { display:flex; gap:8px; align-items:center; }
.small { font-size: 12px; color: var(--muted); }
/* Autocomplete */
.autocomplete-wrap {
  position: relative;
  width: 420px;
}
.autocomplete-dropdown {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 1000;
  max-height: 300px;
  overflow: auto;
}
.autocomplete-item {
  padding: 10px 12px;
  cursor: pointer;
  display: grid;
  gap: 2px;
}
.autocomplete-item:hover {
  background: #f8fafc;
}
.autocomplete-primary { font-weight: 600; }
.autocomplete-secondary { font-size: 12px; color: var(--muted); }
.autocomplete-empty { padding: 10px 12px; color: var(--muted); }

