/* -- Lynx Collective Brand Colors --
   Brown:      #bd6616
   Yellow:     #ebc35c
   Grey:       #444f5a
   Background: #faf9f7
*/

/* -- Reset & Base -- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #faf9f7;
}

a { color: #bd6616; text-decoration: none; }
a:hover { text-decoration: underline; }

/* -- Nav -- */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: #444f5a;
  border-bottom: 1px solid #3a4450;
}
.nav-left { display: flex; align-items: baseline; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-icon {
  height: 36px;
  width: 36px;
  margin-right: 8px;
  vertical-align: -4px;
  filter: brightness(0) invert(1);
}
.nav-brand {
  font-size: 39px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.nav-brand:hover { text-decoration: none; }
.nav-sub {
  color: #ebc35c;
  font-size: 0.5em;
}
.nav-link {
  font-size: 13px;
  color: #bfc8d0;
  text-decoration: none;
  transition: color 0.15s;
}
.nav-link:hover { color: #fff; text-decoration: none; }
.nav-user {
  font-size: 13px;
  color: #fff;
  font-weight: 600;
}

/* -- Main Layout -- */
main { max-width: 960px; margin: 0 auto; padding: 32px 24px; }
main.wide { max-width: 1100px; }

/* -- Page Header -- */
.page-header {
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-header h1 { font-size: 22px; font-weight: 700; }
.page-header p { color: #666; margin-top: 4px; }

/* -- Cards -- */
.card {
  background: #fff;
  border: 1px solid #e5e5e3;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
}

/* -- Form Styles -- */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.6;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #1a1a1a;
  transition: border-color 0.15s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #bd6616;
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-group .hint {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

/* -- Radio Group -- */
.radio-group {
  display: flex;
  gap: 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
}
.radio-group label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: #666;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-right: 1px solid #ddd;
  margin-bottom: 0;
}
.radio-group label:last-child { border-right: none; }
.radio-group input { display: none; }
.radio-group input:checked + span {
  color: #bd6616;
  font-weight: 700;
}
.radio-group label:has(input:checked) {
  background: rgba(189, 102, 22, 0.08);
}

/* -- Buttons -- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s;
  text-decoration: none;
}
.btn:hover { opacity: 0.85; text-decoration: none; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary { background: #bd6616; color: #fff; }
.btn-secondary { background: #f1f1ef; color: #444; border: 1px solid #ddd; }
.btn-green { background: #1e8449; color: #fff; }
.btn-red { background: #c0392b; color: #fff; }
.btn-small { padding: 5px 12px; font-size: 12px; }

/* -- Badges -- */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Status badges */
.status-new { background: #e8f4fd; color: #2980b9; }
.status-reached-out { background: #fef9e7; color: #b7950b; }
.status-scheduled { background: #eafaf1; color: #1e8449; }
.status-completed { background: #f1f1ef; color: #666; }
.status-declined { background: #fee2e2; color: #991b1b; }

/* Urgency badges */
.urgency-high { background: #fee2e2; color: #991b1b; }
.urgency-medium { background: #fef3e2; color: #7c3d0a; }
.urgency-low { background: #dcfce7; color: #166534; }

/* Category badges */
.category-nyu-stern { background: #e8e0f0; color: #57068c; }
.category-lynx-collective { background: rgba(189, 102, 22, 0.12); color: #bd6616; }
.category-other { background: #f1f1ef; color: #666; }

/* Priority badges */
.priority-1 { background: #fee2e2; color: #991b1b; font-weight: 700; }
.priority-2 { background: #fef3e2; color: #7c3d0a; font-weight: 700; }
.priority-3 { background: #e8f4fd; color: #2980b9; font-weight: 700; }

/* -- View Tabs -- */
.view-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid #e5e5e3;
}
.view-tab {
  padding: 10px 24px;
  text-decoration: none;
  color: #888;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}
.view-tab:hover { color: #444f5a; text-decoration: none; }
.view-tab.active {
  color: #bd6616;
  border-bottom-color: #bd6616;
}
.tab-count {
  background: #eee;
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 12px;
  color: #666;
  margin-left: 4px;
}
.view-tab.active .tab-count {
  background: rgba(189, 102, 22, 0.12);
  color: #bd6616;
}

/* -- Filter Controls -- */
.list-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e5e5e3;
  border-radius: 8px;
  flex-wrap: wrap;
}
.control-label {
  font-size: 11px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.filter-select {
  padding: 5px 10px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #1a1a1a;
}
.filter-select:focus { outline: none; border-color: #bd6616; }
.search-input {
  padding: 5px 10px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #1a1a1a;
  flex: 1;
  min-width: 180px;
}
.search-input:focus { outline: none; border-color: #bd6616; }

/* -- Stats Bar -- */
.stats-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.stat-item {
  background: #fff;
  border: 1px solid #e5e5e3;
  border-radius: 8px;
  padding: 12px 20px;
  flex: 1;
  min-width: 100px;
  text-align: center;
}
.stat-count {
  font-size: 28px;
  font-weight: 800;
  color: #bd6616;
}
.stat-label {
  font-size: 11px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* -- Request Cards (admin) -- */
.request-list { display: flex; flex-direction: column; gap: 12px; }

.request-card {
  background: #fff;
  border: 1px solid #e5e5e3;
  border-radius: 8px;
  padding: 18px 20px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.request-card:hover {
  border-color: #bd6616;
  box-shadow: 0 2px 8px rgba(189, 102, 22, 0.08);
}
.request-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.request-name {
  font-size: 16px;
  font-weight: 700;
}
.request-email {
  font-size: 13px;
  color: #888;
}
.request-org {
  font-size: 13px;
  color: #666;
  margin-top: 2px;
}
.request-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 8px 0;
}
.request-topic {
  font-size: 14px;
  color: #444;
  margin: 8px 0;
  line-height: 1.5;
}
.request-meta {
  font-size: 12px;
  color: #999;
  margin-top: 6px;
}
.request-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.request-actions select {
  padding: 5px 10px;
  font-size: 12px;
  font-family: inherit;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
}
.request-actions select:focus { outline: none; border-color: #bd6616; }

/* -- Detail Modal -- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  overflow-y: auto;
}
.modal-overlay.visible {
  display: flex;
}
.modal {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 640px;
  padding: 28px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #999;
  padding: 4px 8px;
}
.modal-close:hover { color: #333; }
.modal h2 { font-size: 20px; font-weight: 700; margin-bottom: 20px; }

.detail-row {
  margin-bottom: 16px;
}
.detail-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #999;
  margin-bottom: 4px;
}
.detail-value {
  font-size: 14px;
  color: #1a1a1a;
  line-height: 1.6;
}
.detail-value a { color: #bd6616; }

/* -- Login -- */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}
.login-card {
  background: #fff;
  border: 1px solid #e5e5e3;
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  max-width: 400px;
  width: 100%;
}
.login-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.login-card p {
  color: #666;
  margin-bottom: 24px;
  font-size: 14px;
}
.login-error {
  color: #991b1b;
  font-size: 13px;
  margin-top: 12px;
  display: none;
}

/* Google sign-in button styling */
#g_id_onload, .g_id_signin { margin-top: 16px; }

/* -- Success / Error Messages -- */
.success-box {
  background: #eafaf1;
  border: 1px solid #a9dfbf;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  display: none;
}
.success-box h2 {
  color: #1e8449;
  font-size: 20px;
  margin-bottom: 8px;
}
.success-box p {
  color: #444;
  font-size: 14px;
}

.error-message {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 10px 14px;
  color: #991b1b;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

/* -- Toast Notifications -- */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.3s ease;
}
.toast-success { background: #1e8449; }
.toast-error { background: #c0392b; }
.toast-info { background: #444f5a; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* -- Empty State -- */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}
.empty-state p { font-size: 15px; }

/* -- Responsive -- */
@media (max-width: 700px) {
  nav { padding: 16px 20px; }
  .nav-brand { font-size: 28px; }
  main { padding: 20px 16px; }

  .stats-bar { flex-direction: column; }
  .stat-item { min-width: auto; }

  .list-controls { flex-direction: column; align-items: stretch; }
  .search-input { min-width: auto; }

  .request-card-header { flex-direction: column; }
  .request-actions { flex-direction: column; align-items: stretch; }
  .request-actions .btn { justify-content: center; }

  .modal { margin: 0; border-radius: 0; min-height: 100vh; }
}
