:root {
  --ink: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --surface: #ffffff;
  --page: #f8fafc;
  --cta: #ff7a20;
  --cta-hover: #e86812;
  --danger: #dc2626;
  --font: "Outfit", system-ui, sans-serif;
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  background: var(--page);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.admin-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 1.5rem);
  min-height: 100dvh;
}

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

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.admin-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: #e2e8f0;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.link-out {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cta);
  text-decoration: none;
}

.link-out:hover {
  text-decoration: underline;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.login-panel {
  max-width: 400px;
  margin: 2rem auto;
  animation: rise 0.45s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-panel h1 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
}

.muted {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-form label span {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.login-form input {
  width: 100%;
  font: inherit;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 48px;
}

.login-form input:focus {
  outline: none;
  border-color: rgba(255, 122, 32, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 122, 32, 0.18);
}

.login-form button {
  margin-top: 0.25rem;
  font: inherit;
  font-weight: 700;
  padding: 0.875rem;
  border: none;
  border-radius: 8px;
  background: var(--cta);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.login-form button:hover {
  background: var(--cta-hover);
}

.error {
  color: var(--danger);
  font-size: 0.875rem;
  margin: 0;
}

.error.hidden,
.hidden {
  display: none !important;
}

.dash-panel h1 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 800;
}

.dash-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.toolbar-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-ghost {
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
  color: var(--ink);
  transition: background 0.2s, border-color 0.2s;
}

.btn-ghost:hover {
  background: var(--page);
  border-color: #cbd5e1;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 0.5rem;
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.leads-table th,
.leads-table td {
  text-align: left;
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.leads-table th {
  font-weight: 700;
  background: #f1f5f9;
  white-space: nowrap;
}

.leads-table tbody tr:last-child td {
  border-bottom: none;
}

.leads-table tbody tr:hover {
  background: #fafafa;
}

.cell-copy {
  white-space: nowrap;
}

.btn-copy {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  color: var(--ink);
}

.btn-copy:hover {
  border-color: var(--cta);
  color: var(--cta);
}

.btn-copy.copied {
  border-color: #22c55e;
  color: #15803d;
}

.empty-hint {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

code {
  font-size: 0.8em;
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

@media (max-width: 900px) {
  .leads-table th:nth-child(5),
  .leads-table td:nth-child(5) {
    max-width: 140px;
    word-break: break-word;
  }
}
