/* Standalone stylesheet for the FastAPI mini-HubSpot app. */

* {
  box-sizing: border-box;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1f2430;
  background: #f7f8fa;
  margin: 0;
}
a {
  color: #2a5ad1;
}
h1 {
  font-size: 1.7rem;
}
h2 {
  font-size: 1.15rem;
  margin-top: 2rem;
  color: #333;
}

.muted {
  color: #6b7280;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.9rem 1.6rem;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}
.topnav .brand {
  font-weight: 700;
  color: #1f2430;
  text-decoration: none;
}
.topnav a {
  text-decoration: none;
  color: #4b5563;
  font-size: 0.92rem;
}
.topnav a:hover {
  color: #2a5ad1;
}
.nav-spacer {
  flex: 1 1 auto;
}
.nav-user {
  font-size: 0.85rem;
}

.login-box {
  max-width: 380px;
  margin: 4rem auto;
  text-align: center;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2.5rem 2rem;
}
.google-signin-button {
  display: inline-block;
  margin-top: 1.2rem;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  background: #2a5ad1;
  color: white;
  text-decoration: none;
  font-weight: 600;
}
.google-signin-button:hover {
  background: #1f45a8;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.6rem;
}

.list-search-form {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1rem;
}
.list-search-form input[type="text"] {
  flex: 1 1 auto;
  padding: 0.55rem 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
}
.list-search-form select {
  flex: 0 0 auto;
  padding: 0.55rem 0.7rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  background: white;
  max-width: 220px;
}
.list-search-form button {
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: 8px;
  background: #2a5ad1;
  color: white;
  font-weight: 600;
  cursor: pointer;
}
.list-search-form button:hover {
  background: #1f45a8;
}
.clear-link {
  font-size: 0.85rem;
}

.sort-links {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.sort-link {
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  color: #4b5563;
}
.sort-link:hover {
  border-color: #2a5ad1;
  color: #2a5ad1;
}
.sort-link-active {
  background: #2a5ad1;
  border-color: #2a5ad1;
  color: white;
  font-weight: 600;
}

.pagination {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin: 1.2rem 0;
}

.stat-card-static {
  cursor: default;
}
.stat-card-static:hover {
  border-color: #e5e7eb;
}

/* ---- Homepage ---- */
.home-hero {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.home-hero h1 {
  margin-top: 0;
}
.home-search-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.home-search {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.home-search label {
  font-weight: 600;
  font-size: 0.85rem;
  color: #444;
}
.home-search input[type="text"] {
  padding: 0.6rem 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
}
.home-search button {
  align-self: flex-start;
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: 8px;
  background: #2a5ad1;
  color: white;
  font-weight: 600;
  cursor: pointer;
}
.home-search button:hover {
  background: #1f45a8;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.stat-card:hover {
  border-color: #2a5ad1;
}
.stat-number {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1f2430;
}
.stat-label {
  font-size: 0.8rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---- Profile pages (contacts/companies) ---- */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.2rem;
}
.avatar {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a5ad1, #6d8ff0);
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}
.profile-heading h1 {
  margin: 0 0 0.15rem 0;
}
.profile-heading .subtitle {
  margin: 0 0 0.5rem 0;
  color: #4b5563;
}
.badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #eef2ff;
  color: #2a3aa8;
}
.badge-status {
  background: #fef3c7;
  color: #92400e;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.profile-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
}
.profile-card h3 {
  margin: 0 0 0.7rem 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6b7280;
}
.profile-card dl {
  margin: 0;
}
.profile-card dt {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.5rem;
}
.profile-card dt:first-child {
  margin-top: 0;
}
.profile-card dd {
  margin: 0 0 0.1rem 0;
  font-size: 0.95rem;
}

.chip-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.chip {
  display: block;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  text-decoration: none;
  color: inherit;
}
.chip:hover {
  border-color: #2a5ad1;
}
.chip strong {
  display: block;
  font-size: 0.95rem;
}
.chip span {
  display: block;
  font-size: 0.8rem;
  color: #6b7280;
}

table.profile-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}
table.profile-table th,
table.profile-table td {
  text-align: left;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid #eef0f2;
  font-size: 0.9rem;
}
table.profile-table th {
  background: #f9fafb;
  color: #6b7280;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
}
table.profile-table tr:last-child td {
  border-bottom: none;
}

.activity-kind {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #f1f5f9;
  color: #334155;
}

@media (max-width: 600px) {
  .profile-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
