/* ───── Agenda Page Wrapper ───── */
.agenda-page-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 70px 28px 60px;
  min-height: 100vh;
}

/* ───── Back to Home Link ───── */
.back-home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  margin-bottom: 32px;
  transition: color 0.3s ease, transform 0.2s ease;
}
.back-home-link:hover {
  color: var(--accent);
  transform: translateX(-3px);
}

/* ───── Page Header ───── */
.agenda-header {
  text-align: center;
  margin-bottom: 48px;
}

.agenda-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5em;
  color: var(--accent);
  background: rgba(139, 26, 26, 0.1);
  border: 1px solid rgba(139, 26, 26, 0.2);
  padding: 5px 18px;
  margin-bottom: 20px;
}

.agenda-header h1 {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.agenda-header h1 span {
  color: var(--accent);
}

.agenda-subtitle {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 12px;
}

/* ───── Committee Tabs ───── */
.committee-tabs {
  display: flex;
  gap: 4px;
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(139, 26, 26, 0.15);
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 36px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow-x: auto;
  scrollbar-width: none;
}
.committee-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: 1;
  min-width: 0;
  padding: 14px 12px;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--text-muted);
  transition: all 0.35s ease;
  position: relative;
  z-index: 2;
  text-align: center;
}

.tab-btn:hover {
  color: #fff;
}

.tab-abbr {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tab-full {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  margin-top: 3px;
  opacity: 0.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-btn.active {
  color: #fff;
  background: rgba(139, 26, 26, 0.25);
  border: 1px solid rgba(139, 26, 26, 0.4);
  box-shadow: 0 0 20px rgba(139, 26, 26, 0.15), inset 0 1px 0 rgba(255,255,255,0.05);
}

.tab-btn.active .tab-full {
  opacity: 0.9;
}

/* ───── Tab Panels ───── */
.tab-content-area {
  position: relative;
}

.tab-panel {
  display: none;
  animation: panelFadeIn 0.4s ease;
}

.tab-panel.active {
  display: block;
}

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

/* ───── Agenda Banner ───── */
.agenda-banner {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 32px;
  background: linear-gradient(135deg, rgba(139, 26, 26, 0.12), rgba(10, 5, 5, 0.8));
  border: 1px solid rgba(139, 26, 26, 0.25);
  border-radius: 14px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}

.agenda-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
}

.agenda-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(139,26,26,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.agenda-icon {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.agenda-info {
  flex: 1;
  position: relative;
  z-index: 1;
}

.agenda-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 8px;
  background: rgba(139,26,26,0.15);
  padding: 3px 10px;
  border-radius: 4px;
}

.agenda-topic {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.5;
  color: #fff;
  letter-spacing: 0.01em;
}

/* ───── Portfolio Section ───── */
.portfolio-section {
  background: rgba(10, 5, 5, 0.5);
  border: 1px solid rgba(139, 26, 26, 0.15);
  border-radius: 14px;
  padding: 28px;
}

.portfolio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.portfolio-header h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: #fff;
}

.portfolio-stats {
  display: flex;
  gap: 20px;
  align-items: center;
}

.stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-available {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.dot-taken {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

/* ───── Search Box ───── */
.search-box-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.search-box-wrapper .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dimmed);
  pointer-events: none;
}

.portfolio-search {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(139,26,26, 0.2);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-search::placeholder {
  color: var(--text-dimmed);
}

.portfolio-search:focus {
  border-color: rgba(139,26,26, 0.5);
  box-shadow: 0 0 0 3px rgba(139,26,26,0.1);
}

/* ───── Portfolio Grid ───── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.portfolio-card {
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.portfolio-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(139,26,26,0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.portfolio-card.taken {
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.04);
}

.portfolio-card.taken:hover {
  border-color: rgba(239, 68, 68, 0.35);
}

.portfolio-name {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: #e5e7eb;
  letter-spacing: 0.02em;
  word-break: break-word;
  overflow-wrap: break-word;
  flex: 1;
  min-width: 0;
}

.portfolio-card.taken .portfolio-name {
  color: #9ca3af;
}

.status-badge {
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  border-radius: 20px;
  flex-shrink: 0;
  white-space: nowrap;
}

.status-badge.available {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-badge.taken {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ───── Loading State ───── */
.loading-portfolios {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 0;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.mini-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(139,26,26,0.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ───── No Results ───── */
.no-results-msg {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px;
  color: var(--text-dimmed);
  font-family: var(--font-body);
  font-size: 0.85rem;
}

/* ───── Responsive ───── */
@media (max-width: 900px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .agenda-page-wrapper {
    padding: 70px 16px 40px;
  }

  .agenda-header h1 {
    font-size: 2.2rem;
  }

  .committee-tabs {
    gap: 3px;
    padding: 4px;
  }

  .tab-btn {
    padding: 10px 8px;
  }

  .tab-full {
    display: none;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .agenda-banner {
    flex-direction: column;
    gap: 12px;
    padding: 20px;
  }

  .agenda-topic {
    font-size: 1.1rem;
  }

  .portfolio-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .tab-abbr {
    font-size: 0.72rem;
  }

  .portfolio-section {
    padding: 18px;
  }
}
