/* Pin Curator — Heart Code Theme */

/* ── Layout ── */
.page-layout {
  display: flex;
  padding-top: 56px;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  padding: var(--space-md);
  border-right: 1px solid var(--border-soft);
  background: var(--surface);
}

.main-content {
  flex: 1;
  padding: var(--space-lg);
  max-width: 1200px;
}

/* ── Top Bar ── */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--surface);
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: center;
  padding: 0 var(--space-lg);
  z-index: 100;
  gap: var(--space-lg);
}

.top-bar-logo {
  font-family: 'Press Start 2P', cursive;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 2px;
}

.top-bar-nav {
  display: flex;
  gap: var(--space-md);
}

.nav-link {
  font-family: 'Silkscreen', cursive;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}

.nav-link.active,
.nav-link:hover {
  color: var(--accent);
  background: var(--bg-soft);
}

/* ── Sidebar ── */
.sidebar-title {
  font-family: 'Silkscreen', cursive;
  font-size: 13px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--space-sm);
}

.sidebar-section {
  margin-bottom: var(--space-lg);
}

.board-filter-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.board-filter {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  transition: var(--transition-fast);
}

.board-filter:hover,
.board-filter.active {
  background: var(--bg-soft);
}

.board-filter .board-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.board-filter .board-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Stats Card ── */
.stats-card {
  background: var(--bg-soft);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-family: 'Pixelify Sans', sans-serif;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 14px;
}

.stat-value {
  font-family: 'Space Mono', monospace;
  color: var(--accent);
}

/* ── Key Hints ── */
.key-hints {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
}

kbd {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 3px;
  padding: 1px 6px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  min-width: 22px;
  text-align: center;
  margin-right: 6px;
}

/* ── Section Header ── */
.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px dotted var(--border-soft);
}

.section-header h2 {
  font-family: 'Silkscreen', cursive;
  font-size: 16px;
  color: var(--accent);
  margin: 0;
}

.count-pill {
  background: var(--accent);
  color: #fff;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

/* ── Candidate Grid ── */
.candidate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-md);
}

/* ── Candidate Card ── */
.candidate-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  position: relative;
}

.candidate-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.candidate-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.candidate-card .card-accent {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
}

.card-image-wrap {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: pointer;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-normal);
}

.candidate-card:hover .card-image-wrap img {
  transform: scale(1.03);
}

.card-info {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.score-pill {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: bold;
}

.board-label {
  font-family: 'Pixelify Sans', sans-serif;
  font-size: 12px;
  color: var(--text-muted);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-actions {
  display: flex;
  gap: 6px;
  padding: 0 12px 10px;
}

.btn {
  font-family: 'Silkscreen', cursive;
  font-size: 12px;
  padding: 6px 14px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-approve {
  background: #059669;
  color: #fff;
}

.btn-approve:hover {
  background: #047857;
}

.btn-reject {
  background: #f43f5e;
  color: #fff;
}

.btn-reject:hover {
  background: #e11d48;
}

.btn-cancel {
  background: var(--bg-soft);
  color: var(--text);
}

/* ── History card status ── */
.card-status {
  font-family: 'Silkscreen', cursive;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.card-status.approved {
  background: #ecfdf5;
  color: #059669;
}

.card-status.rejected {
  background: #fff0f5;
  color: #f43f5e;
}

/* ── Modal ── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(92, 79, 110, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  max-width: 480px;
  width: 92%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-content h3 {
  font-family: 'Silkscreen', cursive;
  color: var(--accent);
  margin: 0 0 var(--space-md);
}

.modal-image {
  width: 100%;
  max-height: 25vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  flex-shrink: 0;
}

.modal-boards {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
  overflow-y: auto;
  flex: 1;
  min-height: 120px;
}

.modal-board-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: 'Pixelify Sans', sans-serif;
  transition: var(--transition-fast);
}

.modal-board-option:hover,
.modal-board-option.selected {
  border-color: var(--accent);
  background: var(--bg-soft);
}

.modal-board-option .recommended {
  font-size: 10px;
  color: var(--accent);
  margin-left: auto;
}

.modal-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  flex-shrink: 0;
  padding-top: var(--space-sm);
}

.modal-preview {
  max-width: 90vw;
  max-height: 90vh;
}

.preview-image {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: var(--space-2xl);
  font-family: 'Pixelify Sans', sans-serif;
  color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .main-content {
    padding: var(--space-md);
  }
  .candidate-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-sm);
  }
  .top-bar-logo {
    font-size: 10px;
  }
  .modal-content {
    width: 96%;
    max-height: 90vh;
    padding: var(--space-md);
  }
  .modal-image {
    max-height: 15vh;
  }
  .modal-board-option {
    padding: 10px 12px;
    font-size: 14px;
  }
  .modal-actions .btn {
    flex: 1;
    padding: 12px;
    font-size: 15px;
  }
}
