
/*
Create this file separately:
static/css/tervia-consultations.css
*/

.page-title {
  margin: 4px 0 0;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: #17210f;
}

.page-subtitle {
  margin: 8px 0 0;
  max-width: 620px;
  font-size: 14px;
  line-height: 1.55;
  color: #78836f;
}

.consultation-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.summary-card {
  padding: 22px;
  border-radius: 26px;
  border: 1px solid rgba(58, 102, 0, 0.12);
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(37, 54, 20, 0.06);
}

.summary-card.primary {
  background: linear-gradient(135deg, #edf7df 0%, #ffffff 100%);
}

.summary-label {
  font-size: 13px;
  font-weight: 700;
  color: #78836f;
}

.summary-value {
  margin-top: 10px;
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #17210f;
}

.summary-text {
  margin-top: 8px;
  font-size: 13px;
  color: #78836f;
}

.consultations-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  margin-top: 22px;
}

.consultations-panel,
.soap-panel {
  border: 1px solid rgba(58, 102, 0, 0.12);
  background: linear-gradient(135deg, #fbfff5 0%, #ffffff 58%, #f4f8ed 100%);
  border-radius: 30px;
  box-shadow: 0 24px 70px rgba(37, 54, 20, 0.08);
}

.consultations-panel {
  padding: 24px;
  min-height: 540px;
}

.consultations-header {
  align-items: flex-start;
}

.small-btn {
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
  text-decoration: none;
}

.consultation-search-row {
  margin-top: 18px;
}

.consultation-search {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(58, 102, 0, 0.12);
  color: #78836f;
}

.consultation-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  color: #17210f;
}

.consultation-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.filter-pill {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(58, 102, 0, 0.12);
  background: #ffffff;
  color: #64705b;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.18s ease;
}

.filter-pill:hover,
.filter-pill.active {
  color: #2f5200;
  background: #edf7df;
  border-color: rgba(58, 102, 0, 0.2);
}

.filter-pill.danger:hover,
.filter-pill.danger.active {
  color: #9f1d1d;
  background: #fff1f1;
  border-color: rgba(159, 29, 29, 0.18);
}

.consultation-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.consultation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(58, 102, 0, 0.1);
  background: #ffffff;
  text-decoration: none;
  transition: 0.18s ease;
}

.consultation-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(37, 54, 20, 0.08);
  border-color: rgba(58, 102, 0, 0.18);
}

.consultation-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.consultation-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: #f0f7e7;
  color: #3a6600;
  font-size: 13px;
  font-weight: 800;
}

.consultation-info {
  min-width: 0;
}

.consultation-title {
  font-size: 15px;
  font-weight: 750;
  color: #17210f;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.consultation-meta {
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.4;
  color: #78836f;
}

.consultation-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.status-badge {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  background: #f3f4f1;
  color: #66705e;
}

.status-draft,
.status-recording_uploaded {
  background: #f3f4f1;
  color: #66705e;
}

.status-transcribing,
.status-generating_soap {
  background: #fff7dd;
  color: #876200;
}

.status-ready_for_review {
  background: #edf7df;
  color: #3a6600;
}

.status-completed {
  background: #eaf5ff;
  color: #1f5f8b;
}

.status-failed {
  background: #fff1f1;
  color: #a02525;
}

.consultation-action {
  color: #3a6600;
  font-size: 13px;
  font-weight: 800;
}

.soap-panel {
  padding: 24px;
  align-self: start;
  position: sticky;
  top: 24px;
}

.soap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.soap-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #78836f;
}

.soap-title {
  margin: 5px 0 0;
  font-size: 22px;
  letter-spacing: -0.04em;
  color: #17210f;
}

.soap-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: #edf7df;
}

.soap-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.soap-section {
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(58, 102, 0, 0.1);
}

.soap-section-title {
  font-size: 13px;
  font-weight: 800;
  color: #3a6600;
}

.soap-section p {
  margin: 7px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: #64705b;
}

.soap-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.consultations-empty {
  margin-top: 8px;
}

@media (max-width: 1180px) {
  .consultation-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .consultations-layout {
    grid-template-columns: 1fr;
  }

  .soap-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .consultation-summary-grid {
    grid-template-columns: 1fr;
  }

  .consultation-row,
  .consultation-side,
  .soap-actions {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .filter-pill {
    flex: 1;
  }
}