:root {
  --bg: #f1f4f8;
  --panel: #ffffff;
  --panel-soft: #f6f8fb;
  --ink: #101623;
  --muted: #5f6c80;
  --line: #dde4ed;
  --line-strong: #cbd5e2;
  --side: #111722;
  --side-2: #171f2d;
  --side-text: #98a4b8;
  --blue: #2563eb;
  --blue-2: #174bd4;
  --teal: #087f8c;
  --green: #12805c;
  --amber: #c77b11;
  --red: #c63d57;
  --purple: #6755d9;
  --shadow: 0 16px 42px rgba(16, 22, 35, 0.09);
  --shadow-soft: 0 7px 22px rgba(16, 22, 35, 0.07);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.top-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(245, 247, 251, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.compact-brand {
  width: auto;
  padding: 0;
  color: var(--ink);
}

.topbar .brand small {
  color: var(--muted);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.topnav button {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 0 12px;
  font-weight: 800;
}

.topnav button.active,
.topnav button:hover {
  background: #eaf0ff;
  color: var(--blue);
}

.lean-main {
  max-width: 1380px;
  margin: 0 auto;
}

.call-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.call-card {
  display: grid;
  gap: 12px;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 16px;
  text-align: left;
}

.call-card:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 99, 230, 0.12);
}

.call-card strong {
  font-size: 18px;
}

.call-card small,
.call-card-meta {
  color: var(--muted);
}

.lean-detail-grid {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.comments-only {
  display: grid;
  gap: 18px;
}

.comment-markers {
  position: absolute;
  left: 9px;
  right: 9px;
  top: -2px;
  height: 34px;
  pointer-events: none;
}

.comment-marker {
  position: absolute;
  top: 0;
  width: 18px;
  height: 34px;
  transform: translateX(-50%);
  border: 0;
  background: transparent;
  padding: 0;
  pointer-events: auto;
  cursor: ew-resize;
  touch-action: none;
}

.comment-marker.dragging-marker span {
  transform: translateX(-50%) scale(1.2);
}

.comment-marker.active-playback-comment span {
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18), 0 3px 10px rgba(37, 99, 235, 0.32);
}

.comment-marker span {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 10px;
  height: 10px;
  transform: translateX(-50%);
  border: 2px solid white;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 2px 8px rgba(17, 24, 39, 0.25);
}

.comment-marker::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: 32px;
  width: min(280px, 70vw);
  transform: translateX(-50%);
  border-radius: var(--radius);
  background: #111827;
  color: white;
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.comment-marker:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-3px);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

code {
  background: #eef2f7;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  color: white;
  text-align: left;
  padding: 6px;
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand small {
  display: block;
  color: var(--side-text);
  margin-top: 3px;
}

.brand-mark {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #3769eb, #214fcf);
  color: white;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.brand-mark.large {
  width: 60px;
  height: 60px;
  margin-inline: auto;
  font-size: 20px;
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.main-shell {
  min-width: 0;
  padding: 28px clamp(18px, 4vw, 48px) 48px;
}

.page-header,
.detail-header,
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1,
.detail-header h1 {
  margin: 4px 0 8px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}

.page-header p,
.detail-header p,
.muted {
  color: var(--muted);
  margin: 0;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.panel,
.metric-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel {
  padding: 22px;
}

.panel h2 {
  margin: 0;
  font-size: 18px;
}

.panel h3 {
  margin: 22px 0 10px;
  font-size: 14px;
}

.primary,
.secondary,
.ghost,
.icon-button,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
}

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

.primary:hover {
  background: var(--blue-2);
}

.secondary {
  background: white;
  border-color: var(--line-strong);
  color: var(--ink);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.file-action {
  cursor: pointer;
}

.ghost {
  background: transparent;
  color: var(--blue);
  border-color: transparent;
}

.ghost.compact {
  min-height: 32px;
  padding-inline: 10px;
  font-size: 13px;
}

.full {
  width: 100%;
}

.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  background: white;
  border-color: var(--line);
  color: var(--ink);
}

.icon-button.subtle {
  width: 34px;
  height: 34px;
  background: transparent;
  color: var(--muted);
}

.play-button {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  box-shadow: 0 12px 24px rgba(47, 99, 230, 0.3);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-card {
  padding: 18px;
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin: 12px 0 4px;
  font-size: 34px;
}

.metric-card small {
  color: var(--muted);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.75fr;
  gap: 18px;
}

.span-2 {
  grid-column: span 1;
}

.call-list,
.stack-list,
.comment-list {
  display: grid;
  gap: 10px;
}

.call-row-small,
.mini-row,
.tag-meter,
.best-card,
.moment-side-row,
.objection-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  text-align: left;
}

.call-row-small {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.call-row-small strong,
.mini-row span,
.best-card strong,
.moment-side-row strong {
  display: block;
}

.call-row-small small,
.mini-row small,
.best-card small,
.moment-side-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.call-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}

.call-dot.shared {
  background: var(--green);
}

.tag-meter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
}

.tag-meter-list {
  display: grid;
  gap: 8px;
}

.best-grid,
.playlist-grid,
.objection-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.best-card,
.playlist-card {
  padding: 16px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag,
.category-pill,
.pill,
.type-badge,
.share-state,
.timestamp-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  min-height: 28px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.tag {
  background: #edf2fa;
  color: #253047;
}

.category-pill {
  width: fit-content;
  background: #fff3d8;
  color: #8a5a05;
}

.pill {
  background: #eef2f7;
  color: #344054;
}

.outcome-booked-meeting {
  background: #dff7e9;
  color: #0c7a42;
}

.outcome-not-interested,
.outcome-bad-fit {
  background: #fde9e9;
  color: #a33333;
}

.outcome-callback,
.outcome-follow-up {
  background: #fff3d8;
  color: #8a5a05;
}

.share-state.private {
  background: #eef2f7;
  color: #536174;
}

.share-state.shared {
  background: #e6f5ee;
  color: #107244;
}

.filters {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 99, 230, 0.12);
}

.table-wrap {
  overflow-x: auto;
}

.call-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.call-table th {
  color: var(--muted);
  font-size: 12px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.call-table th,
.call-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 10px;
  vertical-align: middle;
}

.call-table tbody tr {
  cursor: pointer;
}

.call-table tbody tr:hover {
  background: var(--panel-soft);
}

.call-table small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.upload-layout,
.detail-grid,
.objection-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.upload-form {
  display: grid;
  gap: 16px;
}

.drop-zone {
  position: relative;
  min-height: 210px;
  place-items: center;
  text-align: center;
  border: 1.5px dashed var(--line-strong);
  background: var(--panel-soft);
  border-radius: var(--radius);
  padding: 28px;
  cursor: pointer;
}

.drop-zone input.audio-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.drop-zone:focus-within,
.drop-zone.drag-active {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue) 6%, var(--panel-soft));
}

.drop-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: #eaf0ff;
  color: var(--blue);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid.single {
  grid-template-columns: 1fr;
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.schema-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.schema-list span {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.detail-page {
  max-width: 1440px;
}

.back-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  margin-bottom: 18px;
  font-weight: 700;
}

.detail-grid {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.detail-main {
  display: grid;
  gap: 18px;
}

.detail-side {
  display: grid;
  gap: 18px;
}

.player-card {
  padding: 28px;
}

.timeline-shell {
  position: relative;
  padding: 0 6px 22px;
}

.progress {
  accent-color: var(--blue);
  height: 28px;
  padding: 0;
}

.moment-markers {
  position: absolute;
  left: 9px;
  right: 9px;
  top: 7px;
  height: 14px;
  pointer-events: none;
}

.moment-markers button {
  position: absolute;
  top: 0;
  height: 14px;
  border: 1px solid rgba(130, 83, 0, 0.25);
  border-radius: 999px;
  background: rgba(221, 155, 40, 0.78);
  pointer-events: auto;
}

.time-row,
.compose-meta,
.comment-meta,
.details-list div,
.switch-row,
.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.time-row {
  color: var(--muted);
  font-weight: 700;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.speed-group {
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: var(--radius);
  background: #eef2f7;
  padding: 5px;
}

.speed-button {
  min-width: 56px;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}

.speed-button.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(17, 24, 39, 0.16);
}

.volume-control {
  grid-auto-flow: column;
  grid-template-columns: auto 140px;
  align-items: center;
  margin-left: auto;
}

.audio-status {
  color: var(--muted);
  margin: 16px 0 0;
  font-size: 13px;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin: -22px -22px 22px;
}

.tab {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 18px 22px 15px;
  font-weight: 800;
}

.tab.active {
  border-color: var(--blue);
  color: var(--ink);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: grid;
  gap: 18px;
}

.compose-card {
  display: grid;
  gap: 12px;
  background: var(--panel-soft);
  border-radius: var(--radius);
  padding: 18px;
}

.timestamp-pill {
  border: 0;
  background: #eaf0ff;
  color: var(--blue);
}

.type-badge {
  background: #eef2ff;
  color: var(--blue);
}

.type-badge.warm {
  background: #fff1dd;
  color: #8a5a05;
}

.comment-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.comment-row p {
  margin: 6px 0 0;
  line-height: 1.5;
}

.comment-row.active-playback-comment {
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue) 7%, white);
  box-shadow: inset 3px 0 0 var(--blue);
}

.comment-row.active-playback-comment .timestamp-pill {
  background: var(--blue);
  color: white;
}

.comment-time-cell {
  display: flex;
  align-items: center;
  gap: 3px;
}

.comment-time-edit {
  display: inline-grid;
  width: 24px;
  min-height: 24px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0;
}

.comment-time-edit .icon {
  width: 13px;
  height: 13px;
}

.comment-time-form {
  display: flex;
  align-items: center;
  gap: 3px;
}

.comment-time-form[hidden],
.comment-time-cell.editing-time > .timestamp-pill,
.comment-time-cell.editing-time > .comment-time-edit {
  display: none;
}

.comment-time-form input {
  width: 68px;
  min-height: 30px;
  padding: 4px 7px;
  font-weight: 700;
}

.comment-time-form .icon-button {
  width: 28px;
  height: 28px;
  min-height: 28px;
}

.comment-meta {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 13px;
}

.details-list {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}

.details-list div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.details-list dt {
  color: var(--muted);
}

.details-list dd {
  margin: 0;
  font-weight: 800;
}

.moment-side-row {
  padding: 12px;
}

.full-span {
  grid-column: 1 / -1;
}

.playlist-card {
  display: grid;
  gap: 14px;
}

.playlist-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.mini-row {
  padding: 12px;
}

.objection-layout {
  grid-template-columns: 380px minmax(0, 1fr);
}

.objection-grid {
  grid-template-columns: 1fr;
}

.objection-card {
  padding: 16px;
}

.objection-card.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 99, 230, 0.12);
}

.auth-page,
.public-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(47, 99, 230, 0.12), transparent 34%),
    var(--bg);
}

.auth-card,
.public-shell {
  width: min(1120px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.auth-card {
  width: min(440px, 100%);
  text-align: center;
}

.auth-card h1 {
  margin-bottom: 8px;
}

.auth-card p {
  color: var(--muted);
  line-height: 1.5;
}

.public-shell {
  display: grid;
  gap: 18px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(10, 16, 26, 0.48);
  padding: 18px;
  z-index: 20;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  display: grid;
  gap: 16px;
  width: min(520px, 100%);
  background: white;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
}

.switch-row {
  grid-template-columns: 1fr auto;
}

.switch-row input {
  width: 22px;
  height: 22px;
}

.copy-row input {
  min-width: 0;
}

.empty-state {
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}

progress {
  width: 100%;
  height: 12px;
  accent-color: var(--blue);
}

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

  .metric-grid,
  .best-grid,
  .playlist-grid,
  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .upload-layout,
  .detail-grid,
  .objection-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .search-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topnav {
    width: 100%;
  }

  .topnav button {
    flex: 1;
  }

  .call-card-grid {
    grid-template-columns: 1fr;
  }

  .main-shell {
    padding: 22px 14px 38px;
  }

  .page-header,
  .detail-header,
  .panel-head {
    display: grid;
  }

  .metric-grid,
  .best-grid,
  .playlist-grid,
  .settings-grid,
  .form-grid,
  .form-grid.three,
  .detail-side,
  .filters {
    grid-template-columns: 1fr;
  }

  .player-card {
    padding: 18px;
  }

  .player-controls {
    justify-content: center;
  }

  .speed-group {
    width: 100%;
    overflow-x: auto;
  }

  .volume-control {
    width: 100%;
    margin-left: 0;
  }

  .comment-row {
    grid-template-columns: 1fr;
  }
}

/* 2026 refresh: phone-first layout, touch targets, and scannable tag color. */
body {
  background:
    linear-gradient(180deg, #fbfcfe 0, var(--bg) 360px);
}

.top-shell {
  display: grid;
  align-content: start;
}

.topbar {
  min-height: 0;
  padding: 12px 14px;
  gap: 12px;
  flex-direction: column;
  align-items: stretch;
  background: color-mix(in srgb, #fbfcfe 88%, transparent);
}

.compact-brand {
  min-height: 48px;
  width: min(220px, 100%);
  flex: 0 0 auto;
  overflow: hidden;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ink), var(--blue));
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 74px;
  object-fit: contain;
  object-position: left center;
}

.topnav {
  width: 100%;
  min-height: 48px;
  overflow-x: auto;
  gap: 4px;
  padding: 4px;
  border-color: rgba(203, 213, 226, 0.9);
  box-shadow: var(--shadow-soft);
}

.topnav button {
  flex: 1 0 92px;
  min-height: 40px;
  font-weight: 700;
  white-space: nowrap;
}

.main-shell {
  width: 100%;
  padding: 18px 14px 40px;
}

.page-header,
.detail-header,
.panel-head {
  display: grid;
  gap: 12px;
}

.page-header {
  margin-bottom: 18px;
}

.page-header h1,
.detail-header h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.08;
}

.page-header p,
.detail-header p,
.panel p,
.comment-row p {
  line-height: 1.5;
}

.header-actions,
.header-actions .primary,
.detail-header > .secondary {
  width: 100%;
}

.panel,
.metric-card {
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.library-panel {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.filters {
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

label {
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0;
}

input,
select,
textarea {
  min-height: 46px;
  padding: 12px;
  border-color: var(--line);
  background: #fff;
}

textarea {
  min-height: 108px;
}

.primary,
.secondary,
.ghost,
.icon-button {
  min-height: 44px;
}

.primary {
  box-shadow: 0 9px 22px rgba(37, 99, 235, 0.22);
}

.secondary {
  background: color-mix(in srgb, white 84%, var(--panel-soft));
}

.secondary.danger {
  border-color: color-mix(in srgb, var(--red) 35%, var(--line));
  color: var(--red);
}

.call-card-grid,
.metric-grid,
.best-grid,
.playlist-grid,
.settings-grid,
.form-grid,
.form-grid.three,
.detail-side {
  grid-template-columns: 1fr;
}

.call-card-grid {
  gap: 11px;
}

.call-card {
  gap: 11px;
  min-height: 0;
  padding: 15px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 251, 0.94));
  box-shadow: var(--shadow-soft);
}

.call-card:hover {
  transform: translateY(-1px);
  transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.call-card strong {
  font-size: 17px;
  line-height: 1.3;
}

.call-card small {
  line-height: 1.45;
}

.tags {
  gap: 6px;
}

.tag {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--tag-color, var(--blue)) 42%, white);
  background: color-mix(in srgb, var(--tag-color, var(--blue)) 17%, white);
  color: color-mix(in srgb, var(--tag-color, var(--blue)) 78%, #101623);
  text-overflow: ellipsis;
}

.tag-color-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.tag-color-head {
  display: grid;
  gap: 3px;
  color: var(--ink);
  font-size: 13px;
}

.tag-color-head span,
.tag-color-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 600;
}

.tag-color-list {
  display: grid;
  gap: 8px;
}

.tag-color-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 50px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.color-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.color-field input {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 3px;
}

.quick-fields {
  display: grid;
  gap: 0;
  margin-top: 12px;
}

.quick-field {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.quick-field:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.quick-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-field-value {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.quick-field-value p {
  margin: 0;
  font-weight: 500;
}

.quick-edit-button {
  opacity: 1;
}

.quick-field-form {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.quick-field-form[hidden] {
  display: none;
}

.quick-inline-form[hidden] {
  display: none;
}

.quick-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-actions button {
  flex: 1 1 120px;
}

.tag-manager-list {
  display: grid;
  gap: 8px;
}

.tag-manager-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px 38px;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.tag-manager-row .tag {
  width: fit-content;
}

.tag-manager-row input,
.tag-create-fields input[type="color"] {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  height: 42px;
  padding: 3px;
}

.tag-manager-row .icon-button {
  width: 38px;
  min-height: 38px;
  height: 38px;
}

.tag-add-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: end;
}

.tag-picker-field {
  min-width: 0;
}

.tag-create-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 8px;
  align-items: end;
}

.tag-create-fields[hidden] {
  display: none;
}

.tag-empty {
  margin: 0;
}

.label-manager {
  padding: 0;
  border: 0;
  background: transparent;
}

.upload-labels,
.form-section-head {
  display: grid;
  gap: 7px;
}

.form-section-head {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
}

.form-section-head .muted {
  font-weight: 600;
}

.label-picker-form .label-picker-list {
  max-height: min(290px, 38vh);
}

.label-picker {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.label-search {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
}

.label-search-icon {
  display: inline-flex;
}

.label-search-icon .icon {
  width: 18px;
  height: 18px;
}

.label-search-tokens {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.label-token {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 25px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  padding: 0;
}

.label-token .tag {
  min-height: 24px;
  border: 0;
  background: var(--tag-color, var(--blue));
  color: color-mix(in srgb, var(--tag-color, var(--blue)) 18%, white);
  font-size: 12px;
}

.label-search input {
  flex: 1 1 92px;
  width: auto;
  min-width: 92px;
  min-height: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  box-shadow: none;
  font-size: 15px;
  font-weight: 500;
}

.label-search input::placeholder {
  color: #8994a7;
}

.label-picker-list {
  display: grid;
  max-height: min(330px, 44vh);
  overflow-y: auto;
  padding: 7px 12px 9px;
  border-top: 1px solid var(--line);
}

.label-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-height: 43px;
}

.label-picker-row[hidden] {
  display: none;
}

.label-select,
.label-icon-button,
.label-create-button {
  border: 0;
  background: transparent;
  color: inherit;
}

.label-select {
  display: flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
}

.label-tools {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 80px;
  justify-content: flex-end;
}

.label-grip,
.label-icon-button,
.label-check {
  display: inline-grid;
  width: 24px;
  height: 28px;
  place-items: center;
}

.label-grip .icon,
.label-icon-button .icon,
.label-check .icon {
  width: 17px;
  height: 17px;
}

.label-grip {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  cursor: grab;
  touch-action: none;
}

.label-grip:active {
  cursor: grabbing;
}

.label-picker-row.dragging-label {
  opacity: 0.46;
}

.label-icon-button {
  padding: 0;
  color: var(--ink);
}

.label-check {
  visibility: hidden;
  color: var(--blue);
}

.label-picker-row.selected .label-check {
  visibility: visible;
}

.label-picker-row.editing-label .label-select,
.label-picker-row.editing-label .label-tools {
  display: none;
}

.label-picker-row .tag {
  min-height: 27px;
  border: 0;
  border-radius: 7px;
  padding-inline: 8px;
  background: var(--tag-color, var(--blue));
  color: color-mix(in srgb, var(--tag-color, var(--blue)) 18%, white);
  font-size: 13px;
  font-weight: 800;
}

.label-edit-fields,
.label-create-fields {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 8px;
  align-items: end;
  margin: 1px 0 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.label-edit-fields[hidden],
.label-create-fields[hidden] {
  display: none;
}

.label-edit-fields label,
.label-create-fields label {
  color: var(--muted);
}

.label-edit-fields input:not([type="color"]),
.label-create-fields input:not([type="color"]) {
  border-color: var(--line);
  background: white;
  color: var(--ink);
}

.label-edit-fields input[type="color"],
.label-create-fields input[type="color"] {
  width: 48px;
  min-width: 48px;
  height: 40px;
  min-height: 40px;
  padding: 4px;
  border-color: var(--line);
  background: white;
}

.label-edit-fields button,
.label-create-fields button {
  min-height: 38px;
}

.label-create-fields button {
  grid-column: 1 / -1;
}

.label-create-button {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  color: var(--blue);
  font-weight: 700;
}

.label-create-button[hidden] {
  display: none;
}

.label-create-slot {
  display: grid;
  border-top: 1px solid var(--line);
}

.label-create-fields {
  grid-column: auto;
  margin: 9px 10px 10px;
}

.label-picker-empty {
  margin: 5px 0;
  color: var(--muted);
}

.category-pill,
.share-state,
.timestamp-pill {
  border: 1px solid transparent;
}

.category-pill {
  background: #fff2d8;
  border-color: #efd09a;
}

.share-state.shared {
  border-color: #b9dfcc;
}

.upload-layout,
.detail-grid,
.objection-layout {
  grid-template-columns: 1fr;
  gap: 14px;
}

.drop-zone {
  min-height: 188px;
  padding: 20px 14px;
}

.detail-page {
  min-width: 0;
}

.back-link {
  min-height: 36px;
  margin-bottom: 10px;
}

.detail-main,
.detail-side,
.public-shell {
  gap: 14px;
}

.player-card {
  padding: 18px 14px;
}

.timeline-shell {
  padding-inline: 2px;
}

.player-controls {
  justify-content: center;
  gap: 10px;
}

.play-button {
  width: 62px;
  height: 62px;
}

.speed-group {
  width: 100%;
  overflow-x: auto;
  justify-content: space-between;
  scrollbar-width: thin;
}

.speed-button {
  min-width: 52px;
  flex: 1 0 auto;
}

.compose-card {
  padding: 14px;
  border: 1px solid var(--line);
}

.compose-meta,
.copy-row {
  flex-wrap: wrap;
}

.comment-row {
  grid-template-columns: 1fr;
  gap: 9px;
  padding: 14px 0;
}

.comment-row > .icon-button {
  justify-self: end;
}

.details-list dd {
  text-align: right;
  overflow-wrap: anywhere;
}

.auth-page,
.public-page {
  padding: 14px;
  place-items: start center;
}

.auth-card,
.public-shell {
  padding: 18px 14px;
}

.modal-backdrop {
  align-items: end;
  padding: 10px;
}

.modal {
  max-height: calc(100vh - 20px);
  overflow-y: auto;
  padding: 18px 14px;
}

.empty-state {
  background: rgba(255, 255, 255, 0.7);
}

@media (min-width: 700px) {
  .topbar {
    align-items: stretch;
    padding: 14px 24px;
  }

  .main-shell {
    padding: 28px 24px 50px;
  }

  .page-header,
  .detail-header,
  .panel-head {
    display: flex;
  }

  .page-header h1,
  .detail-header h1 {
    font-size: 38px;
  }

  .header-actions,
  .header-actions .primary,
  .detail-header > .secondary {
    width: auto;
  }

  .panel,
  .metric-card {
    padding: 20px;
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
  }

  .search-field {
    grid-column: 1 / -1;
  }

  .call-card-grid,
  .settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid,
  .form-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid.single {
    grid-template-columns: 1fr;
  }

  .comment-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
  }

  .modal-backdrop {
    align-items: center;
    padding: 18px;
  }

  .modal,
  .auth-card,
  .public-shell {
    padding: 24px;
  }

  .quick-actions button {
    flex: 0 0 auto;
  }

  .tag-add-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .tag-create-fields {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) 74px;
  }
}

@media (min-width: 1080px) {
  .topbar {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    padding-inline: clamp(28px, 4vw, 48px);
  }

  .compact-brand {
    width: 246px;
  }

  .topnav {
    width: auto;
    min-width: 328px;
    margin-left: auto;
  }

  .main-shell {
    padding-inline: clamp(28px, 4vw, 48px);
  }

  .page-header h1,
  .detail-header h1 {
    font-size: 42px;
  }

  .filters {
    grid-template-columns: minmax(280px, 2fr) repeat(2, minmax(160px, 1fr));
  }

  .search-field {
    grid-column: auto;
  }

  .call-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }

  .upload-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
  }

  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
  }

  .detail-side {
    grid-template-columns: 1fr;
  }

  .player-card {
    padding: 28px;
  }
}

/* Compact call review surfaces. */
.detail-page {
  max-width: 1280px;
}

.detail-page .back-link {
  margin-bottom: 7px;
}

.detail-page .detail-header {
  gap: 10px;
  margin-bottom: 12px;
}

.detail-page .detail-header h1 {
  margin-bottom: 3px;
  font-size: 26px;
  line-height: 1.1;
}

.detail-page .detail-header p {
  font-size: 13px;
}

.detail-page .detail-header > .secondary {
  width: auto;
  min-height: 36px;
  justify-self: start;
  padding-inline: 11px;
}

.detail-page .detail-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.detail-page .detail-actions .secondary {
  width: auto;
  min-height: 36px;
  padding-inline: 11px;
}

.detail-page .detail-grid {
  gap: 10px;
}

.detail-page .detail-main,
.detail-page .detail-side {
  gap: 10px;
}

.detail-page .panel {
  padding: 12px;
}

.detail-page .panel-head {
  min-height: 32px;
  align-items: center;
  gap: 8px;
}

.detail-page .panel h2 {
  font-size: 15px;
}

.detail-page .detail-card {
  padding: 10px 12px;
}

.detail-page .quick-fields {
  margin-top: 5px;
}

.detail-page .quick-field {
  grid-template-columns: 70px minmax(0, 1fr) 30px;
  grid-template-areas:
    "label value edit"
    "form form form";
  align-items: center;
  gap: 5px 8px;
  min-height: 42px;
  padding: 6px 0;
}

.detail-page .quick-field-head {
  display: contents;
}

.detail-page .quick-field-head > span {
  grid-area: label;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-page .quick-field-value {
  grid-area: value;
  font-size: 13px;
  font-weight: 650;
}

.detail-page .quick-edit-button {
  grid-area: edit;
  width: 30px;
  height: 30px;
  min-height: 30px;
  justify-self: end;
}

.detail-page .fixed-field {
  grid-template-columns: 70px minmax(0, 1fr);
  grid-template-areas: "label value";
}

.detail-page .quick-field-form {
  grid-area: form;
  gap: 7px;
  margin-top: 2px;
  padding: 8px;
}

.detail-page .inline-edit-field.editing {
  grid-template-areas: "label form form";
}

.detail-page .inline-edit-field.editing .quick-field-value,
.detail-page .inline-edit-field.editing .quick-edit-button {
  display: none;
}

.detail-page .quick-inline-form {
  grid-area: form;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.detail-page .quick-inline-form[hidden] {
  display: none;
}

.detail-page .quick-inline-control {
  min-width: 0;
}

.detail-page .quick-inline-control input,
.detail-page .quick-inline-control select,
.detail-page .quick-inline-control textarea {
  min-height: 34px;
  padding: 6px 9px;
}

.detail-page .quick-inline-control textarea {
  min-height: 58px;
}

.detail-page .quick-inline-actions {
  display: flex;
  align-self: start;
  gap: 3px;
}

.detail-page .quick-inline-actions .icon-button {
  width: 30px;
  min-height: 30px;
  height: 30px;
}

.detail-page .quick-save {
  border-color: color-mix(in srgb, var(--green) 28%, var(--line));
  color: var(--green);
}

.detail-page .quick-field-form input,
.detail-page .quick-field-form select,
.detail-page .quick-field-form textarea {
  min-height: 38px;
  padding: 8px 10px;
}

.detail-page .quick-field-form textarea {
  min-height: 68px;
}

.detail-page .label-picker-list {
  max-height: min(260px, 36vh);
}

.detail-page .player-card {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
}

.detail-page .timeline-shell {
  padding: 0 1px 10px;
}

.detail-page .progress {
  height: 21px;
}

.detail-page .comment-markers {
  height: 26px;
}

.detail-page .comment-marker {
  height: 28px;
}

.detail-page .time-row {
  font-size: 12px;
}

.detail-page .player-controls {
  gap: 6px;
}

.detail-page .icon-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
}

.detail-page .icon-button .icon {
  width: 17px;
  height: 17px;
}

.detail-page .play-button {
  width: 42px;
  height: 42px;
  min-height: 42px;
  box-shadow: 0 7px 18px rgba(37, 99, 235, 0.22);
}

.detail-page .play-button .icon {
  width: 18px;
  height: 18px;
}

.detail-page .speed-group {
  width: auto;
  gap: 1px;
  padding: 3px;
}

.detail-page .speed-button {
  min-width: 38px;
  min-height: 29px;
  font-size: 12px;
}

.detail-page .audio-status {
  margin-top: 0;
  font-size: 12px;
}

.detail-page .comments-only {
  gap: 12px;
}

.detail-page .compose-card {
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  padding: 11px;
}

.detail-page .compose-card textarea {
  min-height: 58px;
  padding: 9px 10px;
}

.detail-page .compose-card .primary {
  min-height: 36px;
  justify-self: start;
  padding-inline: 11px;
}

.detail-page .compose-meta {
  font-size: 12px;
}

.detail-page .comment-list {
  gap: 4px;
}

.detail-page .comment-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 10px 0;
}

.detail-page .comment-row.active-playback-comment {
  margin-inline: -8px;
  padding-inline: 8px;
}

.detail-page .comment-row p {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.42;
}

.detail-page .comment-row p.editing-comment {
  border: 1px solid var(--blue);
  border-radius: 7px;
  background: var(--panel-soft);
  outline: 0;
  padding: 6px 8px;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.detail-page .comment-meta {
  gap: 9px;
  font-size: 11px;
}

.detail-page .comment-actions {
  display: flex;
  gap: 4px;
}

.detail-page .timestamp-pill,
.detail-page .tag,
.detail-page .category-pill,
.detail-page .share-state {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

@media (min-width: 1080px) {
  .detail-page .detail-grid {
    grid-template-columns: minmax(0, 1fr) 334px;
  }
}

/* Mobile playback polish. */
.progress {
  width: 100%;
  touch-action: pan-y;
  cursor: pointer;
}

.progress::-webkit-slider-thumb {
  cursor: grab;
}

.progress:active::-webkit-slider-thumb {
  cursor: grabbing;
}

.skip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 54px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(16, 22, 35, 0.06);
}

.skip-button .icon {
  width: 16px;
  height: 16px;
}

.download-recording-button {
  min-width: 108px;
}

.download-recording-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.comment-row[data-jump] {
  cursor: pointer;
}

.comment-row[data-jump]:hover {
  background: #f8fbff;
}

.comment-row[data-jump]:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .main-shell.route-call {
    padding-inline: 8px;
  }

  .detail-page .detail-grid,
  .detail-page .detail-main,
  .detail-page .detail-side {
    gap: 8px;
  }

  .detail-page .detail-header {
    margin-bottom: 8px;
  }

  .detail-page .panel,
  .detail-page .detail-card {
    padding-inline: 10px;
  }

  .detail-page .player-card {
    padding: 10px;
  }

  .detail-page .timeline-shell {
    padding: 2px 0 8px;
  }

  .detail-page .progress {
    height: 36px;
  }

  .detail-page .comment-markers {
    left: 0;
    right: 0;
  }

  .detail-page .player-controls {
    display: grid;
    grid-template-columns: 1fr 52px 1fr;
    align-items: center;
    gap: 8px;
  }

  .detail-page .skip-button {
    width: 100%;
    min-height: 42px;
  }

  .detail-page .play-button {
    width: 52px;
    height: 52px;
    min-height: 52px;
  }

  .detail-page .speed-group {
    grid-column: 1 / -1;
  }

  .detail-page .download-recording-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .detail-page .comment-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 62px;
    padding: 12px 4px;
  }

  .detail-page .comment-time-cell {
    grid-column: 1 / -1;
  }

  .detail-page .comment-actions {
    align-self: start;
  }
}
