/* Call logs — sidebar + table dashboard */

:root {
  --sidebar-from: #0f9aa8;
  --sidebar-to: #1a4f9c;
  --bg: #f3f5f9;
  --white: #ffffff;
  --ink: #1a2433;
  --muted: #7a8799;
  --blue: #2f6fdb;
  --blue-deep: #1f5fc4;
  --blue-soft: #e8f0fc;
  --line: #e6ebf2;
  --line-strong: #d7dee8;
  --complete-bg: #e6f7ef;
  --complete-fg: #1f7a4d;
  --incomplete-bg: #fdecef;
  --incomplete-fg: #c43d5a;
  --pending-bg: #e8f0fc;
  --pending-fg: #2a5a9a;
  --sidebar-w: 248px;
  --sidebar-collapsed: 72px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body.logs-page,
body.agent-page {
  height: 100vh;
  height: 100dvh;
  display: flex;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", sans-serif;
  font-weight: 400;
}

.hidden {
  display: none !important;
}

/* —— Sidebar —— */

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem 1.1rem;
  background: linear-gradient(180deg, var(--sidebar-from) 0%, var(--sidebar-to) 100%);
  color: #fff;
  transition: width 0.22s ease;
}

.sidebar.is-collapsed {
  width: var(--sidebar-collapsed);
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.sidebar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.sidebar-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-width: 0;
}

.brand-mark {
  flex-shrink: 0;
  color: #fff;
  opacity: 0.95;
  margin-top: 0.15rem;
}

.brand-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
}

.brand-sub {
  margin-top: 0.35rem;
  font-size: 0.68rem;
  font-weight: 300;
  line-height: 1.35;
  opacity: 0.82;
}

.sidebar.is-collapsed .brand-text,
.sidebar.is-collapsed .sidebar-footer span,
.sidebar.is-collapsed .nav-link span {
  display: none;
}

.sidebar-collapse {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.sidebar-collapse:hover {
  background: rgba(255, 255, 255, 0.22);
}

.sidebar.is-collapsed .sidebar-collapse svg {
  transform: rotate(180deg);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.is-active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.sidebar.is-collapsed .nav-link {
  justify-content: center;
  padding: 0.75rem;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.4rem 0.15rem;
  font-size: 0.72rem;
  opacity: 0.85;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 1rem;
}

.sidebar-footer a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sidebar.is-collapsed .sidebar-footer {
  justify-content: center;
}

/* —— Workspace —— */

.workspace {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workspace-header {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.75rem 1.1rem;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.header-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  line-height: 1.15;
  color: var(--ink);
}

.page-title em {
  font-style: italic;
  color: #c43d5a;
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  padding-top: 0.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-outline {
  background: var(--white);
  border-color: var(--blue);
  color: var(--blue);
}

.btn-outline:hover {
  background: var(--blue-soft);
}

.btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

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

.filter-dropdown {
  position: relative;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

.filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  min-width: 150px;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(26, 36, 51, 0.1);
}

.filter-option {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-radius: 7px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
}

.filter-option:hover,
.filter-option.is-active {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

/* —— Main —— */

.workspace-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.75rem 1.35rem;
  overflow: hidden;
}

.section-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.95rem;
}

.section-title-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
}

.section-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.section-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 300;
}

.section-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.record-count {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 400;
}

.load-older:disabled {
  opacity: 0.55;
  cursor: wait;
}

.empty {
  margin: 0 0 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* —— Table —— */

.table-card {
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(26, 36, 51, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.table-scroll {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  position: relative;
}

.calls-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.calls-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0.85rem;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.calls-table thead th:nth-child(1),
.calls-table .call-row > td:nth-child(1) {
  width: 14%;
}

.calls-table thead th:nth-child(2),
.calls-table .call-row > td:nth-child(2) {
  width: 22%;
}

.calls-table thead th:nth-child(3),
.calls-table .call-row > td:nth-child(3) {
  width: 16%;
}

.calls-table thead th:nth-child(4),
.calls-table .call-row > td:nth-child(4) {
  width: 14%;
}

.calls-table thead th:nth-child(5),
.calls-table .call-row > td:nth-child(5) {
  width: 10%;
}

.calls-table thead th:nth-child(6),
.calls-table .call-row > td:nth-child(6) {
  width: 16%;
}

.calls-table thead th.col-actions,
.calls-table thead th:nth-child(7),
.calls-table .call-row > td.col-actions,
.calls-table .call-row > td:nth-child(7) {
  width: 3.5rem;
  text-align: center;
  padding-left: 0.4rem;
  padding-right: 0.6rem;
}

.calls-table tbody tr.call-row {
  border-bottom: 1px solid var(--line);
}

.calls-table tbody tr.call-row:last-of-type {
  border-bottom: 0;
}

.calls-table .call-row > td {
  padding: 0.95rem 0.85rem;
  vertical-align: middle;
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 0;
}

.call-id {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--blue);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.call-id svg {
  flex-shrink: 0;
}

.caller-name {
  font-weight: 600;
  color: var(--ink);
}

.cell-muted {
  color: #5a6778;
  font-size: 0.88rem;
}

.mono {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-complete {
  background: var(--complete-bg);
  color: var(--complete-fg);
}

.status-incomplete {
  background: var(--incomplete-bg);
  color: var(--incomplete-fg);
}

.status-pending {
  background: var(--pending-bg);
  color: var(--pending-fg);
}

.expand-btn {
  width: 32px;
  height: 32px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.expand-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.call-row.is-open .expand-btn {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: var(--blue);
}

.call-row.is-open .expand-btn svg {
  transform: rotate(180deg);
}

.detail-row td {
  padding: 0 !important;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  max-width: 0;
}

.detail-panel {
  display: none;
  padding: 1rem 1.15rem 1.25rem;
  gap: 1.25rem;
  min-width: 0;
  max-width: 100%;
}

.call-row.is-open + .detail-row .detail-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.detail-col {
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-heading {
  margin: 0 0 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.quiet {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr);
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
  min-width: 0;
}

.field-row.field-stack {
  grid-template-columns: minmax(0, 1fr);
}

.field-label {
  color: var(--muted);
  font-weight: 400;
  min-width: 0;
}

.field-value {
  color: var(--ink);
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow: hidden;
}

.transcript-thread {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 280px;
  overflow-x: hidden;
  overflow-y: auto;
  min-width: 0;
  padding-right: 0.25rem;
}

.transcript-line {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}

.transcript-who {
  flex-shrink: 0;
  width: 34px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.transcript-line.agent .transcript-who {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.transcript-line.patient .transcript-who {
  background: #eee4f5;
  color: #6a3a8a;
}

.transcript-bubble {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* —— Skeleton —— */

.skeleton-list {
  position: absolute;
  inset: 48px 0 0;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: var(--white);
}

.skeleton-row {
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(90deg, #eef2f7 25%, #f7f9fc 50%, #eef2f7 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* —— Responsive —— */

@media (max-width: 960px) {
  .call-row.is-open + .detail-row .detail-panel {
    grid-template-columns: 1fr;
  }

  .workspace-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .header-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-top: 0;
  }

  .section-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .section-meta {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  body.logs-page,
  body.agent-page {
    flex-direction: column;
    overflow: hidden;
  }

  .workspace {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .workspace-main {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .table-card {
    flex: 0 0 auto;
    min-height: auto;
  }

  .sidebar {
    width: 100%;
    flex-shrink: 0;
    flex-direction: row;
    align-items: center;
    padding: 0.65rem 0.85rem;
    gap: 0.5rem;
  }

  .sidebar.is-collapsed {
    width: 100%;
  }

  .sidebar-top {
    margin-bottom: 0;
    align-items: center;
    flex: 1;
    min-width: 0;
  }

  .brand-mark svg {
    width: 28px;
    height: 28px;
  }

  .brand-name {
    font-size: 1.25rem;
  }

  .brand-sub,
  .sidebar-footer,
  .sidebar-collapse {
    display: none;
  }

  .sidebar-nav {
    flex-direction: row;
    flex: 0 0 auto;
    gap: 0.25rem;
  }

  .nav-link {
    text-transform: none;
    letter-spacing: 0;
    padding: 0.45rem 0.55rem;
    font-size: 0.72rem;
    gap: 0.35rem;
  }

  .nav-link span {
    display: none;
  }

  .workspace-header {
    flex-shrink: 0;
    padding: 0.85rem 0.9rem 0.75rem;
  }

  .eyebrow {
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    margin-bottom: 0.25rem;
  }

  .page-title {
    font-size: 1.35rem;
  }

  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.72rem;
  }

  .filter-chip {
    display: none;
  }

  .workspace-main {
    padding: 0.75rem 0.9rem 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .section-icon {
    display: none;
  }

  .section-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }

  .section-sub {
    font-size: 0.78rem;
  }

  .section-meta {
    gap: 0.5rem;
  }

  .record-count {
    font-size: 0.75rem;
  }

  .load-older {
    flex: 1;
    justify-content: center;
  }

  .table-card {
    flex: 0 0 auto;
    min-height: auto;
    border-radius: 10px;
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  .table-scroll {
    overflow: visible;
  }

  .calls-table,
  .calls-table thead,
  .calls-table tbody,
  .calls-table tr,
  .calls-table th,
  .calls-table td {
    display: block;
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .calls-table {
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
  }

  .calls-table thead {
    display: none;
  }

  .calls-table tbody {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
  }

  .calls-table tbody tr.call-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "id actions"
      "name name"
      "when when"
      "dob sex"
      "status status";
    gap: 0.45rem 0.85rem;
    align-items: start;
    padding: 0.9rem 0.95rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(26, 36, 51, 0.04);
  }

  .calls-table tbody tr.call-row.hidden {
    display: none;
  }

  .calls-table tbody tr.call-row.is-open {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
  }

  .calls-table .call-row > td {
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0;
    overflow: visible;
    white-space: normal;
    text-overflow: unset;
    border: 0;
  }

  .calls-table .call-row > td:nth-child(1) { grid-area: id; }
  .calls-table .call-row > td:nth-child(2) { grid-area: name; }
  .calls-table .call-row > td:nth-child(3) { grid-area: when; }
  .calls-table .call-row > td:nth-child(4) { grid-area: dob; }
  .calls-table .call-row > td:nth-child(5) { grid-area: sex; }
  .calls-table .call-row > td:nth-child(6) { grid-area: status; }
  .calls-table .call-row > td:nth-child(7) {
    grid-area: actions;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0;
    justify-self: end;
    text-align: right;
  }

  .calls-table .call-row > td:nth-child(4),
  .calls-table .call-row > td:nth-child(5) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.15rem;
    width: 100%;
    min-width: 0;
    font-size: 0.82rem;
  }

  .calls-table .call-row > td:nth-child(4)::before,
  .calls-table .call-row > td:nth-child(5)::before {
    content: attr(data-label);
    color: var(--muted);
    font-family: "Source Sans 3", sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .call-id {
    font-size: 0.82rem;
  }

  .caller-name {
    font-size: 1rem;
  }

  .cell-muted {
    font-size: 0.82rem;
  }

  .col-actions .expand-btn {
    margin: 0 0 0 auto;
  }

  .detail-row {
    display: block;
    width: 100%;
    margin-top: -0.7rem;
  }

  .detail-row.hidden {
    display: none;
  }

  .detail-row td {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    background: transparent;
    border: 0;
    padding: 0 !important;
    overflow: visible;
    white-space: normal;
  }

  .detail-panel {
    display: none;
    width: 100%;
    padding: 0.85rem 0.95rem 1rem;
    gap: 1rem;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 12px 12px;
    margin-bottom: 0.7rem;
  }

  .call-row.is-open + .detail-row .detail-panel {
    display: flex;
    flex-direction: column;
  }

  .detail-col {
    width: 100%;
    min-width: 0;
  }

  .field-row,
  .field-row.field-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    grid-template-columns: none;
    font-size: 0.82rem;
  }

  .field-value {
    width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
  }

  .transcript-thread {
    max-height: 220px;
  }

  .skeleton-list {
    position: static;
    inset: auto;
    padding: 0;
    background: transparent;
  }

  .skeleton-row {
    height: 110px;
    border-radius: 12px;
  }
}

/* —— Call us popup —— */

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 24, 38, 0.45);
}

.modal-card {
  position: relative;
  display: flex;
  width: min(920px, 94vw);
  height: min(460px, 78vh);
  padding: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 22px 56px rgba(26, 36, 51, 0.2);
  text-align: left;
}

.modal-media {
  flex: 0 0 40%;
  width: 40%;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: #d7dee8;
}

.modal-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.modal-body {
  flex: 1 1 60%;
  width: 60%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 2.4rem 2.8rem 1.6rem;
}

.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(26, 36, 51, 0.08);
}

.modal-close:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.modal-eyebrow {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.modal-title {
  margin: 0 0 0.95rem;
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-size: 2.35rem;
  font-weight: 500;
  line-height: 1.15;
}

.modal-copy {
  margin: 0;
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.65;
  max-width: 28rem;
}

.phone-placeholder {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.92em;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.modal-note {
  margin: auto 0 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.5;
  max-width: 28rem;
}

@media (max-width: 720px) {
  .modal-backdrop {
    padding: 0.85rem;
  }

  .modal-card {
    flex-direction: column;
    width: min(560px, 94vw);
    height: min(620px, 86vh);
  }

  .modal-media,
  .modal-body {
    width: 100%;
  }

  .modal-media {
    flex: 0 0 40%;
    height: 40%;
  }

  .modal-body {
    flex: 1 1 60%;
    height: 60%;
    padding: 1.6rem 1.4rem 1.7rem;
  }

  .modal-title {
    font-size: 1.9rem;
  }

  .modal-copy {
    font-size: 1.02rem;
  }
}

@media (max-width: 420px) {
  .nav-link {
    padding: 0.45rem;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions .btn,
  .header-actions .filter-dropdown {
    flex: 1;
  }

  .header-actions .filter-dropdown .btn {
    width: 100%;
    justify-content: center;
  }

  .header-actions .btn-outline {
    justify-content: center;
  }

  .page-title {
    font-size: 1.2rem;
  }

  .section-sub {
    display: none;
  }
}
