#app {
  font-family: system-ui, sans-serif;
  min-height: 100vh;
}
.nav {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #f0f0f0;
  border-bottom: 1px solid #ddd;
  align-items: center;
}
.nav a {
  color: #333;
  text-decoration: none;
}
.nav a:hover {
  text-decoration: underline;
}
.nav a.active {
  font-weight: bold;
}
.nav-btn {
  margin-left: auto;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
}
main {
  padding: 0 1rem 2rem;
}
h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.hint {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.error {
  color: #c00;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}
.success {
  color: #080;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}
.auth-page {
  max-width: 320px;
  margin: 2rem auto;
  padding: 1rem;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.auth-form input {
  padding: 0.5rem;
}
.auth-form button {
  padding: 0.5rem 1rem;
  cursor: pointer;
}
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem;
}
.source-picker {
  margin-bottom: 1rem;
}
.source-picker select {
  margin-left: 0.5rem;
  min-width: 240px;
  padding: 0.25rem;
}
.paste-section {
  margin-bottom: 1rem;
}
.paste-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
.paste-row input {
  flex: 1;
  padding: 0.5rem;
}
.meetings-heading {
  font-size: 1.1rem;
  margin: 1rem 0 0.5rem;
}
.meetings-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.meetings-toolbar input[type="search"] {
  padding: 0.4rem 0.6rem;
  min-width: 12rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.meetings-toolbar select {
  padding: 0.4rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}
.meetings-loading-indicator {
  display: none;
  font-size: 0.9rem;
  color: #666;
}
.meetings-loading-indicator.htmx-request {
  display: inline;
}
.btn-refresh-meetings {
  padding: 0.35rem 0.6rem;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}
.btn-refresh-meetings:hover {
  background: #f0f0f0;
}
.meeting-list {
  list-style: none;
  padding: 0;
}
.meeting-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
  flex-wrap: wrap;
}
.meeting-item .title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meeting-item .date {
  font-size: 0.85rem;
  color: #666;
}
.badge {
  font-size: 0.8rem;
  color: #388;
}
.meetings-pagination {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.meetings-pagination .pagination-info {
  font-size: 0.9rem;
  color: #666;
}
.meetings-pagination .pagination-links {
  display: flex;
  gap: 0.5rem;
}
.meetings-pagination .pagination-link {
  padding: 0.35rem 0.6rem;
  font-size: 0.9rem;
  color: #333;
  text-decoration: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}
.meetings-pagination .pagination-link:hover {
  background: #f0f0f0;
}
.btn-small {
  padding: 0.25rem 0.5rem;
  cursor: pointer;
}
.btn-ghost {
  background: none;
  border: none;
  color: #666;
  font-size: inherit;
}
.btn-ghost:hover {
  color: #c00;
  text-decoration: underline;
}
.muted {
  color: #666;
}
.token-once-box {
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.token-once-box code {
  word-break: break-all;
  font-size: 0.9rem;
}
.token-value-wrap {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}
.token-value-wrap code {
  flex: 1;
}
.api-tokens-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.api-token-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}
.api-token-item .api-token-name {
  font-weight: 500;
  min-width: 140px;
}
.api-token-item .muted {
  flex: 1;
  font-size: 0.85rem;
}
.loading {
  margin: 0.5rem 0;
}
.topic-source-section {
  margin-bottom: 1.5rem;
}
.topic-source-section:last-child {
  margin-bottom: 0;
}
.topic-source-heading {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: #333;
}
.topic-source-heading .next-live {
  font-weight: normal;
  color: #666;
  font-size: 0.9rem;
}
.source-list,
.running-list,
.topic-list {
  list-style: none;
  padding: 0;
}
.source-item,
.topic-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}
.source-item .title,
.topic-item span:first-child {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-groups {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.notification-group {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}
.notification-group-new {
  background: #f0f8f0;
  border-color: #c8e6c9;
}
.notification-group-header {
  width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1rem;
  text-align: left;
  background: #fafafa;
  border: none;
  cursor: pointer;
  font: inherit;
}
.notification-group-header:hover {
  background: #f0f0f0;
}
.notification-group-topic {
  font-weight: 600;
}
.notification-group-source {
  color: #555;
  font-size: 0.95rem;
}
.notification-group-count {
  font-size: 0.85rem;
  color: #888;
  margin-left: auto;
}
.notification-group-chevron {
  font-size: 0.8rem;
  color: #666;
  transition: transform 0.2s;
}
.notification-group-header[aria-expanded="true"] .notification-group-chevron {
  transform: rotate(-180deg);
}
.notification-group-body {
  padding: 0 1rem 1rem;
  border-top: 1px solid #eee;
}
.notification-group-summary {
  margin: 0.75rem 0;
  padding: 0.75rem;
  background: #f5f5f5;
  border-radius: 6px;
}
.notification-summary-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #333;
}
.notification-summary-loading {
  margin: 0;
  font-size: 0.9rem;
  color: #888;
}
.notification-group-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 0.75rem;
}
.notification-sources-toggle {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.9rem;
  color: var(--link-color, #0066cc);
  cursor: pointer;
  text-decoration: underline;
}
.notification-sources-toggle:hover {
  text-decoration: none;
}
.notification-segments-list {
  margin-top: 0.5rem;
}
.notification-segment {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}
.notification-segment:last-child {
  border-bottom: none;
}
.notification-segment-new {
  background: #f9fff9;
}
.notification-segment-text {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #333;
  white-space: pre-wrap;
  word-break: break-word;
}
.notification-segment .notification-time {
  font-size: 0.85rem;
  color: #888;
}
.notification-time {
  font-size: 0.85rem;
  color: #888;
}
.notification-list {
  list-style: none;
  padding: 0;
}
.notification-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}
.notification-item-new {
  background: #f0f8f0;
}
.notification-topic {
  font-weight: 600;
}
.notification-meta {
  flex: 1;
  color: #666;
  font-size: 0.9rem;
}

.running-section {
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background: #f8f8f8;
  border-radius: 6px;
}
.running-section h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}
.running-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}
.running-item:last-child {
  border-bottom: none;
}
.running-item .title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.running-item .status {
  text-transform: capitalize;
  color: #666;
}
.transcript-back {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}
.transcript-back a {
  color: #333;
}
.transcript-segments {
  max-height: 70vh;
  overflow: auto;
  margin: 1rem 0;
  padding: 0.75rem;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
}
.transcript-seg {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.5rem 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}
.transcript-seg:last-child {
  border-bottom: none;
}
.transcript-time {
  font-size: 0.8rem;
  color: #666;
  font-variant-numeric: tabular-nums;
}
.transcript-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #222;
}
.transcript-actions {
  margin-top: 1rem;
}
.meta {
  font-size: 0.9rem;
  color: #666;
}
.add-form,
.ask-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.add-form input,
.ask-form input {
  flex: 1;
  padding: 0.5rem;
}
.add-form select {
  padding: 0.5rem;
  min-width: 180px;
}
.add-form label {
  display: flex;
  align-items: center;
}
.task-select {
  margin-bottom: 1rem;
}
.task-select select {
  margin-left: 0.5rem;
  min-width: 200px;
  padding: 0.25rem;
}
.answer-box {
  margin-top: 1rem;
  padding: 1rem;
  background: #f5f5f5;
  border-radius: 4px;
}
.answer-text {
  white-space: pre-wrap;
}
.sources-list {
  font-size: 0.9rem;
  color: #555;
}
.previous-qa {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}
.previous-qa h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem;
}
.qa-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.qa-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}
.qa-item:last-child {
  border-bottom: none;
}
.qa-question {
  font-weight: 600;
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}
.qa-answer {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  white-space: pre-wrap;
  color: #333;
}
.qa-meta {
  font-size: 0.85rem;
  color: #666;
}
.ask-loading-indicator {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 1rem;
  font-size: 0.95rem;
  color: #666;
}
.ask-loading-indicator.htmx-request {
  display: flex;
}
.ask-loading-spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #e0e0e0;
  border-top-color: #333;
  border-radius: 50%;
  animation: ask-spin 0.7s linear infinite;
}
@keyframes ask-spin {
  to {
    transform: rotate(360deg);
  }
}
.htmx-request .htmx-indicator {
  display: inline-block;
}
.htmx-indicator {
  display: none;
}

.auto-capture-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.auto-capture-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  background: #fafafa;
}
.auto-capture-title {
  font-size: 1.1rem;
  margin: 0 0 0.5rem 0;
}
.auto-capture-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  cursor: pointer;
}
.live-capture-alerts {
  margin-bottom: 1rem;
}
.live-capture-alert {
  background: #e8f4fd;
  border: 1px solid #b3d9f2;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  margin: 0 0 0.5rem 0;
}
.inline-link {
  color: #06c;
}
