/* Byline MVP - Pitch Tracker Styles */

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

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: #ffffff;
  color: #1F2937;
  line-height: 1.5;
  min-height: 100vh;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

/* Header */
.header {
  text-align: center;
  padding: 32px 16px;
  border-bottom: 1px solid #E5E7EB;
  margin-bottom: 24px;
}

.logo {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1F2937;
  letter-spacing: -0.02em;
}

.tagline {
  color: #6B7280;
  margin-top: 4px;
  font-size: 1rem;
}

/* Stats Section */
.stats-section {
  margin-bottom: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.stat-card {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1F2937;
}

.stat-label {
  color: #6B7280;
  font-size: 0.875rem;
  margin-top: 4px;
}

/* Controls Section */
.controls-section {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E5E7EB;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab {
  padding: 8px 16px;
  border: 1px solid #E5E7EB;
  background: #ffffff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  color: #6B7280;
  transition: all 0.15s ease;
}

.tab:hover {
  border-color: #1F2937;
  color: #1F2937;
}

.tab.active {
  background: #1F2937;
  color: #ffffff;
  border-color: #1F2937;
}

.controls-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

.sort-select {
  padding: 8px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #1F2937;
  background: #ffffff;
  cursor: pointer;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary {
  background: #1F2937;
  color: #ffffff;
}

.btn-primary:hover {
  background: #374151;
}

.btn-secondary {
  background: #ffffff;
  color: #1F2937;
  border: 1px solid #E5E7EB;
}

.btn-secondary:hover {
  background: #F9FAFB;
}

.btn-danger {
  background: #EF4444;
  color: #ffffff;
}

.btn-danger:hover {
  background: #DC2626;
}

/* Pitch List */
.pitch-section {
  min-height: 200px;
}

.pitch-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: #E5E7EB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
}

.pitch-item {
  display: grid;
  grid-template-columns: 1fr 180px 100px 100px 80px;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: #ffffff;
}

.pitch-item:hover {
  background: #F9FAFB;
}

.pitch-headline {
  font-weight: 500;
  color: #1F2937;
}

.pitch-publication {
  color: #6B7280;
  font-size: 0.875rem;
}

.pitch-date {
  color: #6B7280;
  font-size: 0.875rem;
}

.pitch-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.action-btn {
  padding: 6px 10px;
  border: 1px solid #E5E7EB;
  background: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  color: #6B7280;
  transition: all 0.15s ease;
}

.action-btn:hover {
  border-color: #1F2937;
  color: #1F2937;
}

.action-btn.delete:hover {
  border-color: #EF4444;
  color: #EF4444;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.status-badge:hover {
  opacity: 0.8;
}

.status-draft {
  background: #F3F4F6;
  color: #6B7280;
}

.status-pitched {
  background: #DBEAFE;
  color: #3B82F6;
}

.status-pending {
  background: #FEF3C7;
  color: #D97706;
}

.status-accepted {
  background: #D1FAE5;
  color: #059669;
}

.status-rejected {
  background: #FEE2E2;
  color: #DC2626;
}

.status-published {
  background: #EDE9FE;
  color: #7C3AED;
}

/* Status Dropdown */
.status-dropdown {
  position: absolute;
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  padding: 4px;
  display: none;
  z-index: 100;
}

.status-dropdown.show {
  display: block;
}

.status-dropdown button {
  display: block;
  width: 100%;
  padding: 8px 16px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 0.875rem;
  color: #1F2937;
  border-radius: 4px;
}

.status-dropdown button:hover {
  background: #F3F4F6;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #F9FAFB;
  border: 1px dashed #E5E7EB;
  border-radius: 8px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  color: #1F2937;
  margin-bottom: 8px;
}

.empty-state p {
  color: #6B7280;
  margin-bottom: 20px;
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: #6B7280;
  background: #ffffff;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #E5E7EB;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.modal-close:hover {
  background: #F3F4F6;
}

#pitch-form {
  padding: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 1rem;
  color: #1F2937;
  transition: border-color 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1F2937;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #E5E7EB;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .header {
    padding: 24px 16px;
  }
  
  .logo {
    font-size: 2rem;
  }
  
  .controls-section {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  
  .tab {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  
  .controls-right {
    justify-content: space-between;
  }
  
  /* Convert table to cards on mobile */
  .pitch-list {
    background: transparent;
    border: none;
    gap: 12px;
  }
  
  .pitch-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px;
  }
  
  .pitch-headline {
    font-size: 1rem;
    line-height: 1.4;
  }
  
  .pitch-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    width: 100%;
  }
  
  .pitch-actions {
    width: 100%;
    justify-content: flex-start;
    padding-top: 8px;
    border-top: 1px solid #E5E7EB;
    margin-top: 4px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Utility classes */
.hidden {
  display: none !important;
}
