/* Admin styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5; color: #1a1a1a; line-height: 1.5;
}
a { color: #D64545; text-decoration: none; }
a:hover { text-decoration: underline; }

.admin-header {
  background: #1a1a1a; color: #fff; padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-header h1 { font-size: 1.25rem; font-weight: 600; }
.admin-header h1 a { color: #fff; }
.admin-header h1 a:hover { text-decoration: none; }
.admin-header .user-info { font-size: 0.875rem; display: flex; align-items: center; gap: 1rem; }
.admin-header .user-info a { color: #D64545; }

.admin-layout { display: flex; min-height: calc(100vh - 60px); }
.admin-sidebar {
  width: 240px; background: #2a2a2a; color: #ccc; padding: 1.5rem 0;
  flex-shrink: 0;
}
.admin-sidebar a {
  display: block; color: #b3b3b3; padding: 0.625rem 1.5rem;
  font-size: 0.875rem; transition: all 0.2s;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: rgba(214,69,69,0.15); color: #D64545; text-decoration: none;
}
.admin-sidebar .nav-label {
  padding: 1rem 1.5rem 0.25rem; font-size: 0.75rem; text-transform: uppercase;
  font-weight: 600; color: #666; letter-spacing: 0.05em;
}

.admin-content { flex: 1; padding: 2rem; overflow-x: auto; }
.admin-content h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: 1.5rem; }
.admin-content h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.75rem; margin-top: 1.5rem; }

.card {
  background: #fff; border-radius: 0.5rem; border: 1px solid #e0e0e0;
  padding: 1.5rem; margin-bottom: 1.5rem;
}
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }

.dash-stat {
  padding: 1.25rem; background: #fff; border-radius: 0.5rem;
  border: 1px solid #e0e0e0;
}
.dash-stat .value { font-size: 2rem; font-weight: 700; color: #D64545; }
.dash-stat .label { font-size: 0.875rem; color: #666; margin-top: 0.25rem; }

table { width: 100%; border-collapse: collapse; }
table th, table td {
  padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #e0e0e0;
  font-size: 0.875rem;
}
table th { font-weight: 600; background: #fafafa; color: #666; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; }
table tr:hover { background: #fafafa; }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; color: #333; }
.form-control {
  width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #d0d0d0;
  border-radius: 0.375rem; font-size: 0.875rem; outline: none; font-family: inherit;
}
.form-control:focus { border-color: #D64545; box-shadow: 0 0 0 2px rgba(214,69,69,0.2); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { background: #fff; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 1.5rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.5rem 1rem; border-radius: 0.375rem; font-size: 0.875rem;
  font-weight: 500; cursor: pointer; border: none; transition: all 0.2s;
  font-family: inherit; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: #D64545; color: #fff; }
.btn-primary:hover { background: #9E1C1C; }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-secondary:hover { background: #5a6268; }
.btn-danger { background: #dc3545; color: #fff; }
.btn-danger:hover { background: #c82333; }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.btn-success { background: #28a745; color: #fff; }

.badge {
  display: inline-block; padding: 0.125rem 0.5rem; border-radius: 9999px;
  font-size: 0.75rem; font-weight: 600;
}
.badge-new { background: #cce5ff; color: #004085; }
.badge-contacted { background: #fff3cd; color: #856404; }
.badge-closed { background: #d4edda; color: #155724; }

.alert {
  padding: 0.75rem 1rem; border-radius: 0.375rem; margin-bottom: 1rem;
  font-size: 0.875rem;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

.empty-state { text-align: center; padding: 3rem; color: #999; }

.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: #1a1a1a;
}
.login-card {
  background: #fff; border-radius: 0.75rem; padding: 2.5rem; width: 100%; max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-card h1 { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 0.5rem; }
.login-card p { font-size: 0.875rem; color: #666; text-align: center; margin-bottom: 1.5rem; }
.login-card .form-group { margin-bottom: 1rem; }
.login-card .btn { width: 100%; padding: 0.75rem; justify-content: center; }
.login-error { color: #dc3545; font-size: 0.875rem; text-align: center; margin-bottom: 1rem; }

.inline-flex { display: inline-flex; align-items: center; gap: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.text-muted { color: #666; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-mono { font-family: 'Courier New', monospace; }
