/* Corporate workspace: neutral surfaces, consistent controls and icon rail. */
.product-app {
  --green: #14624f;
  --ink: #24342f;
  --muted: #66746e;
  --line: #e1e7e4;
  --bg: #f4f6f7;
  --radius: 12px;
  font-size: 14px;
  color: var(--ink);
}
.product-app .layout {
  grid-template-columns: 248px minmax(0, 1fr);
}
.product-app .main {
  background: var(--bg);
}
.product-app .sidebar {
  background: #fff;
  padding: 16px 12px;
  border-right: 1px solid var(--line);
}
.product-app .sidebar .logo {
  padding: 8px 12px 20px;
}
.product-app .sidebar .prosanina-logo {
  width: 190px;
}
.brand-symbol {
  display: none;
  width: 38px;
  height: 38px;
  object-fit: contain;
}
.product-app .sidebar .workspace {
  border-radius: 9px;
  background: #f7f9f8;
  border-color: var(--line);
  padding: 10px 12px;
}
.product-app .sidebar .nav {
  font-size: 13px;
  font-weight: 500;
  min-height: 42px;
  padding: 10px 12px;
  gap: 11px;
  border-radius: 8px;
  margin: 2px 0;
  color: #52635b;
}
.product-app .sidebar .nav svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.75;
}
.product-app .sidebar .nav:hover {
  background: #f3f6f5;
  color: #153f31;
}
.product-app .sidebar .nav.active {
  background: #e8f2ed;
  color: #12563f;
  box-shadow: none;
  font-weight: 650;
}
.product-app .sidebar .navlabel {
  font-size: 10px;
  letter-spacing: 0.8px;
  color: #7b8982;
  padding: 20px 12px 8px;
}
.product-app .nav-search input {
  border-color: #e3e9e6;
  border-radius: 8px;
  background: #fafcfb;
}
.product-app .menu-toggle {
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #4e6158;
  flex: none;
}
.product-app .menu-toggle:hover {
  background: #eef4f0;
}
.product-app .menu-toggle svg {
  width: 20px;
  height: 20px;
}
.product-app .topbar {
  height: 64px;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
}
.product-app .breadcrumb {
  font-size: 13px;
  color: #748078;
}
.product-app .breadcrumb strong {
  color: #314b3d;
}
.product-app .avatar {
  border-radius: 50%;
  width: 32px;
  height: 32px;
  background: #edf2ef;
  color: #425e4d;
}
.product-app .content {
  padding: 28px;
  max-width: 1560px;
}
.product-app .heading {
  gap: 16px;
  margin-bottom: 24px;
  align-items: center;
}
.product-app .heading h1 {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.65px;
  line-height: 1.25;
  color: #22382b;
}
.product-app .heading p {
  font-size: 13px;
  line-height: 1.6;
  color: #6b7871;
  margin-top: 6px;
}
.product-app h2 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.25px;
}
.product-app h3 {
  font-size: 14px;
  font-weight: 600;
}
.product-app .card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 4px #203b2e03;
}
.product-app .btn {
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  min-height: 40px;
  padding: 10px 14px;
  box-shadow: none;
}
.product-app .btn:hover {
  transform: none;
  box-shadow: none;
}
.product-app .btn.secondary {
  background: #fff;
  border-color: #dce4df;
  color: #3d5849;
}
.product-app input,
.product-app select,
.product-app textarea {
  border-radius: 8px;
  border-color: #dce4df;
}
.product-app .badge {
  border-radius: 5px;
  font-size: 11px;
  font-weight: 550;
  padding: 4px 7px;
}
.product-app .hero {
  gap: 20px;
  border-radius: 0;
  margin-bottom: 20px;
  align-items: stretch;
}
.product-app .welcome {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.product-app .welcome h2 {
  font-size: 22px;
  letter-spacing: -0.5px;
  line-height: 1.35;
  margin: 18px 0 8px;
}
.product-app .welcome p {
  font-size: 13px;
  color: #68786e;
}
.product-app .welcome .eyebrow {
  font-size: 10px;
  letter-spacing: 1px;
  color: #6b8073;
}
.workspace-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}
.workspace-shortcuts button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  padding: 16px 12px;
  border: 1px solid #e0e8e3;
  border-radius: 10px;
  background: #f8fbf9;
  color: #325444;
  font-size: 12px;
  font-weight: 600;
  min-height: 88px;
}
.workspace-shortcuts button:hover {
  background: #eaf3ee;
  border-color: #b5cdbd;
}
.workspace-shortcuts svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.7;
}
.product-app .step {
  padding: 13px 0;
  border-bottom: 1px solid #edf1ef;
  border-radius: 0;
}
.product-app .step:last-child {
  border-bottom: 0;
}
.product-app .stepnum {
  width: 30px;
  height: 30px;
  font-size: 12px;
  border-radius: 8px;
  background: #f1f5f2;
  color: #5e7566;
  flex: none;
}
.product-app .stepnum svg {
  width: 16px;
  height: 16px;
}
.product-app .step h3 {
  font-size: 13px;
}
.product-app .step p {
  font-size: 12px;
  line-height: 1.6;
}
.product-app .stats {
  gap: 16px;
}
.product-app .stats .stat {
  padding: 20px 22px;
  border-top: 2px solid #a8c3b2;
}
.product-app .stats .stat small {
  font-size: 12px;
  color: #6a7b70;
}
.product-app .stats .stat strong {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.8px;
  color: #25412e;
}
.product-app .action-banner {
  background: #fff;
  color: #234432;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
  padding: 24px;
}
.product-app .action-banner h2 {
  font-size: 22px;
  color: #234432;
}
.product-app .action-banner p,
.product-app .action-banner .eyebrow {
  color: #647a6b;
}
.product-app .action-banner strong {
  color: #20563c;
}
.product-app .connector-icon,
.product-app .empty-icon {
  background: #edf4ef;
  border: 1px solid #e0e9e2;
  color: #48715a;
  border-radius: 12px;
}
.product-app .connector-icon svg,
.product-app .empty-icon svg {
  width: 25px;
  height: 25px;
}
.product-app .connector-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}
.product-app .table-wrap {
  padding: 0;
  border-radius: 12px;
}
.product-app table th {
  background: #f7f9f8;
  color: #64756a;
  font-size: 11px;
  font-weight: 650;
  padding: 14px 16px;
  letter-spacing: 0.2px;
}
.product-app table td {
  padding: 15px 16px;
  font-size: 13px;
  border-color: #edf1ee;
}
.product-app .chatlayout {
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: none;
}
.product-app .chatlist {
  background: #fafcfb;
}
.product-app .thread {
  border-radius: 9px;
}
.product-app .chatmessages {
  background: #f3f6f4;
}
.product-app .bubble {
  border-radius: 10px 10px 10px 2px;
  box-shadow: none;
}
.product-app .bubble.user {
  background: #e5efe8;
  border-radius: 10px 10px 2px 10px;
}
.product-app dialog {
  border-radius: 14px;
  box-shadow: 0 20px 70px #203b2d25;
}
.product-app .footer {
  font-size: 10px;
  color: #869188;
}
@media (min-width: 1001px) {
  .product-app.sidebar-collapsed .layout {
    grid-template-columns: 76px minmax(0, 1fr);
  }
  .product-app.sidebar-collapsed .sidebar {
    padding: 16px 10px;
  }
  .product-app.sidebar-collapsed .sidebar .logo {
    padding: 8px 8px 20px;
  }
  .product-app.sidebar-collapsed .brand-symbol {
    display: block;
  }
  .product-app.sidebar-collapsed .sidebar .prosanina-logo,
  .product-app.sidebar-collapsed .workspace,
  .product-app.sidebar-collapsed .nav-search,
  .product-app.sidebar-collapsed .navlabel,
  .product-app.sidebar-collapsed .sidebar-bottom small {
    display: none;
  }
  .product-app.sidebar-collapsed .sidebar .nav {
    justify-content: center;
    padding: 12px;
    min-height: 44px;
    margin: 3px 0;
  }
  .product-app.sidebar-collapsed .sidebar .nav span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .product-app.sidebar-collapsed .sidebar nav {
    padding: 0;
  }
  .product-app.sidebar-collapsed .sidebar-bottom {
    padding: 12px 0 0;
    justify-content: center;
  }
  .product-app.sidebar-collapsed .sidebar-bottom .btn {
    padding: 8px;
    font-size: 11px;
  }
}
@media (max-width: 1000px) {
  .product-app .layout {
    display: block;
  }
  .product-app .topbar {
    height: 60px;
    padding: 0 16px;
  }
  .product-app .content {
    padding: 20px 16px;
  }
  .product-app .sidebar .nav {
    min-height: 56px;
    margin: 0;
    font-size: 13px;
  }
  .product-app .sidebar .navlabel {
    padding: 16px 4px 5px;
  }
  .product-app .sidebar .logo {
    padding: 0 52px 12px 0;
  }
  .product-app .sidebar .workspace {
    padding: 8px 12px;
  }
  .product-app .btn {
    min-height: 44px;
  }
  .product-app input,
  .product-app select,
  .product-app textarea {
    font-size: 16px;
  }
  .product-app .chatlayout {
    border: 0;
    border-radius: 0;
  }
  .product-app .heading h1 {
    font-size: 23px;
  }
  .product-app .welcome h2 {
    font-size: 20px;
  }
  .product-app .workspace-shortcuts button {
    min-height: 80px;
    padding: 12px 10px;
  }
  .product-app .card {
    padding: 18px;
  }
  .product-app .table-wrap {
    padding: 0;
  }
}
@media (max-width: 600px) {
  .product-app .heading {
    align-items: flex-start;
  }
  .product-app .stats {
    gap: 10px;
  }
  .product-app .stats .stat {
    padding: 16px;
  }
  .product-app .stats .stat strong {
    font-size: 26px;
  }
  .product-app .table-wrap {
    border: 0;
    background: transparent;
  }
  .product-app .table-wrap td {
    padding: 10px 0;
    font-size: 14px;
  }
  .product-app .welcome {
    padding: 20px;
  }
}

/* Navigation stays discoverable even when the sidebar is reduced. */
.product-app .nav-find {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 12px;
  color: #52635b;
  background: #f7f9f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
}
.product-app .nav-find svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.product-app .nav-find:hover {
  background: #edf3ef;
  color: #12563f;
}
.product-app .nav-find kbd {
  font: inherit;
  font-size: 10px;
  color: #758279;
  border-left: 1px solid #dce4df;
  padding-left: 9px;
}
.product-app .topright {
  gap: 12px;
  flex: none;
}
.product-app .breadcrumb {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.product-app :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid #23846a;
  outline-offset: 3px;
}
.product-app input:focus,
.product-app textarea:focus,
.product-app select:focus {
  border-color: #23846a;
}
.product-app :is(button, input, select, textarea):disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.product-app .table-wrap tbody tr:hover {
  background: #f7faf8;
}
.product-app .table-wrap tbody tr:focus-within {
  background: #edf5f0;
}
.product-app .table-wrap td {
  overflow-wrap: anywhere;
}
.product-app .table-wrap td .actions {
  gap: 8px;
}
.product-app .nav-search input {
  scroll-margin-block: 16px;
}
@media (max-width: 1200px) {
  .product-app .nav-find kbd {
    display: none;
  }
}
@media (max-width: 1000px) {
  .product-app .nav-find {
    width: 44px;
    height: 44px;
    padding: 10px;
  }
  .product-app .nav-find span {
    display: none;
  }
  .product-app .menu-toggle {
    width: 44px;
    height: 44px;
  }
  .product-app .topbar {
    gap: 10px;
  }
  .product-app .topright {
    gap: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .product-app *,
  .product-app *::before,
  .product-app *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Operational workspace: grouped navigation, focused work areas. */
.product-app .nav-group {
  border-bottom: 1px solid #edf1ee;
  padding-bottom: 6px;
}
.product-app .nav-group summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  padding: 14px 12px 8px;
  font-weight: 650;
  text-transform: uppercase;
}
.product-app .nav-group summary::after {
  content: "⌄";
  font-size: 14px;
}
.product-app .nav-group:not([open]) summary::after {
  content: "›";
}
.product-app .nav-group summary:focus-visible {
  outline: 2px solid #23846a;
  outline-offset: -2px;
}
.product-app .preparation-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  background: #fff8e9;
  border: 1px solid #eadbb5;
  border-radius: 10px;
  margin-bottom: 20px;
}
.product-app .preparation-note p {
  margin: 6px 0 0;
  color: #685c40;
  line-height: 1.5;
}
.product-app .channel-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
}
.product-app .channel-summary small {
  flex-basis: 100%;
  color: var(--muted);
}
.product-app .advanced {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.product-app .advanced summary {
  cursor: pointer;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 12px;
}
.product-app .connector .btn {
  margin: 4px 6px 4px 0;
}
.product-app .knowledge-guide {
  padding: 18px 20px;
  background: #edf5f0;
  border-radius: 10px;
  margin-bottom: 18px;
}
.product-app .knowledge-guide p {
  line-height: 1.6;
  color: #52635b;
}
.product-app .kanban {
  overflow-x: auto;
  align-items: start;
}
.product-app .column {
  background: #eef2f0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  min-height: 180px;
}
.product-app .column > h3 {
  display: flex;
  justify-content: space-between;
  margin: 3px 0 15px;
}
.product-app .column .lead {
  padding: 15px;
  margin-bottom: 12px;
}
.product-app .column .lead p {
  font-size: 12px;
  line-height: 1.5;
}
.product-app .agenda-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  flex-wrap: wrap;
}
.product-app .agenda-heading p {
  font-size: 12px;
  color: var(--muted);
}
.product-app .agenda-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(160px, 1fr));
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 12px;
}
.product-app .agenda-calendar.day {
  grid-template-columns: 1fr;
}
.product-app .agenda-day {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  min-height: 240px;
}
.product-app .agenda-day h2 {
  font-size: 13px;
  text-transform: capitalize;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.product-app .agenda-event {
  padding: 12px;
  border-left: 3px solid #23846a;
  background: #edf5f0;
  border-radius: 6px;
  margin: 12px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.product-app .agenda-event p {
  line-height: 1.5;
  margin: 8px 0;
}
.product-app .agenda-event.cancelled {
  border-color: #9b5252;
  background: #f8eeee;
}
.product-app .agenda-event.completed {
  border-color: #8b9690;
  background: #f1f3f2;
}
.product-app .agenda-event .actions {
  display: flex;
  flex-wrap: wrap;
  margin-top: 10px;
}
.product-app .agenda-event .btn {
  padding: 6px 9px;
  font-size: 11px;
}
.product-app .agenda-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.product-app .day-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px;
}
.product-app .day-check input {
  width: auto;
}
.product-app .conversation-plan {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: #f8faf9;
}
.product-app .conversation-plan span,
.product-app .conversation-plan small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}
@media (min-width: 1001px) {
  .product-app.sidebar-collapsed .nav-group summary {
    display: none;
  }
  .product-app.sidebar-collapsed .nav-group {
    padding: 4px 0;
  }
  .product-app[data-page="conversations"] .main {
    height: var(--app-height, 100dvh);
    overflow: hidden;
  }
  .product-app[data-page="conversations"] .content {
    height: calc(var(--app-height, 100dvh) - 64px);
    display: flex;
    flex-direction: column;
    padding: 16px 22px;
    max-width: none;
    overflow: hidden;
  }
  .product-app[data-page="conversations"] .heading {
    margin-bottom: 12px;
    flex: none;
  }
  .product-app[data-page="conversations"] .heading h1 {
    font-size: 22px;
  }
  .product-app[data-page="conversations"] .heading p {
    margin-top: 4px;
  }
  .product-app[data-page="conversations"] .list-toolbar {
    padding: 12px;
    margin-bottom: 12px;
    flex: none;
  }
  .product-app[data-page="conversations"] .chatlayout {
    flex: 1;
    min-height: 0;
    height: auto;
    overflow: hidden;
  }
  .product-app[data-page="conversations"] .chatpanel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  .product-app[data-page="conversations"] .chatmessages {
    flex: 1;
    min-height: 80px;
    max-height: none;
    overflow: auto;
  }
  .product-app[data-page="conversations"] .chatlist {
    min-height: 0;
    overflow: auto;
  }
  .product-app[data-page="conversations"] .chathead,
  .product-app[data-page="conversations"] .composer {
    flex: none;
    padding: 12px 18px;
  }
  .product-app[data-page="conversations"] .conversation-summary {
    max-height: 72px;
    overflow: auto;
    flex: none;
  }
  .product-app[data-page="conversations"] .pagination {
    margin: 6px 0 0;
    flex: none;
  }
  .product-app[data-page="conversations"] .footer {
    display: none;
  }
}
@media (max-width: 1000px) {
  .product-app .preparation-note {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }
  .product-app .agenda-calendar.week {
    grid-template-columns: 1fr;
    overflow: visible;
  }
  .product-app .agenda-day {
    min-height: 90px;
  }
  .product-app .conversation-plan {
    padding: 8px 12px;
  }
  .product-app .conversation-plan strong {
    font-size: 12px;
  }
  .product-app .conversation-plan span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .product-app .conversation-plan .btn {
    padding: 7px 10px;
    font-size: 12px;
  }
  .product-app .nav-group summary {
    min-height: 44px;
    align-items: center;
  }
}
.product-app .board-scope {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 16px;
}
.product-app .stage-value {
  font-size: 14px;
  font-weight: 650;
  color: #14624f;
  margin: 0 0 16px;
}

/* Central de ação: busca e atalhos acessíveis */
.product-app .center-metric {
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: grid;
  gap: 8px;
}
.product-app .center-metric strong {
  font-size: 28px;
}
.product-app .center-metric small {
  color: #53675c;
}
.product-app .center-metric[aria-pressed="true"] {
  border-color: #337253;
  background: #edf5f0;
}
.product-app .center-metric:focus-visible {
  outline: 3px solid #337253;
  outline-offset: 3px;
}
.product-app .center-search {
  margin: 22px 0 16px;
}
.product-app .center-search label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}
.product-app .center-search > div {
  display: flex;
  gap: 10px;
}
.product-app .center-search input {
  flex: 1;
  min-width: 0;
}
.product-app .center-search small {
  display: block;
  color: #58665f;
  margin-top: 8px;
}
@media (max-width: 600px) {
  .product-app .center-search > div {
    flex-wrap: wrap;
  }
  .product-app .center-search input {
    flex-basis: 100%;
  }
  .product-app .center-search .btn {
    flex: 1;
    min-height: 44px;
  }
  .product-app .action-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 4px 2px 12px;
  }
  .product-app .action-filters .btn {
    flex-shrink: 0;
    min-height: 44px;
  }
}

/* Formulários: preservar edição e manter ações acessíveis */
.product-app .unsaved-notice {
  padding: 16px;
  border: 1px solid #ddc79e;
  border-radius: 12px;
  background: #fff8eb;
  color: #59421e;
  margin: 16px 0;
}
.product-app .unsaved-notice[hidden],
.product-app .formfooter[hidden] {
  display: none;
}
.product-app .unsaved-notice p {
  line-height: 1.5;
}
.product-app #dialog-error:focus {
  outline: 2px solid #b54444;
  outline-offset: 4px;
  border-radius: 4px;
}
@media (max-width: 600px) {
  .product-app #modal .formfooter {
    position: sticky;
    bottom: -1px;
    background: #fff;
    padding: 14px 0 max(14px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    z-index: 2;
  }
  .product-app #modal .formfooter .btn,
  .product-app .unsaved-notice .btn {
    min-height: 44px;
    flex: 1;
  }
  .product-app #modal .unsaved-notice .actions {
    flex-wrap: wrap;
  }
}

/* Keep mobile dialogs inside the visual viewport when the keyboard is open.
   100dvh alone follows browser chrome, not the on-screen keyboard on iOS.
   bindNavigation maintains --app-height from visualViewport.height. */
@media (max-width: 1000px) {
  .product-app dialog[open] {
    top: max(12px, env(safe-area-inset-top));
    bottom: auto;
    margin: 0 auto;
    max-height: calc(
      var(--app-height, 100dvh) - max(12px, env(safe-area-inset-top)) -
        max(12px, env(safe-area-inset-bottom))
    );
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-padding-block: 16px 96px;
  }
  .product-app dialog .close,
  .product-app .conversation-actions summary,
  .product-app .reply-picker summary,
  .product-app .internal-alert-snapshot summary {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .product-app dialog .close {
    min-width: 44px;
    flex-shrink: 0;
  }
}

/* 1.14.7: the customer transcript is the primary workspace, not a thin strip. */
.product-app .conversation-context {
  flex: none;
  border-bottom: 1px solid #d7e1dc;
  background: #fff;
}
.product-app .conversation-context > summary {
  min-height: 44px;
  padding: 10px 16px;
  cursor: pointer;
  color: #29483b;
  font-size: 13px;
  font-weight: 600;
}
.product-app .conversation-context > summary span {
  float: right;
  color: #52675c;
  font-weight: 400;
}
.product-app .conversation-context[open] > summary span {
  display: none;
}
.product-app .conversation-context-body {
  max-height: min(24vh, 180px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.product-app .conversation-context #conversation-responsibility,
.product-app .conversation-context .conversation-summary {
  max-height: none;
  overflow: visible;
}
.product-app .chatmessages {
  padding: 18px 22px;
  gap: 14px;
  background: #edf2ef;
  overscroll-behavior: contain;
  scroll-padding-block: 18px;
}
.product-app .chatmessages:focus-visible {
  outline: 2px solid #277457;
  outline-offset: -2px;
}
.product-app .bubble {
  flex-shrink: 0;
  align-self: flex-start;
  max-width: min(88%, 760px);
  padding: 12px 16px;
  font-size: 16px;
  line-height: 1.55;
  color: #18382b;
  background: #fff;
  border: 1px solid #cedbd3;
}
.product-app .bubble.user {
  align-self: flex-end;
  color: #163b2a;
  background: #dcefe2;
  border: 1px solid #bad8c5;
}
.product-app .bubble small,
.product-app .bubble .msg-status {
  font-size: 12px;
  line-height: 1.45;
  color: #476052;
}
.product-app .composer textarea {
  min-height: 48px;
  max-height: 100px;
  font-size: 16px;
  line-height: 1.4;
}
.product-app .composer .btn {
  min-height: 44px;
}
.product-app .reply-picker {
  padding: 4px 16px;
  flex: none;
  max-height: 140px;
  overflow-y: auto;
}
.product-app .reply-picker summary {
  min-height: 36px;
  display: flex;
  align-items: center;
}
@media (min-width: 1001px) {
  .product-app[data-page="conversations"] .content {
    padding: 10px 18px;
  }
  .product-app[data-page="conversations"] .heading {
    margin-bottom: 8px;
    align-items: center;
  }
  .product-app[data-page="conversations"] .heading p {
    display: none;
  }
  .product-app[data-page="conversations"] .list-toolbar {
    padding: 8px 10px;
    margin-bottom: 8px;
  }
  .product-app[data-page="conversations"] .chatmessages {
    flex: 1 1 0;
    min-height: 120px;
    max-height: none;
  }
  .product-app[data-page="conversations"] .chathead {
    padding: 8px 16px;
  }
  .product-app[data-page="conversations"] .composer {
    padding: 8px 12px;
    gap: 6px 10px;
  }
  .product-app[data-page="conversations"] .composer-hint {
    font-size: 11px;
    line-height: 1.35;
  }
}
@media (max-width: 1000px) {
  .product-app.conversation-open .mobile-tabs {
    display: none;
  }
  .product-app.conversation-open .content,
  .product-app.conversation-open:has(.composer textarea:focus) .content {
    height: calc(
      var(--app-height, 100dvh) - 60px - env(safe-area-inset-bottom)
    );
  }
  .product-app .chatmessages {
    padding: 12px;
    flex: 1 1 0;
    min-height: 80px;
    max-height: none;
  }
  .product-app .bubble {
    max-width: 94%;
    padding: 10px 12px;
  }
  .product-app .conversation-context > summary {
    font-size: 12px;
    padding: 12px;
  }
  .product-app .conversation-context-body {
    max-height: min(24vh, 140px);
  }
  .product-app .reply-picker summary {
    min-height: 44px;
  }
  .product-app .composer {
    padding: 8px 10px;
    gap: 6px;
  }
  .product-app .composer textarea {
    min-height: 46px;
    max-height: 80px;
  }
}
@media (max-width: 1000px) {
  /* While typing, reserve the reduced visual viewport for messages and draft.
     Expanded quick replies remain available; focus elsewhere restores context. */
  .product-app.conversation-open:has(.composer textarea:focus)
    .conversation-context,
  .product-app.conversation-open:has(.composer textarea:focus)
    .reply-picker:not([open]),
  .product-app.conversation-open:has(.composer textarea:focus) .test-callout,
  .product-app.conversation-open:has(.composer textarea:focus) .response-wait {
    display: none;
  }
}
/* On unusually short windows or with several expanded controls, allow the
   panel itself to scroll rather than clipping the composer below its bounds. */
.product-app[data-page="conversations"] .chatpanel {
  overflow-y: auto;
  overscroll-behavior: contain;
}
