:root {
  --bg: #F4F1EA;
  --surface: #FFFFFF;
  --border: #DAD3C2;
  --text: #181818;
  --text-secondary: #57544C;
  --accent: #5E747A;
  --accent-hover: #47585D;
  --accent-soft: #E9EDED;
  --amber: #B7A88F;
  --amber-soft: #F1EBDD;
  --amber-text: #6E5D42;
  --radius: 14px;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

/* --- App nav bar (persistent across all views) --- */

.app-nav {
  background: var(--text);
  padding: 14px 20px;
}

.app-nav-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.app-nav-logo {
  width: 28px;
  height: 28px;
}

.app-nav-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: #F4F1EA;
}

* {
  box-sizing: border-box;
}

/* Prevents mobile Safari/Chrome from auto-zooming when a field is
   tapped — that only happens when a field's font-size is under 16px.
   More specific input rules elsewhere in this file (.modal input,
   .page-search-input, etc.) still override this where they're set. */
input,
select,
textarea {
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* --- Main content --- */

.content {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.content-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 4px 0;
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.01em;
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Without this, [hidden] gets overridden by the display: flex rule
   above (same specificity, later rule wins) — meaning an icon button
   meant to be hidden (like delete-call-btn for non-admins) would
   actually still show up. Same bug pattern as project-card-category
   and modal-overlay elsewhere in this file. */
.icon-btn[hidden] {
  display: none;
}

.icon-btn:hover {
  background: var(--accent-soft);
}

.icon-btn-primary {
  background: var(--text);
  color: white;
  border-color: var(--text);
}

.icon-btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* --- Buttons --- */

.btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
}

.btn-ghost {
  background: none;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg);
}

/* --- Project grid --- */

.project-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  height: 180px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(94, 116, 122, 0.12);
}

.project-card-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.project-card-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.05) 75%);
}

.project-card-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 20px;
  z-index: 1;
}

.project-card.has-photo .project-card-name,
.project-card.has-photo .project-card-meta {
  color: white;
}

.project-card-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--amber-soft);
  color: var(--amber-text);
  margin-bottom: 8px;
}

/* Without this, [hidden] gets overridden by the display: inline-block
   rule above (same specificity, later rule wins) — meaning a project
   with no category would still show a leftover/incorrect badge. */
.project-card-category[hidden] {
  display: none;
}

.project-card.has-photo .project-card-category {
  background: rgba(255,255,255,0.2);
  color: white;
  backdrop-filter: blur(4px);
}

.project-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  margin: 0 0 4px 0;
  color: var(--text);
}

.project-card-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.project-card.unassigned {
  border-left: 3px solid var(--text-secondary);
}

/* --- Empty state --- */

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-secondary);
}

.empty-state-mark {
  width: 48px;
  height: 48px;
  opacity: 0.28;
  margin-bottom: 16px;
}

.empty-state p {
  margin: 4px 0;
}

.empty-state-sub {
  font-size: 14px;
}

/* --- Modal --- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 24, 24, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

/* Without this, the [hidden] attribute gets overridden by the rule
   above (both have the same CSS specificity, so the later one in the
   file wins) — meaning the modal would show immediately on page load
   instead of staying hidden until the + button is clicked. */
.modal-overlay[hidden] {
  display: none;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h2 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 18px 0;
}

.field-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 16px 0 6px 0;
}

.field-label:first-of-type {
  margin-top: 0;
}

.field-optional {
  text-transform: none;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--text-secondary);
}

.modal input[type="text"] {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

.modal input[type="text"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.custom-category-input {
  margin-top: 8px;
}

/* --- Category chips --- */

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
}

.chip:hover {
  background: var(--accent-soft);
}

.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* --- Photo picker --- */

.photo-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.photo-picker-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  background: var(--bg);
}

.photo-picker-label:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.photo-preview {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 8px;
}

.photo-remove-btn {
  align-self: flex-start;
  background: none;
  border: none;
  color: #A85B4C;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.section-header-actions {
  display: flex;
  gap: 8px;
}

.modal input[type="text"]#link-contact-search {
  margin-bottom: 10px;
}

.page-search-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 20px;
}

.page-search-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.modal select {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

.search-results {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
}

.search-result-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.search-result-row input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.search-result-row-content {
  flex: 1;
  min-width: 0;
}

.search-result-row:last-child {
  border-bottom: none;
}

.search-result-row:hover {
  background: var(--accent-soft);
}

.search-result-row.selected {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
}

.search-result-name {
  font-weight: 600;
  font-size: 14px;
  margin: 0;
}

.search-result-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 2px 0 0 0;
}

.search-results-empty {
  padding: 16px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

.modal-error {
  color: #A85B4C;
  font-size: 13px;
  margin-top: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.modal-actions-split {
  justify-content: space-between;
  align-items: center;
}

.btn-delete {
  background: none;
  border: none;
  color: #A85B4C;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
}

.btn-delete:hover {
  text-decoration: underline;
}

/* --- Responsive --- */

@media (max-width: 600px) {
  .content {
    padding: 24px 16px 60px;
  }
  h1 {
    font-size: 28px;
  }
}

/* --- Project Detail view --- */

.back-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 20px;
}

.project-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.project-detail-topbar .back-btn {
  margin-bottom: 0;
}

/* --- Notes / team chat --- */

.notes-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.notes-label svg {
  color: var(--accent);
  flex-shrink: 0;
}

.notes-preview {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px 10px;
  margin-bottom: 10px;
  cursor: pointer;
  font-family: inherit;
}

.notes-preview:hover {
  border-color: var(--accent);
}

.notes-expand-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 8px;
}

.notes-bubble-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notes-bubble-list-preview {
  max-height: 190px;
  overflow: hidden;
  justify-content: flex-end;
  mask-image: linear-gradient(to bottom, transparent, black 22px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 22px);
}

.notes-bubble-list-full {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.note-bubble-row {
  display: flex;
}

.note-bubble-row.own {
  justify-content: flex-end;
}

.note-bubble-row.other {
  justify-content: flex-start;
}

.note-bubble-group {
  display: flex;
  flex-direction: column;
  max-width: 78%;
}

.note-bubble-row.own .note-bubble-group {
  align-items: flex-end;
}

.note-bubble-row.other .note-bubble-group {
  align-items: flex-start;
}

.note-bubble {
  padding: 8px 13px;
  border-radius: 16px;
}

.note-bubble-row.own .note-bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.note-bubble-row.other .note-bubble {
  background: var(--amber);
  color: var(--text);
  border-left: 3px solid var(--author-color, var(--amber-text));
  border-bottom-left-radius: 4px;
}

.note-bubble-text {
  font-size: 14px;
  line-height: 1.42;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.note-bubble-meta {
  font-size: 10.5px;
  color: var(--text-secondary);
  margin: 3px 4px 0;
}

.note-bubble-row.other .note-bubble-meta {
  color: var(--author-color, var(--text-secondary));
  font-weight: 600;
}

.notes-quick-add,
.notes-fullscreen-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notes-input-wrap {
  position: relative;
  flex: 1;
}

.mention-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 190px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md, 0 6px 20px rgba(24,24,24,0.12));
  z-index: 5;
}

.mention-dropdown-item {
  padding: 9px 14px;
  font-size: 14px;
  cursor: pointer;
}

.mention-dropdown-item:hover,
.mention-dropdown-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.mention-highlight {
  font-weight: 700;
}

.note-bubble-row.own .mention-highlight {
  color: #fff;
  text-decoration: underline;
}

.note-bubble-row.other .mention-highlight {
  color: var(--text);
  background: rgba(24,24,24,0.08);
  padding: 0 2px;
  border-radius: 3px;
}

.notes-quick-input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
}

.notes-quick-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.notes-send-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.notes-send-btn:hover {
  background: var(--accent-hover);
}

/* --- Notes full-screen chat --- */

.notes-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* Without this, [hidden] gets overridden by the display: flex rule
   above (same specificity, later rule wins) — meaning the full-screen
   chat would show by default instead of staying hidden until tapped
   open. Same bug pattern as .icon-btn, .modal-overlay, and
   .project-card-category elsewhere in this file. */
.notes-fullscreen[hidden] {
  display: none;
}

.notes-fullscreen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.notes-fullscreen-title {
  font-weight: 700;
  font-size: 15px;
  margin: 0;
  text-align: center;
}

.notes-fullscreen-subtitle {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin: 0;
  text-align: center;
}

.notes-fullscreen-input-row {
  padding: 12px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.back-btn:hover {
  color: var(--accent);
}

.detail-banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 32px;
  display: flex;
  align-items: flex-end;
}

.detail-banner-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.detail-banner-photo:not(:empty)::after,
.detail-banner.has-photo .detail-banner-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.05) 75%);
}

.detail-banner-watermark {
  position: absolute;
  bottom: 14px;
  right: 16px;
  width: 26px;
  height: 26px;
  z-index: 1;
  opacity: 0;
}

.detail-banner.has-photo .detail-banner-watermark {
  opacity: 0.85;
}

.detail-banner-body {
  position: relative;
  z-index: 1;
  padding: 20px 24px;
  width: 100%;
}

.detail-banner.has-photo .detail-banner-body h1,
.detail-banner.has-photo .detail-banner-body .page-subtitle {
  color: white;
}

.detail-banner-body h1 {
  font-size: 26px;
  margin: 4px 0;
}

.detail-section {
  margin-bottom: 36px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.btn-small {
  padding: 6px 14px;
  font-size: 13px;
}

.section-empty {
  color: var(--text-secondary);
  font-size: 14px;
  padding: 16px 0;
}

/* --- Call list --- */

.call-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.call-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.call-item:hover {
  border-color: var(--accent);
}

.call-item-main {
  min-width: 0;
}

.call-item-date {
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 2px 0;
}

.call-item-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.call-item-status {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* --- Unread notes/chat badges (call list rows + project cards) --- */

.call-item-main-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.unread-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 100px;
  background: #A85B4C;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

/* A badge that includes an unread @mention is a stronger signal than
   plain unread messages — solid black instead of red, with a thin
   gold ring, so it visually reads as "higher priority" rather than
   just "more of the same." */
.unread-badge.mention,
.project-card-unread-badge.mention {
  background: var(--text);
  box-shadow: 0 0 0 2px var(--amber);
}

.project-card-unread-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 100px;
  background: #A85B4C;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.call-item-status.pending {
  background: var(--amber-soft);
  color: var(--amber-text);
}

/* --- Contact list --- */

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
}

.contact-item-name {
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 2px 0;
}

.contact-item-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.contact-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.contact-item-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent);
}

.contact-item.clickable {
  cursor: pointer;
}

.contact-item.clickable:hover {
  border-color: var(--accent);
}

/* --- Edit Contact modal: editable project tags --- */

.editable-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.editable-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 6px 5px 12px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent);
}

.editable-tag button {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 50%;
}

.editable-tag button:hover {
  background: rgba(94, 116, 122, 0.15);
}

.add-to-project-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.add-to-project-row select {
  flex: 1;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

/* --- Call Detail view --- */

.call-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.call-detail-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0;
}

#call-detail-title {
  font-size: 26px;
  margin: 0 0 4px 0;
}

/* --- Custom audio player --- */

.audio-player-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
}

.audio-play-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.audio-play-btn:hover {
  background: var(--accent-hover);
}

/* Nudge the play triangle so it looks visually centered */
#audio-play-icon {
  margin-left: 2px;
}

.audio-progress-wrap {
  flex: 1;
  min-width: 0;
}

.audio-progress-track {
  height: 5px;
  border-radius: 100px;
  background: var(--border);
  cursor: pointer;
  margin-bottom: 8px;
}

.audio-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 100px;
  background: var(--accent);
}

.audio-times {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

#call-recording-player {
  display: none;
}

/* --- Auth view --- */

.auth-wrap {
  max-width: 380px;
  margin: 48px auto 0;
  text-align: center;
}

.auth-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  display: block;
}

.auth-wrap .auth-form {
  text-align: left;
  margin-top: 20px;
}

.auth-submit-btn {
  width: 100%;
  margin-top: 6px;
}

.link-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: none;
  border: none;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 12px 0 0 0;
}

.link-btn:hover {
  text-decoration: underline;
}

/* --- Pill tabs (Summary / Transcript) --- */

.pill-tabs {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px;
  margin-bottom: 24px;
}

.pill-tab {
  flex: 1;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: 100px;
  padding: 9px 0;
  cursor: pointer;
}

.pill-tab:hover {
  color: var(--text);
}

.pill-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.tab-panel {
  margin-bottom: 20px;
}

/* --- Summary blocks: visually distinct sections within Summary tab --- */

.summary-block {
  margin-bottom: 28px;
}

.summary-block:last-child {
  margin-bottom: 0;
}

.summary-block-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 10px 0;
}

.tab-text {
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.dotted-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.6;
}

.dotted-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
}

.dotted-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.keypoints-dots li::before {
  background: var(--accent);
}

.actionitems-dots li::before {
  background: var(--amber);
}

.transcript-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  color: var(--text);
  max-height: 400px;
  overflow-y: auto;
}

#generate-summary-btn {
  margin-top: 10px;
}

/* --- Send Update modal: contact checkbox rows --- */

.send-update-contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}

.send-update-contact-row:hover {
  border-color: var(--accent);
}

.send-update-contact-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.send-update-contact-info p {
  margin: 0;
}

.send-update-contact-name {
  font-weight: 600;
  font-size: 14px;
}

.send-update-contact-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

#send-update-manual-name,
#send-update-manual-email,
#send-update-manual-phone {
  margin-bottom: 8px;
}

.project-badge-btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--accent-soft);
  color: var(--accent);
  border: none;
  cursor: pointer;
  margin: 8px 0 20px 0;
}

.project-badge-btn:hover {
  background: var(--accent);
  color: white;
}

/* --- Call Detail project tags row --- */

.call-project-tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 20px 0;
}

.add-project-tag-btn {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: 1px dashed var(--accent);
  border-radius: 100px;
  padding: 4px 12px;
  cursor: pointer;
}

.add-project-tag-btn:hover {
  background: var(--accent-soft);
}

/* --- Quick-select row (Send Update modal) --- */

.quick-select-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.call-parties {
  margin-bottom: 20px;
  font-size: 14px;
}

.call-parties p {
  margin: 0 0 4px 0;
}

.call-parties-label {
  color: var(--text-secondary);
  font-weight: 600;
  margin-right: 4px;
}

.unassigned-note {
  background: var(--amber-soft);
  color: var(--amber-text);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
}

.deleted-call-banner {
  background: #F3E1DC;
  color: #A85B4C;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.call-item.deleted {
  opacity: 0.6;
}

.call-item.deleted .call-item-date {
  text-decoration: line-through;
  font-weight: 400;
}

/* --- Help screen --- */

.help-category-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 24px 0 10px 0;
}

.help-category-heading:first-child {
  margin-top: 0;
}

.help-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.help-item-question {
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 6px 0;
}

.help-item-answer {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.help-highlight {
  background: var(--amber-soft);
  color: var(--amber-text);
  border-radius: 3px;
  padding: 0 2px;
}

.audio-download-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}

.audio-download-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}