* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --surface: #fff;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e2e8f0;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Header */
.header {
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
  font-weight: 700;
}

.btn-login {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--surface);
  background: var(--accent);
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
}

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

.tagline {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 1rem;
}

/* Main */
.main {
  flex: 1;
  max-width: 56rem;
  margin: 0 auto;
  padding: 1.5rem;
  width: 100%;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

#search {
  flex: 1;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

#search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.count {
  color: var(--text-muted);
  font-size: 0.875rem;
  white-space: nowrap;
}

/* Sites list – grid, scalable to many items */
.sites-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sites-list .site-card {
  display: block;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sites-list .site-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.sites-list .site-card .name {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.sites-list .site-card .path {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
}

.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}

.empty.hidden {
  display: none;
}

/* Footer */
.footer {
  padding: 1rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

@media (min-width: 640px) {
  .header h1 { font-size: 2rem; }
  .sites-list { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
}
