@font-face {
  font-family: "Simplo";
  src: url("./assets/fonts/Simplo-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Simplo";
  src: url("./assets/fonts/Simplo-Medium.otf") format("opentype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Simplo";
  src: url("./assets/fonts/Simplo-Bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --vh: 1vh;
  --dvh: 1dvh;
  --vw: 1vw;
  --ui-zoom: 1;
  --bg: #ffffff;
  --bg-strong: #fbfbfc;
  --panel: rgba(255, 255, 255, 0.96);
  --ink: #111111;
  --muted: #66555f;
  --accent: #ef1665;
  --accent-deep: #b30f52;
  --gold: #ffbe1b;
  --line: rgba(17, 17, 17, 0.1);
  --success: #198754;
  --warning: #c48700;
  --shadow: 0 20px 60px rgba(116, 16, 59, 0.12);
  --radius: 20px;
  --font-sans: "Simplo", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --nav-icon-tasks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='black' d='M23.8 48.7 8.9 33.8a4.1 4.1 0 0 1 5.8-5.8l9.1 9.1 24.9-24.9a4.1 4.1 0 0 1 5.8 5.8L29.6 48.7a4.1 4.1 0 0 1-5.8 0Z'/%3E%3C/svg%3E");
  --nav-icon-tasks-left: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M11.8 30.9 23.8 42.9 51.6 15.1' fill='none' stroke='black' stroke-width='7.38' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --nav-icon-team-messaging-left: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAARGVYSWZNTQAqAAAACAABh2kABAAAAAEAAAAaAAAAAAADoAEAAwAAAAEAAQAAoAIABAAAAAEAAABQoAMABAAAAAEAAABQAAAAADHgTE8AAAHNaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xMDI0PC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjEwMjQ8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4Kwe07qQAAChZJREFUeAHtWmtsHFcVnveux3bturWTmFSkaXAc/Fw78KOCEBGCEJFoBFSVWkgopEWAUAPiEfpAqgAFqUAkSlUkkor+aNKqqP0DQiqFGKmtqCLkx25wXBwIaUioLUgbr/cxT74zs7O5Xs/srmc3rUB3JHvunHvuOWe+e865Z+5dQeAXR4AjwBHgCHAEOAIcAY4AR4AjwBHgCHAEOAIcAY4AR4AjwBHgCHAEOAIcgf9/BMS3+RXlgYGBDtu2G9LrOI4oSZLL2k60RCJhp9Ppyyz9WrcbepE1GKeMjo5+RZblfaIovst1nZJeuhEOazEjwI0d49EgWrJd1503TfOxmZmZp9dgX2xW1orYQmoMFFOp0ccSieSXCCfXcQSXwYAM8J9BFEVBxM31iCWpgYXBGCKz/SU2mgggKMAzBdt2BMMofGtqauaRcvc1agTmXSPxgjA0NPShZDI5AQWOZRk/c13xebSNCIVh0AQ2shCGDhdFWxdF9V5VVW+3bSuXzxdGTp8+PR/K3CSi0iQ5kWIURdmFFxIKhcLE5OT0fZGMTerYuHHjy+vXrxuHzs3wxFsh9n8GQGXnzp0rYJiYmLBkWWwnIpL86ys6r9HDhQsX8j09PYuI880IaU/3+Pi42t7evsKDybZmmNCoB9LicDfyzh0wtmcpu+TbROlIEoVUKvU8Up4Xro7rSM0wuB4ZWEi8sHcEpzU1MvIr2NafzWYpu2K4iJzrugD1ddswfjmVTj9bj8wontgAwtuUN99682hCS+ynxI2V1TPP/ycgmYuCYzv/guJJMlwSV5YdUQY1jw6wHEGHITuQRrrdwDAoIHQxw0O2In8cDnB4amrq/rh6YwN4+fLlT2Fx2I/QdAyj+IRhmH/AxFIZgQkXXYAqoj0Hns/4JoebODg4eBP43hveG00lHagn07Ozs5dWc/meJinS4vLS8h0oa3rA4yGKiBAAqAz79miadhdy5SHY8EImk5lYLac2JTaAMOB2SZZQLhSfm5ycuidK1djY2H7qc0phxfJt2bIFDqz9WlPVYYDIdq1q+5D4QUid8GihWCy8jOYO/AEW9vIXbgJ5bm7uJNvDtE+kxlLrMcG7FFPZC/oE01d3MzaAoizeSGZKkjxdjzb/lVZyzs/P28iTp7BadoUDiMArefTVkSQJdJEwc//sPVztLLX8yaCxq7oYAqrODBh2ga+LIa+pGRtAf86hXvJSSrTS0tLB5iCG2ZqcnDwAT7yOodXdxARcCWeGXVWh80fBQT1G8tRwObWpsQFcs9Iqi0g0ELVfoBqHKMo1gPGBgy/X4IvWEhvAWuFRqRIrSphPSCMjI/dpmvJhSu4umIJax0EpRDIwUaJgO5k3FhcfphqvUm7oMwkBJBE6y0Oupt2KFFrmqN2IDWAgWkIMV72q2Nbb25vEivhNTUtuQJ3o+wEDs98UaaHa09nZ+QsAeLaqLraTkcOS2bYfwiixar0DO6ii3TCAFfIiH8NC/uLFi7merq47l237/ShJyNvKoRR4uCwL2BwQ5lBm/D1SeGVHadJQSFf2VDwH+mrxVQxjHpsAYB3Kq3jDlF9/TTA2NdxEXe95c72e5TTggTXir8q7lEeWG+HMNbrDBzVGrWNKVyiAiVWmeAXrqof4r+fUpxSVgqcD4VQOz1VWNJng7ypSdR1s3EYo8CyKjZ0nND6AfsqvmWWQ25ZoRZRF+d0Rr9FU8qZNm5ISNjao7sS33ltVhdMK71+xJ7cJObCqibSNddKyzAdUVdkxNjZ6BOUKdkesousqgfHe10axWDx75syZf4dJQ6nTB3onu8hU8lEfJqtFUaR7ZVm52TTMrGXl6VMv8qq9yEQOLXc0AqAHQK38gbOJk6nUyLFEouULmiYfdBz7oOuqftYpzTvt3OD9j8KqVd/UAO9BTVO/A4B0spqGgNtrecMZ38EkCTh38bb0sYHwcDr92t9oTNQVhHpUfz30RgCEfLK+Zm7Dbo31ZdfNnVUUbR8GbPDe3xvmzUESXwwJeGYnazBqRH3dunWPArzPE2QAfgmFr595/Qq49CFWGgVTKGhN033NsqxHMXFPsfLC2uCHAcwMhDHVoMUHkPYAIZy+IGpdOJegTdXDyE9Hrr8+0eU4SQ85GodC+tvwwK/Cw8qStm3btkHXk0+qamI37TPiOOCnAOXH4LWjdFHdiBC2oGsBPGVZUfwlOuwg7y/nwhrsq7tjA+jYFgxV6ZSNzh1Q7gqRLxeoPXfuXOHcOeFi8Ez37du3r9gQAHiDut5yQtW0QduyHNO0DgG8YwDmP+y4Rtvw7la48K3eYuO6b8SVFxtAy7RO2Kr9aUVVPzY2lnoBk/8KQpHOGTCrzoJp2kdLnle2Dbu/e5GjhrCw4PwRp3SGdRye4wGPe3Ggr+8DSV1/BmHbixyWLRaNL+ZyuRc7Ojoy2FecBc9LEGZ5hXJZKtuQRMMwXsHh+osslVZmyDggi+IN2O6lPWAVdnxE1dRxC4pwxd7WL4cSq7DOtjQ6OvIjTUt8jRJ3cOElBXiMiai45dSpU8FBkozF4Pv45cAhjxdasSUsXLmy9ICiKYKmaD/AKnwe5cd18LxODL9kGPnPzsz85ff9/f03tLa2/BGL0ICXryhvlKwOmuU7GhbcFivw/dimfySwqa+vbzMOleax+7wiWslOAH5oenr6JwHvWu+NAOjpGh4e/gRA+SQeuvHXjjz1QdyXYNwQ9vr+sXXr1vaWlpafA7w7aQBmexJhfwm/zXAA2vdkTe7XE/qTBDylItM00svLubtQ0qSJny7I6NV1HXnSHfIp9D8oYUvpjm6SeBO26b3dbRwxPI5jh69T2sD4m9va2jKyLOmWZb8EXZQ2zuMw4qnp6dPk1bGvhgFkNWNjdIDCDbvVWXjVLXgBGVvmxwHeToQNdlWMxxcWFr5BmwjBOPxWpg2ecQTHFLsdy341XyweDD/nCEZE32myADRWbm0/TQZ+nfCbbDb3Obkoq/qN+jxoOk7nhtnJiZZWX0/sHBgmHgaiwEOEuaKZu5J7H17mhwBn0HZsu1goPoTS4nDlOOTJLGj3dHd3ty0uLlI79oXzDzpXvRvp4nwioT2U0JJ7hDbptzkp9yDCnvIzeblnY2wlFQODOKggx3tEaJBH4+a2ygn5hAcePuUK+cK+MPBYLY2Cx8hykdO+W8jlD5iWlYM3btdb9WcAXAsZhqupUddUAPESVO/RT89w0Ka2I9/9E6vobVgVjzMv+LY0ZzKZY8uFwl7YcElTtQ6c4pHnAUex2EwDmg3gPHLd05jlPPLdn1AAfxQherKZBq9F1mwm87t8Pr8btryKeq+AQvtZAPrXtch4J3glFMPvodrrnVAeppNsIZvQ19ScH6aL0zgCHAGOAEeAI8AR4AhwBDgCHAGOAEeAI8AR4AhwBDgCHAGOAEeAI8AR4AhwBDgCHAGOAEeAI8AR4Ag0D4H/Ahfy9GQp3R+TAAAAAElFTkSuQmCC");
  --nav-icon-team-messaging: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAARGVYSWZNTQAqAAAACAABh2kABAAAAAEAAAAaAAAAAAADoAEAAwAAAAEAAQAAoAIABAAAAAEAAABQoAMABAAAAAEAAABQAAAAADHgTE8AAAHNaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xMDI0PC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxZRGltZW5zaW9uPjEwMjQ8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4Kwe07qQAAChZJREFUeAHtWmtsHFcVnveux3bturWTmFSkaXAc/Fw78KOCEBGCEJFoBFSVWkgopEWAUAPiEfpAqgAFqUAkSlUkkor+aNKqqP0DQiqFGKmtqCLkx25wXBwIaUioLUgbr/cxT74zs7O5Xs/srmc3rUB3JHvunHvuOWe+e865Z+5dQeAXR4AjwBHgCHAEOAIcAY4AR4AjwBHgCHAEOAIcAY4AR4AjwBHgCHAEOAIcgf9/BMS3+RXlgYGBDtu2G9LrOI4oSZLL2k60RCJhp9Ppyyz9WrcbepE1GKeMjo5+RZblfaIovst1nZJeuhEOazEjwI0d49EgWrJd1503TfOxmZmZp9dgX2xW1orYQmoMFFOp0ccSieSXCCfXcQSXwYAM8J9BFEVBxM31iCWpgYXBGCKz/SU2mgggKMAzBdt2BMMofGtqauaRcvc1agTmXSPxgjA0NPShZDI5AQWOZRk/c13xebSNCIVh0AQ2shCGDhdFWxdF9V5VVW+3bSuXzxdGTp8+PR/K3CSi0iQ5kWIURdmFFxIKhcLE5OT0fZGMTerYuHHjy+vXrxuHzs3wxFsh9n8GQGXnzp0rYJiYmLBkWWwnIpL86ys6r9HDhQsX8j09PYuI880IaU/3+Pi42t7evsKDybZmmNCoB9LicDfyzh0wtmcpu+TbROlIEoVUKvU8Up4Xro7rSM0wuB4ZWEi8sHcEpzU1MvIr2NafzWYpu2K4iJzrugD1ddswfjmVTj9bj8wontgAwtuUN99682hCS+ynxI2V1TPP/ycgmYuCYzv/guJJMlwSV5YdUQY1jw6wHEGHITuQRrrdwDAoIHQxw0O2In8cDnB4amrq/rh6YwN4+fLlT2Fx2I/QdAyj+IRhmH/AxFIZgQkXXYAqoj0Hns/4JoebODg4eBP43hveG00lHagn07Ozs5dWc/meJinS4vLS8h0oa3rA4yGKiBAAqAz79miadhdy5SHY8EImk5lYLac2JTaAMOB2SZZQLhSfm5ycuidK1djY2H7qc0phxfJt2bIFDqz9WlPVYYDIdq1q+5D4QUid8GihWCy8jOYO/AEW9vIXbgJ5bm7uJNvDtE+kxlLrMcG7FFPZC/oE01d3MzaAoizeSGZKkjxdjzb/lVZyzs/P28iTp7BadoUDiMArefTVkSQJdJEwc//sPVztLLX8yaCxq7oYAqrODBh2ga+LIa+pGRtAf86hXvJSSrTS0tLB5iCG2ZqcnDwAT7yOodXdxARcCWeGXVWh80fBQT1G8tRwObWpsQFcs9Iqi0g0ELVfoBqHKMo1gPGBgy/X4IvWEhvAWuFRqRIrSphPSCMjI/dpmvJhSu4umIJax0EpRDIwUaJgO5k3FhcfphqvUm7oMwkBJBE6y0Oupt2KFFrmqN2IDWAgWkIMV72q2Nbb25vEivhNTUtuQJ3o+wEDs98UaaHa09nZ+QsAeLaqLraTkcOS2bYfwiixar0DO6ii3TCAFfIiH8NC/uLFi7merq47l237/ShJyNvKoRR4uCwL2BwQ5lBm/D1SeGVHadJQSFf2VDwH+mrxVQxjHpsAYB3Kq3jDlF9/TTA2NdxEXe95c72e5TTggTXir8q7lEeWG+HMNbrDBzVGrWNKVyiAiVWmeAXrqof4r+fUpxSVgqcD4VQOz1VWNJng7ypSdR1s3EYo8CyKjZ0nND6AfsqvmWWQ25ZoRZRF+d0Rr9FU8qZNm5ISNjao7sS33ltVhdMK71+xJ7cJObCqibSNddKyzAdUVdkxNjZ6BOUKdkesousqgfHe10axWDx75syZf4dJQ6nTB3onu8hU8lEfJqtFUaR7ZVm52TTMrGXl6VMv8qq9yEQOLXc0AqAHQK38gbOJk6nUyLFEouULmiYfdBz7oOuqftYpzTvt3OD9j8KqVd/UAO9BTVO/A4B0spqGgNtrecMZ38EkCTh38bb0sYHwcDr92t9oTNQVhHpUfz30RgCEfLK+Zm7Dbo31ZdfNnVUUbR8GbPDe3xvmzUESXwwJeGYnazBqRH3dunWPArzPE2QAfgmFr595/Qq49CFWGgVTKGhN033NsqxHMXFPsfLC2uCHAcwMhDHVoMUHkPYAIZy+IGpdOJegTdXDyE9Hrr8+0eU4SQ85GodC+tvwwK/Cw8qStm3btkHXk0+qamI37TPiOOCnAOXH4LWjdFHdiBC2oGsBPGVZUfwlOuwg7y/nwhrsq7tjA+jYFgxV6ZSNzh1Q7gqRLxeoPXfuXOHcOeFi8Ez37du3r9gQAHiDut5yQtW0QduyHNO0DgG8YwDmP+y4Rtvw7la48K3eYuO6b8SVFxtAy7RO2Kr9aUVVPzY2lnoBk/8KQpHOGTCrzoJp2kdLnle2Dbu/e5GjhrCw4PwRp3SGdRye4wGPe3Ggr+8DSV1/BmHbixyWLRaNL+ZyuRc7Ojoy2FecBc9LEGZ5hXJZKtuQRMMwXsHh+osslVZmyDggi+IN2O6lPWAVdnxE1dRxC4pwxd7WL4cSq7DOtjQ6OvIjTUt8jRJ3cOElBXiMiai45dSpU8FBkozF4Pv45cAhjxdasSUsXLmy9ICiKYKmaD/AKnwe5cd18LxODL9kGPnPzsz85ff9/f03tLa2/BGL0ICXryhvlKwOmuU7GhbcFivw/dimfySwqa+vbzMOleax+7wiWslOAH5oenr6JwHvWu+NAOjpGh4e/gRA+SQeuvHXjjz1QdyXYNwQ9vr+sXXr1vaWlpafA7w7aQBmexJhfwm/zXAA2vdkTe7XE/qTBDylItM00svLubtQ0qSJny7I6NV1HXnSHfIp9D8oYUvpjm6SeBO26b3dbRwxPI5jh69T2sD4m9va2jKyLOmWZb8EXZQ2zuMw4qnp6dPk1bGvhgFkNWNjdIDCDbvVWXjVLXgBGVvmxwHeToQNdlWMxxcWFr5BmwjBOPxWpg2ecQTHFLsdy341XyweDD/nCEZE32myADRWbm0/TQZ+nfCbbDb3Obkoq/qN+jxoOk7nhtnJiZZWX0/sHBgmHgaiwEOEuaKZu5J7H17mhwBn0HZsu1goPoTS4nDlOOTJLGj3dHd3ty0uLlI79oXzDzpXvRvp4nwioT2U0JJ7hDbptzkp9yDCnvIzeblnY2wlFQODOKggx3tEaJBH4+a2ygn5hAcePuUK+cK+MPBYLY2Cx8hykdO+W8jlD5iWlYM3btdb9WcAXAsZhqupUddUAPESVO/RT89w0Ka2I9/9E6vobVgVjzMv+LY0ZzKZY8uFwl7YcElTtQ6c4pHnAUex2EwDmg3gPHLd05jlPPLdn1AAfxQherKZBq9F1mwm87t8Pr8btryKeq+AQvtZAPrXtch4J3glFMPvodrrnVAeppNsIZvQ19ScH6aL0zgCHAGOAEeAI8AR4AhwBDgCHAGOAEeAI8AR4AhwBDgCHAGOAEeAI8AR4AhwBDgCHAGOAEeAI8AR4Ag0D4H/Ahfy9GQp3R+TAAAAAElFTkSuQmCC");
  --nav-icon-sales-core: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAAxCAYAAACVtYpYAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAANKADAAQAAAABAAAAMQAAAACVX2JzAAAC/klEQVRoBe2Zi3WbMBSGnZ4OkBHUDdIJygjZoGSCthPgDZoN8AqdQOkE8QbyBvEG7ndt4AiZC5IDNunhnvNHj/v6JV2w7KxWE8vhcDDAghKYidNNFx7y96AAoRRMfKyFQTgHb0AThyKfbjtHigzJDFgQKw7D+Z0WpKS8SqCJQyHQpEQxj4VBpABaecn8GtxLEVR9mk5xzBZidxMhuZSXkNDEojAhOZkDG6CJQ5GHfpONSSaELNDkFUU2RACbR+CAJiUKMxTnYj3BtddwTUjK62dqAnxy4IAmBYpxF0ZASao9J6gOz+D4nKQuSOzxlVPfAE0civyS2C0fgmTAAk0siqzl9I4BsWRhUrKaOBQmOQVOMa/hx+TAkQ7kz4EDmpQo4haGYQG08pL5Nbi4vCLXdDSrctF0imNWf82jlPISI00sirhdSWE9YCs5wQZo4lDkTRgG4mBBrzQON+r0kjspSxpzx59XOD4M8bxDhmym1AvniPgvK+y6nhd5DbckItikJi0yp0FnGcqC1p6xpZ8JM2/u2J2UbUTwLj7MGeC/5p+PZcRkJjGpqhdpRSTAqXf6O7eS8/n4/NXn4iMtyN/4T/7gf+gvC5r7KS4ntJzQlXdgKbkrb3hyuuWEkrfsyg6fx87HlSkn5rfIuH+5k20ibd9nJnc5X4aiYSu/Q/g3X9+9ry8+g1/pwwBDfM70qQGw/x36JIzXZwSCiTBWoG6Go922SeiIaprIaZ0dpfelz0UW5Ov9rw+teX/g92MD1D6hPfNPtU5pS39eI1jbhPE1+zFPKGoHUwmm2i+fQ/WOzbVdTmiuJ1PzWk6o3om5tn0ntPdJ8zkweD3x7cfsp+SOXhAEf4xJMjHW98B+G4ybYd9t+w9W/iLkJ+Os8pTTa51gNd802LZuAo1C6Sj2BnOpjIfAbRuMm2HfTcFgJf+ZkIBzkj1kvnL12XWRUkuucvjV5XTjuSdtMVG8KAX5hd+CW4uFQFh6Z2tQSy60JJiUXh1Q+oKpZVcl2HIq+5hk/wBqzRAHIh+uhQAAAABJRU5ErkJggg==");
  --nav-icon-communications: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAMKADAAQAAAABAAAAMAAAAADbN2wMAAACfklEQVRoBe1Z7VHDMAwlsEDZICOUDcoGbJBswDFBygRlhDJB2SBsQDdwN2j/8qu8R+M7R82HncSJC9WdzrYsyU+2LOfa6Kag4/E4Q/cZvADPwRyHRAeA2YLfoyhaa2AROwAfo8nBbC+BdgD5iEB2OgAFQQy+JNoB7MMddj9Fh3xpxBT/ZvrkYJPWGMShRUNMYGIzKWcAe1OCfnDg9WYSm8C6jyjQCmxxMX7vhSkLqS/x3oYErguWawBddm1Im+sJDLmbXXxZnwBufwKWJZdFYWhScJjYBmNdRuF0zM+NA6r5fVUQ3C1Tbn0CMBrz65RfnlbkEsALPO6svPZTIvhXWxfWKWTr0LdenxTyja2Tf5cU6rSAb6P/EwByLwF3eQcUbX2dhPUlBog+70BtXXcNDDgmeQes67prQC53oOs74FTXXQOwTiFXx770+6SQL0y9/LqkUK+FfBlfA/C1s7Z+/8QJlGo0bnlsG/3YehXYDjyBrQCSVSgKlfGHBaZMrLzlT4tLsDMJR61DLJA4L9JukDKAGVi165Y1WhEbCrDMytaDjPhtdiK444+mysWttm1r4XPl4tdSV0EvPlsbwhScg1s/m8+MhQA+eLIb8FBETDmYKT8Ty7UPYVSiJgso8kS/SganAUHMm2y9zUkwdQtBry4dFefq7LzLbQKAzhzMXZbE05gOPHdHIpI7hvlE6hTjDVr3nJUL9B1LcKY/zGVyvhi/mXqT9iVADQbylZwrxkutE0RbAbKpTKZBgDZBVATAiylpD8E0ZdIEW9UHMIJrIoXJuMo2CBnA8QWsI55GuOD1DgLkpiICyiYrk85/agPsEwJaFEF94J+Uz6I/SfMDZGlfZtSrXIkAAAAASUVORK5CYII=");
  --nav-icon-calls: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAMKADAAQAAAABAAAAMAAAAADbN2wMAAADvElEQVRoBe2Z6XHbMBCFrVSgEthBlA7oCqISWAI7sDqwOrBSgeUK6A6sVAB1YHfgfG8G4Kwg8JJ5+Ed25g0WwB5vcZCUfXf3X5ZdgVVT+s/Pz5y532DdZMP4X3BcrVbnFpt5pyC+AQ4MkYd5WTZkg3EG3ocwN7aPDWEnHb44QpB5I9vGZHxFP5u+VXW0ZJuZwXuO06vpz6dCXkfHStmVHWPtmDNOT10+k81DYmuIvPdNhE9p/Fxfv7HsfphAOhJBPoLSo301NtoRG8dMTaPaAk4mRWb0LvUcGWyi/qRdW8DFqrOSWZ/MXFr5nY3tMgX4l5EtIjekutQXY6CX32xid0BJTybzkJU8Gr98znsQF6BPgyA/g9LV+me/3b1tl89Y83EBX1nJkyGVGX1SNS5AJD5Mxq3RG1V/ZDJjYIsxwzOokKlAkKorJYZr8BYcfJt1+U02D4HCkNGH3bopmeZATH7fZD/LuCdlv0jLpsQJ8voYXF4gtgdBkqSY3AYD32onGndrqqriSxzyHINCu4FYbvpB/QiKb1/8WzkaXqgL6QoESV5mJqtgQKtjly1E9zotZPRGtZLHVkzq69PeF0d/9mMU86r7kKlAEIdyRY6xMhj4drkfNTVzr0Ao3oVdbKM+dvbSq46HlN0iY5A5iJGRTUyEuTXQU8jK9ygCRiJnz7mIpo6S7oMDVlqLwFCxC7ADW5DFizNK3yehqeUxFZjZVBHPjKcKfqyjXSoV3RLkqRw3jxHwAKyUqWAYpIpwGpc9rVZdu9hXZPsEcvnfLARQYges5KmAGKiIFMmHxPg7YxVwoEuSO5/ikBwjuogpYRDpV5c6ODO3D4YNrYqsjxd6Dg5A403y5SKUxIqj01ZEwbxsYrkgH4oOLcbaceUqgQNW6qKD/aCWSCJlpWsnMowPxqGVfEwGPxWjHEHK2GZwn0i7EM20rYGxy0EBBq8gPnYBxnnbE1TbG0vrs3/wSnkHkoxfgGITeAvs9qogBzKfe5SGeMkCmn4P9E7Kb4Ajxr/A2Thl6Cpikt0wee6+XICC+b/q3aP+scHRdxShQopo/Pt2RdaTprmQil5+K3N8k0fo1nitfiTLooR0a3FoRWuAxCQ+8xUQ8pM0Bw6kRBf/CeTBvq3F7hkE2bfZjj5H1gK4kD3RqpgK6LGsoi/eE/T1pLNSjE6yT0AYiNzBMmnRQ1FvkY3rk2tSGwhloAAVGCr5pOSGBof9GuiI7EG82gzV4tCuyF/8n3ho8qnsIbohduahNCf/Pwjp/+VbrcA/WOazutj5I3EAAAAASUVORK5CYII=");
  --nav-icon-calendar: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAMKADAAQAAAABAAAAMAAAAADbN2wMAAACuUlEQVRoBe2Z4XHbMAyF5XSBdAN1g3SDZhK7E3SEdISOkE7Q6wS6TlBvIG1g/+0v93s+MQfyJJOMxES6E+5eRIAQ8EARtOxUVUQul8senEAL9hH3ydPKAebLR7AWODlNZhgJQKLWJeMazbeLxKsUzPrsEKvPPc7Ndzc3gbeO97KaVH5P8m/gC3gA0pckZ8gcwU82wbMjdi0A8jWGBui6Bukg+UghnSugxVCDNUkH2c8fWP0DA2Ftoi3+T6dMA6w8o9SuGjuhsbOXuo7lw14DcbPSqAB9aFh5IS+SdkLjUsRd3Fv5mFMRVk5RgnjbAtUrRSWWz7LXOKWAA34tUCGHouwJrhygBYP5sHuyk2ZJcTRdTyZrW9I45Lv6T+KtgPfeXtsT2J7AxBXYttDQAnJW16AB7lP8l2xDvrJpDjQgyd+Lw02eeJOvUAgmMo6IjS1bHYZ8hb+NGX+VCBPGdKJrtcekCe/HMdffiz37q4SihySNfuZN5aPRtX0m+ZdoYn13HRN9CQkl19+7v0QBRy+Dr/z21auW6++H0CO04s/ma8RadxOr5L4I15w6fRrZxpYjxx9fT2Zv4jGSc9nF3sYq0QM2fvHxVkDxJY4kSHoCbDudLA1QQ0rUoPVYbM2BBiT5j8VJspPEk/AmJosei2G+mO6RRdGR50kYgEmt9phMfrcJ88X0kEj0GNUNN4JOfre5EXtwKuST0gO57yq5/oNEU40pBeS+q+T6p3Id9gv3VOjF/LqbWAX1Rbhm1tHYyBYW6/Rcf3dfypXYnkSbOCXoW/qIvc2X0gPWf3FjFeCdGhRYL45lT2iA21kFhKfG04Dju9fUc3oKiBzVA98xhhOB32LVryrgHnp/Qb1YmsPEOn7h+HTHH/XAI+iG/RZpFVdxrrx/J/E0Dtj24AHoySxJtNBH8Af86Be++g8xJ+6v6fXdyAAAAABJRU5ErkJggg==");
  --nav-icon-reports: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAwCAYAAABqkJjhAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAALKADAAQAAAABAAAAMAAAAABZfp0gAAABI0lEQVRoBe2WAQ6DIAxFcRfFm7MbuBuwXzOSbzMMmxDAtMkPRbuuPiri3OAWY/TQBgXID16uc59CMey2LaNXLGVyjQ+ezOBbwa1XyQgbYUXAWkIBqT41wvgweWjeb//VnsDDH6z6WUKyc5ELjOe/+jqf9XApQZDzUP9elyVkyz0AYgLFbSdxFBbjpf769ieSna/nevjfOOthptvCN8ItqHLO+xLGW+2h/vsm4z7zUWyAkhXvm7mcKVEaS+OK92FJzElr76+l+e7bw0y3p2+EW9OfjzBefg/Z/goIu+VaJN1PY2ncIj/g4NL9sFfcfD3MdGfwjXDrVTLCRlgRsJZQQKpPjXB1pCqhEH7RtSf52h0jDmefFQqQHDFXXWWayz0oQF3j3ot+xINC9SC8AAAAAElFTkSuQmCC");
  --nav-icon-finance-dollar: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAMKADAAQAAAABAAAAMAAAAADbN2wMAAADjUlEQVRoBe1ZC27iMBAFuoDKb+EGucHunoBwA3qCLSfZ9iTlBuUGpDdoT9DcAIT4SCBg31uRyjiGjEMMrESkKPHzeDxvxmMPIZdzcC0WC282m33i3u7uz9Fo1HQwVa7gQul6ve5Cr6fo9srl8qPSzuzVCYF8Ph/z9na7jWFZsHBCIAvDpDpuBKSeciX330cgf6pnuGVi1/GRuF6kC+9tJK0ftfkEFgB7UzH1HX3ju7u7wf39fajiSe+pCUyn08dCofBbNzRpwoT+cLlc/mq1WuMEua9u6yVEj8/n8yE8+pKx8TTK+rz49kVF8ELjN5vNkBMJxM8iYhUBePzFpfGIaoh7YMNcHAGu+UNLhgmKyHzg+W/t4tnWZSkD7GgSVyqVfqRDSkJMAIr/GJSOYfhDvV4P1D4UcE9o+ypG46vVKvFML9ESgvd/YlbPMHNPN94g4xQSEYCXY8ZzScCjVuvVBRMRARwwjMDedWw97wk6bogImGwAgaYJPzcmIgBjQ90wnMI/dOwSbREBLKFANw6kfBxsvo6fuy0iwAILBge6cUjuV2yZXR0/Z1tczPEgw87Dkzh2cUcCwa9DCu02I6QK6jLoey8Wi2GpVHpX5WzfxQSoGCRYxPm2kyTIM7rPtVqtnyBn7LYiwGIOkw1xe0ZtJ4CMEO6e7e8BUQ5EdlE5JumAQBBhWT2h00dODekkG51WBKiYJBBukuiBTGgzmUCWETbm2aGxVkvIpIR1EksN9bQGsTY9qsoD20t09LeB7clE8ujrpc2JSMdJT1aju0+K0adFPp90pZPJpAt8pMvyF58ue6htvYQOKUqDNxqNAaL3oI9l9KS5cFECNJzlOAwOdBL80qFjpvbFCeyM+tCNQ354OmZqXwUBGDs2GSfBroIAdySDsaISQ/yb2DBBJhB2IBaDvq6MdZKOmdoXjQDLcXg/dnBhSYmLPHEEMFET3mJF2jR5QsUg04a8CuWIYfwTQbx/x4MHoI93QnsX8Oc94EgjPtogzD0ZSofo8gzdmUIgFOD7UEeqVLSEDP95SfVbycH4EHfPZpCIgI3CtLL0PO6Ok3J6tVr16Z20xh0bR8ORLz0uG1vjqVeUAxRkHnApYUJpEvscF107Q9+iNowO+bEgjdGRDmdP7ja41UrUWI1mYcDV5EBaMjcCaT2X1bhbBEyexA4z1nHsQjFMl0nTdhIB/dyA8TxhB2kMTBrzF6GXr8H3Y5E9AAAAAElFTkSuQmCC");
  --nav-icon-team-roster: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAMKADAAQAAAABAAAAMAAAAADbN2wMAAADoElEQVRoBc2YgXnaMBCFoRMwgjZINog3aDeoNygbhE6QbEA6AV8mMJ2AdAKxAWyQ/o/YjnyRiIUh+L7vxbrT3bsnW8Z2ppMz2uvrawHdd6CjAzMg24OXGs/T6XTNeDyG8BJ40Nc8ieXVV4AIBzbgVPMUuqsshMY/wQ4MNXH8+NJFqGFCtcQ81vPtmcXXlVLNE0jZzy9ZBN0lJnbmV8Sbmzappa6PLUSc7aKTBEMnaOKBtXkuLwQLS4K/yeXJyqdBGWm6yCIJkuGaR/jKIOW8Q5p503A5tAN82nqh+aGc0Xo6FGGXeuyiyRlBeGbA3lNFX4pvfRPJsz91TzxRtxn10VQ49kz8MZO2l5l+d3MWcPNedhg9G3+IuzbFd8Yf7kYusxvO+sYAtwOh7fpyT/smij3M5dL3rg3rUuNT+XO2UKr3VeM5C9DN1hpnzLXOwAFct4ai08vMddycBWw7lZOJbWqms1xnsl+Mn3RzFvDXsBTGH+LqIyi0f6FzljGX2T7I9PCZDSXXVgTWiqG80Xq6eNNpFU3MCMK3NJyXeZWQJhqVppnceYbeTiq19yIwVnaSzu3QbGMayr3P7UPNrwjP5c5+I5Cm2rP25UtalsA1eakjOXp5WwFr4vy0PsWbFadRbCs1gpYM9PnYitG4jj1wjC2e8HW+i1NiJKiviaPMOoNBcs5zICg7DPf8XdvgCb44ej+4TuDvlnC2ClCBc1sFYdntdkYP8ksJtyfCE3B9pfd6JYbwAcJjv/fNdtLrxhZoS+zrr60J9TN8B3S8BXegAPJTtqD+d2qyV1xnAmxAyiomdGWOCUn2ok6/ViuQMvV2SYJjEyoEHsSsIlgcq8+Zg0u9nkDMPEGXwzdRAVChNU+gyCLLSIa7BOphzRNwvaiUCFRgrSJw0lbp1bhOoof6x7aV19ynXCRVwNrjp4VnTkDAworAr462IeE+UvTl4huRaHmM6Jk3850jibp01o6vuMNwGQdBlRG1w3cfuhFcmkSP/zHxQ+VlA9IAJDq0ZacrM7GzX3aSruigbx6qr8eulURgaRJ8OzmSAfoqo3HRSmPCm8mynRzJAH16aof29u9HIkUYZTy6s69ziK4ZsPdCoe+BQgmBrYPxaIb1i6H9j/itFnBjVOqNcqy2NsIOV8CZ4Ivxx+RabTfaW3ZfzcakONRS3wccWttNNQyT2GvT0B/b2OrVPbAPRG6D8ViHXb2sqAQeaCuVY1Xd6JJG4MFB739zsWFrINQR6QAAAABJRU5ErkJggg==");
  --nav-icon-settings: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAMKADAAQAAAABAAAAMAAAAADbN2wMAAAEq0lEQVRoBcWXgXXjOAxEvdvA+TrQduAS1MG5BJXgDpIOkg6cDpwOWIK2A14HTgfZP46oUBApUo7eBu9NRIDAYCBTsrPbbWzv7+8dcOAKYnM43cbttqND3B5IZMl6Evbbdd6ICVGupDzadxu13YYGYTo2a63dovvPWhLUHYCEHkFj6v4z/m/8f38MxvoXUCy2U+yIc+AW/yHe+9Iashbo3FpzBDTUA7A2E0CCeGLTQ34GEuyANU+g+6r4B8ta4V9zTam1b6YKuveHHN9iHOaHGvZEzmuOmNxLIr8mtG4IGHXWU+YICikLR2J2fMJAFOnIvYDcJ+HYyw3ZBp7iFRIPYlPDURhrDeiBzIMT2BeJowTyLUcbttnToHbIPuwvXodiLhMbxcfFZLSxf88aDj3Es+GJaQhrSR2TvlSIMLbXScJfdBDhYiGsO9u+5nvgH1v0jf5bsTdTNmZquW2xcOMEeuoZsdZUtaHKmUqPPzunVWR3JtFPPWOr//1ElX0ORHS8U8vqMnq1amjsUE1E4dkU+9pi6tT8CXgQrGdxBs0KHk9+bI/FWrLV/ALsO7grFVOzBxJeMuUUjyM5pwSRtM21iBA4kLLsb5swFEWq71PFmZhyF4fQPrhm6p32Q/8dzlLz85iYWVD/BNbaU4ZuDEP4skD68VCT0GWSNP0FLD487DeJek+sBbe7xPUIPLDWjmoTC5IPQBqkJWXdjqgzOz3+InHci9yzqff4nx/vkKwY0F5szzHX0poiDSNtsTkNYK1ZIrJ7FFvSo80JPrn6VGKrfruJg0LdhNiuP+SFBrrqv8DYL63X1JOrT2byUvhqv5rfQqUZJvuDyEksOIh9C+utrhpgQrokINP0fxM/GH904T6Ozsfit/EXXeqbWQJBB2LTmc6KsATkPsfFrD3YJ/JSD3HxFR144NTzY5+320PcsZGyK8ELWByGfftgisuDo5pzlXDleGCtCQJTV5IPQBqkJWXdrY4dl9odYsW7RJ79FBboxq3nlOg4RuZ5zJ4v+jGXPd0lN8+5RTT97EiMxSy0D/pbdt0f5S5yip+c3J13yXqCHbgAa6dYcGpNgYao+SSUUyNeWmLTMNLWpvpPYiQ9xpWsq79wyG3AC+hBMM9CwsvNByXkqia24lEeh6DqEFcO6+rmI9GdC/odE/2P1XQUO0NQ/QlUN1lIpPceeKPBLZR8blGkI2Ct+8z4OysEtFYEflPsTpL9+OomLzKvT0CLA7HNjlHqt1DxDbFeyt0Vb6srGTf1AB8sEXk6p7M7YvNKPhxtKqdWR6p2R3H8CsS9faGMQ+DrfHog86BLEmWC5Gv4E/BA5sHIwVo3Ue/92OpfJFSlHiCR6YvEaZEwNTyDcVCrX3tDjhVH+GaOv0LKxgEtb9KH4THFUhF7TRISpFY34B57zHEuxul0zxCT/7jiBvDl7vzSUPeJD41h7oBPdHDEjuAFWGFtqA9XcnR8rOkGKe7sBn4PZjyBb/UVMjWSYKGJCfDt0VDzMYf1HigW2+SosdEAceuGZZ+juO9maxq2YK11mwnYggj1bsUE3/btnp0V8aljkppJg+6zRN+9gTidYYmM7YrjQLe1vj8zef4VRdPF4QAAAABJRU5ErkJggg==");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), transparent 28%),
    radial-gradient(circle at right center, rgba(255, 245, 225, 0.45), transparent 20%),
    linear-gradient(135deg, #ffffff 0%, #fdfdfe 52%, #fffdf9 100%);
  min-height: calc(100 * var(--vh));
}

.messaging-page {
  height: calc(100 * var(--dvh));
  min-height: calc(100 * var(--dvh));
  overflow: hidden;
  background: #ffffff;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 390px;
  min-height: calc(100 * var(--vh));
  transition: grid-template-columns 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

html.sidebar-state-restoring .app-shell {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .app-shell {
    transition: none;
  }
}

.messaging-page .app-shell {
  height: calc(100 * var(--dvh));
  min-height: calc(100 * var(--dvh));
  max-height: calc(100 * var(--dvh));
  overflow: hidden;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 88px minmax(0, 1fr) 390px;
}

body.right-sidebar-collapsed .app-shell,
html.right-sidebar-collapsed .app-shell {
  grid-template-columns: 240px minmax(0, 1fr) 84px;
}

body.sidebar-collapsed.right-sidebar-collapsed .app-shell,
html.right-sidebar-collapsed body.sidebar-collapsed .app-shell {
  grid-template-columns: 88px minmax(0, 1fr) 84px;
}

.sidebar {
  padding: 18px 14px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 22%),
    linear-gradient(180deg, #ef1669 0%, #e91263 48%, #da0e59 100%);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-right: 1px solid rgba(17, 17, 17, 0.06);
  position: sticky;
  top: 0;
  align-self: start;
  min-height: calc(100 * var(--vh));
  overflow: visible;
  transition: width 240ms ease, padding 240ms ease, border-color 240ms ease;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  transition: transform 240ms ease, opacity 220ms ease;
}

.sidebar-content {
  flex: 1;
}

.sidebar-footer-brand {
  display: none;
}

.sidebar-footer-brand img {
  width: min(112px, 64%);
  height: auto;
  display: block;
  opacity: 0.88;
  mix-blend-mode: screen;
  filter: saturate(0.9) brightness(1.01);
}

.sidebar-center-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px 0 2px;
  min-height: 132px;
  flex: 0 0 132px;
}

.sidebar-center-logo img {
  width: min(96px, 70%);
  max-width: 96px;
  height: auto;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  box-sizing: border-box;
  padding: 12%;
  border-radius: 22%;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(116, 16, 59, 0.18);
}

.sidebar-toggle-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0 4px;
  margin-top: auto;
}

.sidebar-collapse-toggle {
  width: 44px;
  height: 44px;
  align-self: center;
  min-width: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.92);
  color: #fff9fb;
  border: 1px solid rgba(255, 255, 255, 0.26);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.18);
  position: static;
  z-index: 1;
}

.sidebar .sidebar-collapse-toggle {
  background: rgba(239, 22, 101, 0.92);
  color: #fff9fb;
}

.sidebar-collapse-toggle:hover {
  background: rgba(179, 15, 82, 0.96);
}

.sidebar-toggle-lines {
  display: grid;
  gap: 4px;
  width: 18px;
}

.sidebar-toggle-lines span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.sidebar h1,
.hero h2,
.section-head h3 {
  margin: 0;
  line-height: 1.05;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  display: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-text .eyebrow {
  margin-bottom: 0;
}

.brand-text h1 {
  font-size: 1.72rem;
}

body.sidebar-collapsed .sidebar {
  width: 88px;
  min-width: 88px;
  padding: 18px 10px;
  border-right: 1px solid rgba(17, 17, 17, 0.06);
  overflow: visible;
}

body.sidebar-collapsed .sidebar-content {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  padding-top: 0;
}

body.sidebar-collapsed .brand-lockup {
  justify-content: center;
}

body.sidebar-collapsed .brand-text {
  display: none;
}

body.sidebar-collapsed .brand-lockup {
  display: none;
}

body.sidebar-collapsed .sidebar-center-logo {
  min-height: auto;
  flex: 0 0 auto;
  padding: 4px 0 10px;
}

body.sidebar-collapsed .sidebar-center-logo img {
  width: 50px;
  max-width: 50px;
}

body.sidebar-collapsed .sidebar-toggle-slot {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: auto;
  padding: 0;
  margin: 0;
  z-index: 80;
  transform: translateX(-50%);
}

body.sidebar-collapsed .sidebar-collapse-toggle {
  position: static;
}

.sidebar-nav {
  display: grid;
  gap: 5px;
}

.sidebar-nav .nav-item.hidden,
body.sidebar-collapsed .sidebar-nav .nav-item.hidden {
  display: none;
}

html:not(.admin-communications-enabled) .sidebar-nav .nav-item[href$="messaging.html"],
html:not(.admin-communications-enabled) .sidebar-nav .nav-item[href$="calls.html"] {
  display: none;
}

html:not(.admin-communications-enabled) .campaigns-side [data-admin-only="true"] {
  display: none;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  min-height: 44px;
  border-radius: 13px;
  color: #fff9fc;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
  backdrop-filter: blur(4px);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.nav-item::after {
  content: "";
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.nav-item[href$="index.html"]::after {
  background-image: var(--nav-icon-sales-core);
}

.nav-item[href$="events.html"]::after {
  background-image: var(--nav-icon-sales-core);
}

.nav-item[href$="admin-action-center.html"]::after {
  background-image: var(--nav-icon-sales-core);
}

.nav-item[href$="messaging.html"]::after {
  background-image: var(--nav-icon-communications);
}

.nav-item[href$="admin-inboxes.html"]::after {
  background-image: var(--nav-icon-communications);
}

.nav-item[data-sidebar-team-messaging-trigger="true"]::after {
  background-image: var(--nav-icon-team-messaging-left);
  width: 40px;
  height: 40px;
  filter: brightness(0) saturate(100%) invert(100%);
}

.nav-item[href$="calendar.html"]::after {
  background-image: var(--nav-icon-calendar);
}

.nav-item[href$="tasks.html"]::after {
  background-image: var(--nav-icon-tasks-left);
  filter: invert(100%);
}

.nav-item[href$="campaigns.html"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 10v4h3l6 4V6L7 10H4Zm12-1.5a4.5 4.5 0 0 1 0 7M18.5 6a8 8 0 0 1 0 12'/%3E%3C/svg%3E");
}

.nav-item[href$="contacts.html"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='2'/%3E%3Ccircle cx='12' cy='10' r='2.6'/%3E%3Cpath d='M8.2 17a4 4 0 0 1 7.6 0M3 7.5h2M3 12h2M3 16.5h2'/%3E%3C/svg%3E");
}

.nav-item[href$="calls.html"]::after {
  background-image: var(--nav-icon-calls);
}

.nav-item[href$="admin-call-tree.html"]::after {
  background-image: url("./assets/nav-call-tree-flow.png");
  filter: drop-shadow(0.34px 0 0 rgba(255, 255, 255, 0.92))
    drop-shadow(-0.34px 0 0 rgba(255, 255, 255, 0.92))
    drop-shadow(0 0.34px 0 rgba(255, 255, 255, 0.92))
    drop-shadow(0 -0.34px 0 rgba(255, 255, 255, 0.92));
}

.nav-item[href$="reports.html"]::after {
  background-image: var(--nav-icon-reports);
}

.nav-item[href$="admin-reports.html"]::after {
  background-image: var(--nav-icon-reports);
}

.nav-item[href$="revenue.html"]::after {
  background-image: var(--nav-icon-finance-dollar);
}

.nav-item[href$="admin-revenue.html"]::after {
  background-image: var(--nav-icon-finance-dollar);
}

.nav-item[href$="users-roles.html"]::after {
  background-image: var(--nav-icon-team-roster);
}

.nav-item[href$="admin-team.html"]::after {
  background-image: var(--nav-icon-team-roster);
}

.nav-item[href$="admin-controls.html"]::after {
  background-image: url("./assets/nav-admin-controls-sliders.png");
}

.nav-item[href$="admin-tags.html"]::after {
  background-image: url("./assets/nav-tags-tag.svg");
}

.nav-item[href$="settings.html"]::after {
  background-image: var(--nav-icon-settings);
}

/* Patient Experience rows on px.html (px-shell.js sets data-px-view): same white icons, recolored by .nav-item.active::after. */
.nav-item[data-px-view="myday"]::after,
.nav-item[data-px-view="admintools"]::after {
  background-image: var(--nav-icon-sales-core);
}

.nav-item[data-px-view="mystats"]::after {
  background-image: var(--nav-icon-reports);
}

.nav-item[data-px-view="myperformance"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 17l6-6 4 4 8-8'/%3E%3Cpath d='M15 7h6v6'/%3E%3C/svg%3E");
}

.nav-item[data-px-view="patientexp"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20.5s-7.5-4.6-7.5-10.2A4.3 4.3 0 0 1 12 7.6a4.3 4.3 0 0 1 7.5 2.7c0 5.6-7.5 10.2-7.5 10.2Z'/%3E%3C/svg%3E");
}

.nav-item[data-px-view="bulktexts"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4V5Z'/%3E%3Cpath d='M8 9.5h8M8 12.5h5'/%3E%3C/svg%3E");
}

.nav-item[data-px-view="manageractivity"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h16'/%3E%3Cpath d='M7 16v-5M12 16V6M17 16v-8'/%3E%3C/svg%3E");
}

.nav-item[data-px-view="members"]::after,
.nav-item[data-px-view="adminmembers"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='2'/%3E%3Ccircle cx='12' cy='10' r='2.6'/%3E%3Cpath d='M8.2 17a4 4 0 0 1 7.6 0M3 7.5h2M3 12h2M3 16.5h2'/%3E%3C/svg%3E");
}

.nav-item[data-px-view="resources"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5A2.5 2.5 0 0 1 6.5 3H20v16H6.5A2.5 2.5 0 0 0 4 21.5v-16Z'/%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3C/svg%3E");
}

.nav-item[data-px-view="users"]::after {
  background-image: var(--nav-icon-team-roster);
}

.nav-item[data-px-view="comp"]::after {
  background-image: var(--nav-icon-finance-dollar);
}

.nav-item[data-px-view="audit"]::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5.5c0 4.5-3 8-7 9.5-4-1.5-7-5-7-9.5V6l7-3Z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
}

.nav-item[data-px-view="calendar"]::after {
  background-image: var(--nav-icon-calendar);
}

.nav-item-label {
  min-width: 0;
  flex: 1 1 auto;
}

.nav-item-with-count {
  gap: 12px;
}

.nav-item-trailing {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.nav-item-icon {
  display: none;
}

.nav-item.active::after,
.nav-item.nav-item-panel-active::after {
  filter: brightness(0) saturate(100%) invert(18%) sepia(58%) saturate(2951%) hue-rotate(319deg) brightness(92%) contrast(93%);
}

.nav-item.active[href$="admin-call-tree.html"]::after,
.nav-item.nav-item-panel-active[href$="admin-call-tree.html"]::after {
  filter: brightness(0) saturate(100%) invert(18%) sepia(58%) saturate(2951%) hue-rotate(319deg) brightness(92%) contrast(93%)
    drop-shadow(0.34px 0 0 rgba(190, 17, 88, 0.9))
    drop-shadow(-0.34px 0 0 rgba(190, 17, 88, 0.9))
    drop-shadow(0 0.34px 0 rgba(190, 17, 88, 0.9))
    drop-shadow(0 -0.34px 0 rgba(190, 17, 88, 0.9));
}

.nav-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

body.sidebar-collapsed .sidebar-nav {
  gap: 8px;
  margin-top: 0;
}

body.sidebar-collapsed .nav-item {
  width: 56px;
  padding: 0;
  min-height: 56px;
  font-size: 0;
  line-height: 0;
  color: transparent;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-indent: -9999px;
  margin-inline: auto;
  position: relative;
  border-radius: 18px;
}

body.sidebar-collapsed .nav-item:not(.active) {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body.sidebar-collapsed .nav-item:not(.active):not(.nav-item-panel-active):hover {
  background: transparent;
  border-color: transparent;
  transform: none;
}

body.sidebar-collapsed .nav-item-label,
body.sidebar-collapsed .nav-count-badge,
body.sidebar-collapsed .nav-item-trailing {
  display: none;
}

body.sidebar-collapsed .nav-item[data-messages-unanswered-badge="true"] .nav-item-trailing {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

body.sidebar-collapsed .nav-item[data-messages-unanswered-badge="true"] #globalMessagesUnansweredBadge {
  display: inline-flex;
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid var(--accent);
  background: #ffffff;
  color: var(--accent-deep);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  text-indent: 0;
  box-shadow: 0 5px 12px rgba(93, 6, 45, 0.24);
}

body.sidebar-collapsed .nav-item[data-messages-unanswered-badge="true"] #globalMessagesUnansweredBadge.hidden {
  display: none;
}

body.sidebar-collapsed .nav-item[data-tasks-overdue-badge="true"] .nav-item-trailing {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

body.sidebar-collapsed .nav-item[data-tasks-overdue-badge="true"] #globalCalendarTaskBadge {
  display: inline-flex;
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid var(--accent);
  background: #ffffff;
  color: var(--accent-deep);
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  text-indent: 0;
  box-shadow: 0 5px 12px rgba(93, 6, 45, 0.24);
}

body.sidebar-collapsed .nav-item[data-tasks-overdue-badge="true"] #globalCalendarTaskBadge.hidden {
  display: none;
}

body.sidebar-collapsed .nav-item::after {
  width: 26px;
  height: 26px;
  text-indent: 0;
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

body.sidebar-collapsed .nav-item[data-sidebar-team-messaging-trigger="true"]::after {
  width: 44px;
  height: 44px;
}

body.sidebar-collapsed .sidebar-copy {
  display: none;
}

body.sidebar-collapsed .sidebar-footer-brand {
  display: none;
}

/* Collapsed rail: a small label under each icon (short label from auth.js, set as data-short-label). */
body.sidebar-collapsed .nav-item::after {
  width: 22px;
  height: 22px;
  top: 17px;
}

@media (min-width: 901px) {
  body.sidebar-collapsed .nav-item[data-sidebar-team-messaging-trigger="true"]::after {
    width: 30px;
    height: 30px;
    top: 16px;
  }
}

body.sidebar-collapsed .nav-item::before {
  content: attr(data-short-label);
  position: absolute;
  left: 2px;
  right: 2px;
  top: 31px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  text-align: center;
  text-indent: 0;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
  color: rgba(255, 249, 252, 0.96);
  pointer-events: none;
}

body.sidebar-collapsed .nav-item.active::before,
body.sidebar-collapsed .nav-item.nav-item-panel-active::before {
  color: var(--accent-deep);
}

.calls-summary-column {
  min-width: 0;
}

.page-grid.calls-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  justify-content: stretch;
}

.page-grid.calls-summary-grid.calls-kpi-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calls-kpi-grid .metric-card {
  aspect-ratio: 1 / 0.82;
  min-height: 156px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  gap: 6px;
}

.calls-kpi-grid .metric-card span {
  font-size: 0.8rem;
  line-height: 1.2;
}

.calls-kpi-grid .metric-card strong {
  margin-top: 0;
  font-size: clamp(1.9rem, calc(2.5 * var(--vw)), 2.7rem);
  line-height: 0.95;
  overflow-wrap: anywhere;
}

.calls-kpi-grid .metric-card small {
  color: var(--ink);
  opacity: 0.78;
  line-height: 1.2;
  font-size: 0.78rem;
}

.calls-kpi-card-top-rep strong {
  font-size: clamp(1.2rem, calc(1.7 * var(--vw)), 1.95rem);
  line-height: 0.98;
}

.calls-dashboard-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  overflow: visible;
}

.calls-phone-widgets-row {
  position: relative;
  isolation: isolate;
  align-items: start;
  overflow: visible;
}

.calls-master-detail-shell {
  min-width: 0;
}

.calls-master-pane .reports-master-item {
  justify-content: space-between;
  gap: 8px;
}

.calls-master-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(242, 15, 98, 0.09);
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.calls-master-pane .reports-master-item.is-active .calls-master-count {
  background: rgba(242, 15, 98, 0.14);
}

.reports-detail-pane.calls-detail-pane {
  padding-left: 8px;
  padding-top: 24px;
  padding-bottom: 32px;
}

.calls-detail-workspace {
  display: grid;
  gap: 18px;
  min-width: 0;
  align-content: start;
}

.calls-analyzer-workspace {
  grid-template-columns: clamp(220px, calc(18 * var(--vw)), 270px) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

.qa-analyzer-scope-toolbar {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  margin: 0 8px 14px 0;
}

.qa-analyzer-scope-toolbar .reports-section-scope-summary {
  max-width: min(760px, calc(65 * var(--vw)));
}

.calls-analyzer-workspace > #qaWidget {
  grid-column: 1;
  grid-row: 1 / 3;
}

.calls-analyzer-workspace > .qa-inline-detail-pane {
  grid-column: 2;
  grid-row: 2;
}

.calls-missed-workspace {
  grid-template-columns: clamp(150px, calc(13 * var(--vw)), 190px) clamp(220px, calc(18 * var(--vw)), 270px) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

.calls-missed-scope-toolbar {
  grid-column: 3;
  grid-row: 1;
  min-width: 0;
  margin: 0 8px 14px clamp(20px, calc(2.6 * var(--vw)), 38px);
}

.calls-missed-workspace > #callsMissedStatusPane {
  grid-column: 1;
  grid-row: 1 / 3;
}

.calls-missed-workspace > #callsMissedLeadPane {
  grid-column: 2;
  grid-row: 1 / 3;
}

.calls-missed-workspace > .calls-missed-detail-pane {
  grid-column: 3;
  grid-row: 2;
}

.calls-missed-status-pane {
  min-width: 0;
  padding: 8px 8px 32px 0;
  border-right: 1px solid rgba(91, 77, 84, 0.16);
}

.calls-missed-status-pane .calls-missed-filter-toggle {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-flow: row;
  grid-auto-columns: auto;
  justify-content: stretch;
  gap: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid rgba(242, 15, 98, 0.12);
  border-radius: 0;
  background: transparent;
}

.calls-missed-status-pane .calls-missed-filter-button {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 12px 18px;
  border: 0;
  border-bottom: 1px solid rgba(242, 15, 98, 0.12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  text-align: left;
}

.calls-missed-status-pane .calls-missed-filter-button::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
  content: "";
  opacity: 0;
}

.calls-missed-status-pane .calls-missed-filter-button:hover,
.calls-missed-status-pane .calls-missed-filter-button:focus-visible {
  background: rgba(242, 15, 98, 0.05);
  color: var(--accent-deep);
  outline: none;
}

.calls-missed-status-pane .calls-missed-filter-button.is-active {
  background: linear-gradient(90deg, rgba(242, 15, 98, 0.11), rgba(242, 15, 98, 0.025));
  color: var(--accent-deep);
}

.calls-missed-status-pane .calls-missed-filter-button.is-active::before {
  opacity: 1;
}

#callsMissedLeadPane {
  min-width: 0;
  padding: 8px 8px 32px;
  align-content: start;
  border-right: 1px solid rgba(91, 77, 84, 0.16);
}

.calls-missed-detail-pane {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 18px;
  padding: 8px 0 32px;
}

#qaWidget {
  padding: 8px 8px 32px 0;
  border-right: 1px solid rgba(91, 77, 84, 0.16);
}

.qa-inline-detail-pane {
  position: sticky;
  top: 24px;
  min-width: 0;
  max-height: calc(calc(100 * var(--dvh)) - 72px);
  padding: 8px 0 32px clamp(20px, calc(2.6 * var(--vw)), 38px);
  border-left: 0;
  overflow: auto;
  scrollbar-gutter: stable;
}

.qa-inline-empty {
  display: grid;
  align-content: center;
  min-height: min(520px, calc(calc(100 * var(--dvh)) - 120px));
  padding: clamp(24px, calc(4 * var(--vw)), 52px);
  border: 1px dashed rgba(91, 77, 84, 0.2);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
}

.qa-inline-empty .eyebrow,
.qa-inline-empty h3,
.qa-inline-empty p {
  margin: 0;
}

.qa-inline-empty h3 {
  margin-top: 8px;
  color: var(--ink);
}

.qa-inline-empty p:last-child {
  max-width: 420px;
  margin: 10px auto 0;
  line-height: 1.55;
}

@media (max-width: 1040px) {
  .calls-analyzer-workspace {
    grid-template-columns: clamp(210px, calc(26 * var(--vw)), 250px) minmax(0, 1fr);
  }

  .calls-missed-workspace {
    grid-template-columns: clamp(140px, calc(20 * var(--vw)), 170px) clamp(200px, calc(28 * var(--vw)), 240px) minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .calls-analyzer-workspace,
  .calls-missed-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .calls-analyzer-workspace {
    grid-template-rows: auto auto auto;
  }

  .calls-missed-workspace {
    grid-template-rows: auto auto auto auto;
  }

  .calls-analyzer-workspace > #qaWidget,
  .calls-analyzer-workspace > .qa-inline-detail-pane {
    grid-column: 1;
    grid-row: auto;
  }

  .qa-analyzer-scope-toolbar {
    grid-column: 1;
    grid-row: auto;
    margin-right: 0;
  }

  .calls-missed-scope-toolbar,
  .calls-missed-workspace > #callsMissedStatusPane,
  .calls-missed-workspace > #callsMissedLeadPane,
  .calls-missed-workspace > .calls-missed-detail-pane {
    grid-column: 1;
    grid-row: auto;
  }

  .calls-missed-scope-toolbar {
    margin: 0 0 14px;
  }

  #qaWidget,
  #callsMissedStatusPane,
  #callsMissedLeadPane {
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(91, 77, 84, 0.16);
  }

  .qa-inline-detail-pane,
  .calls-missed-detail-pane {
    position: static;
    max-height: none;
    padding: 24px 0 0;
    border-top: 1px solid rgba(91, 77, 84, 0.16);
    border-left: 0;
    overflow: visible;
  }

  .qa-inline-empty {
    min-height: 280px;
  }
}

[data-calls-section][data-calls-section-hidden="true"] {
  display: none !important;
}

/* Keep Calls inside the viewport and let every master-detail pane own its scroll. */
body.calls-master-detail-page {
  height: calc(100 * var(--vh));
  height: calc(100 * var(--dvh));
  max-height: calc(100 * var(--vh));
  max-height: calc(100 * var(--dvh));
  min-height: 0;
  overflow: hidden;
}

body.calls-master-detail-page .app-shell,
body.calls-master-detail-page main.main-content:not([hidden]) {
  height: calc(100 * var(--vh));
  height: calc(100 * var(--dvh));
  max-height: calc(100 * var(--vh));
  max-height: calc(100 * var(--dvh));
  min-height: 0;
  overflow: hidden;
}

body.calls-master-detail-page main.main-content:not([hidden]) > .account-topbar {
  flex: 0 0 auto;
}

body.calls-master-detail-page .sidebar {
  height: calc(100 * var(--vh));
  height: calc(100 * var(--dvh));
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.calls-master-detail-page .calls-master-detail-shell {
  flex: 1 1 0;
  width: 100%;
  height: auto;
  max-height: none;
  min-height: 0;
  align-self: stretch;
  overflow: hidden;
}

body.calls-master-detail-page .calls-master-pane {
  position: static;
  top: auto;
  display: grid;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  align-self: stretch;
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

body.calls-master-detail-page .calls-master-pane .reports-master-list {
  min-height: 0;
  align-content: start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body.calls-master-detail-page .calls-detail-pane {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  padding-bottom: 0;
  overflow: hidden;
}

body.calls-master-detail-page .calls-detail-workspace:not([hidden]) {
  height: 100%;
  max-height: 100%;
  min-height: 0;
}

body.calls-master-detail-page .calls-detail-workspace:not(.calls-missed-workspace):not(.calls-analyzer-workspace) {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

@media (min-width: 761px) {
  body.calls-master-detail-page :is(.calls-missed-workspace, .calls-analyzer-workspace) {
    align-content: stretch;
    overflow: hidden;
  }

  body.calls-master-detail-page #callsMissedLeadPane {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    padding-bottom: 0;
    overflow: hidden;
  }

  body.calls-master-detail-page #callsMissedStatusPane {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    padding-bottom: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  body.calls-master-detail-page .calls-missed-lead-list {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  body.calls-master-detail-page .calls-missed-detail-pane {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
    padding-bottom: 0;
    overflow: hidden;
  }

  body.calls-master-detail-page .calls-missed-list {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  body.calls-master-detail-page #qaWidget {
    display: grid;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    padding-bottom: 0;
    overflow: hidden;
  }

  body.calls-master-detail-page #qaWidget .qa-widget-preview {
    height: 100%;
    max-height: none;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  body.calls-master-detail-page .qa-inline-detail-pane {
    position: static;
    top: auto;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    padding-bottom: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

@media (max-width: 760px) {
  body.calls-master-detail-page :is(.calls-missed-workspace, .calls-analyzer-workspace) {
    align-content: start;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

.ai-suggestion-draft {
  margin: 20px 0;
  padding: 20px 22px;
  border: 1px solid rgba(239, 22, 101, 0.16);
  border-left: 5px solid #ef1665;
  border-radius: 18px;
  background: #fff8fb;
  color: #30262d;
  font-style: normal;
  line-height: 1.65;
  white-space: pre-wrap;
}

.ai-suggestion-change-grid {
  margin-top: 18px;
}

.ai-suggestion-change-grid > div:last-child {
  border-color: rgba(27, 145, 88, 0.24);
  background: #f3fbf7;
}

/* Keep AI Inbox inside the viewport and let each master-detail pane own its scroll. */

.calls-detail-workspace > .panel {
  min-width: 0;
}

.calls-detail-workspace > .calls-detail-panel-flat {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

@media (max-width: 1040px) {

  .calls-detail-pane {
    padding-top: 18px;
    padding-bottom: 24px;
  }
}

.calls-activity-head-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.calls-activity-range-toggle {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.06);
  border: 1px solid rgba(239, 22, 101, 0.08);
}

.calls-activity-range-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.calls-activity-range-button:hover {
  color: var(--accent-deep);
  transform: translateY(-1px);
}

.calls-activity-range-button.is-active {
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.12), rgba(255, 191, 105, 0.26));
  color: var(--accent-deep);
}

.calls-missed-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
}

.calls-missed-lead-pane .calls-missed-toolbar {
  display: grid;
  gap: 8px;
}

.calls-missed-lead-pane .calls-missed-filter-toggle {
  width: 100%;
  grid-auto-flow: row;
  grid-auto-columns: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.calls-missed-lead-pane .calls-missed-filter-button {
  min-width: 0;
  padding: 0 6px;
}

.calls-missed-lead-pane .calls-sort-toggle-button {
  width: 100%;
}

.calls-missed-lead-pane .calls-widget-search {
  margin-top: 0;
}

.calls-missed-lead-list {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 0;
  border-top: 1px solid rgba(242, 15, 98, 0.12);
}

.calls-missed-lead-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  min-width: 0;
  min-height: 72px;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 10px 12px 22px;
  border: 0;
  border-bottom: 1px solid rgba(242, 15, 98, 0.12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.calls-missed-lead-row::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
  content: "";
  opacity: 0;
}

.calls-missed-lead-row:hover,
.calls-missed-lead-row:focus-visible {
  background: rgba(242, 15, 98, 0.05);
  color: var(--accent-deep);
  outline: none;
}

.calls-missed-lead-row.is-active {
  background: linear-gradient(90deg, rgba(242, 15, 98, 0.11), rgba(242, 15, 98, 0.025));
  color: var(--accent-deep);
}

.calls-missed-lead-row.is-active::before {
  opacity: 1;
}

.calls-missed-lead-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.calls-missed-lead-copy :is(strong, small) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calls-missed-lead-copy strong {
  color: inherit;
}

.calls-missed-lead-copy small {
  color: var(--muted);
  font-size: 0.76rem;
}

.calls-missed-lead-count {
  display: grid;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  place-items: center;
  border-radius: 999px;
  background: rgba(242, 15, 98, 0.1);
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 900;
}

.calls-missed-intro {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.calls-missed-filter-toggle {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 3px;
  padding: 3px;
  border-radius: 14px;
  background: rgba(43, 37, 48, 0.08);
  border: 1px solid rgba(43, 37, 48, 0.1);
  max-width: 100%;
  justify-content: start;
}

.calls-completed-filter-toggle {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 3px;
  padding: 3px;
  border-radius: 14px;
  background: rgba(43, 37, 48, 0.08);
  border: 1px solid rgba(43, 37, 48, 0.1);
  max-width: 100%;
  justify-content: start;
}

.calls-missed-filter-button,
.calls-completed-filter-button {
  border: 0;
  background: transparent;
  color: rgba(43, 37, 48, 0.68);
  min-height: 28px;
  padding: 0 18px;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.calls-missed-filter-button span {
  color: inherit;
  font-size: 0.76rem;
  opacity: 0.72;
}

.calls-missed-filter-button:hover {
  color: rgba(43, 37, 48, 0.84);
}

.calls-completed-filter-button:hover {
  color: rgba(43, 37, 48, 0.84);
}

.calls-missed-filter-button.is-active,
.calls-completed-filter-button.is-active {
  background: rgba(255, 255, 255, 0.98);
  color: var(--surface-ink);
  box-shadow: 0 8px 18px rgba(43, 37, 48, 0.08);
}

.calls-completed-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
}

.calls-widget-search {
  display: block;
  margin-top: 10px;
}

.calls-widget-search-input {
  width: 100%;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(239, 22, 101, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: rgba(24, 21, 28, 0.94);
  font: inherit;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.calls-widget-search-input::placeholder {
  color: rgba(92, 81, 97, 0.66);
}

.calls-widget-search-input:focus {
  outline: none;
  border-color: rgba(239, 22, 101, 0.24);
  box-shadow: 0 0 0 3px rgba(239, 22, 101, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.calls-sort-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(239, 22, 101, 0.12);
  background: rgba(255, 255, 255, 0.86);
  color: rgba(24, 21, 28, 0.94);
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.calls-sort-toggle-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(122, 133, 153, 0.12);
  border-color: rgba(239, 22, 101, 0.2);
}

.calls-activity-chart,
.calls-outcome-chart,
.calls-rep-chart,
.calls-timing-chart,
.calls-missed-list,
.calls-completed-list {
  display: grid;
  gap: 14px;
}

.calls-missed-list {
  width: 100%;
  gap: 0;
}

.calls-widget-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calls-widget-pagination-copy {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.calls-widget-pagination-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.calls-widget-pagination-button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(239, 22, 101, 0.14);
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent-deep);
  font: inherit;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.calls-widget-pagination-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(122, 133, 153, 0.14);
}

.calls-widget-pagination-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.calls-activity-line-shell {
  padding: 8px 4px 0;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 244, 248, 0.62), rgba(255, 252, 246, 0.88));
  border: 1px solid rgba(239, 22, 101, 0.08);
}

.calls-activity-line-chart {
  width: 100%;
  height: auto;
  display: block;
}

.calls-activity-grid-line {
  stroke: rgba(239, 22, 101, 0.1);
  stroke-width: 1;
}

.calls-activity-axis-label {
  fill: rgba(92, 81, 97, 0.86);
  font-size: 12px;
  font-weight: 700;
}

.calls-activity-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 10px 18px rgba(117, 18, 59, 0.08));
}

.calls-activity-line-inbound {
  stroke: #ff8a2b;
}

.calls-activity-line-outbound {
  stroke: #ef1665;
}

.calls-activity-point {
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 3;
}

.calls-activity-point-inbound {
  fill: #ff8a2b;
}

.calls-activity-point-outbound {
  fill: #ef1665;
}

.calls-chart-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.calls-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.calls-chart-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.calls-chart-dot-inbound {
  background: #ff8a2b;
}

.calls-chart-dot-outbound {
  background: #ef1665;
}

.calls-outcome-row,
.calls-rep-row,
.calls-timing-row,
.calls-missed-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 248, 251, 0.94), rgba(255, 253, 249, 0.9));
  border: 1px solid rgba(239, 22, 101, 0.08);
}

.calls-outcome-copy,
.calls-rep-copy,
.calls-timing-copy,
.calls-missed-copy {
  display: grid;
  gap: 4px;
}

.calls-outcome-copy small,
.calls-rep-copy small,
.calls-timing-copy small {
  color: var(--muted);
}

.calls-outcome-track,
.calls-timing-meter {
  position: relative;
  width: 100%;
  min-height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(239, 22, 101, 0.08);
}

.calls-outcome-fill,
.calls-timing-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef1665, #ff9f4a);
}

.calls-rep-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.calls-rep-metrics {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.08);
  color: var(--accent-deep);
  font-weight: 700;
}

.calls-timing-row {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 1fr) auto;
  align-items: center;
}

.calls-timing-rate {
  min-width: 44px;
  text-align: right;
  font-weight: 700;
  color: var(--accent-deep);
}

.calls-missed-card {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "header"
    "copy"
    "side";
  align-items: start;
  position: relative;
  gap: 14px 18px;
  padding: 22px 18px 24px;
  border: 0;
  border-bottom: 1px solid rgba(239, 22, 101, 0.12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.calls-missed-card.is-resolved {
  opacity: 0.76;
  box-shadow: none;
}

.calls-focused-card {
  border-color: rgba(239, 22, 101, 0.28);
  box-shadow: 0 0 0 2px rgba(239, 22, 101, 0.12), 0 18px 34px rgba(120, 19, 60, 0.12);
}

.calls-missed-header,
.calls-completed-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px 16px;
  min-width: 0;
}

.calls-missed-header {
  grid-area: header;
}

.calls-missed-identity {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 5px 10px;
  min-width: 0;
}

.calls-missed-identity .calls-missed-phone {
  grid-column: 2;
}

.calls-missed-followup-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.1);
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.calls-missed-followup-state.is-scheduled {
  background: rgba(245, 118, 40, 0.13);
  color: #b55315;
}

.calls-missed-followup-state.is-resolved {
  background: rgba(37, 182, 108, 0.13);
  color: #168b53;
}

.calls-missed-title {
  margin: 0;
  min-width: 0;
  color: rgba(24, 21, 28, 0.94);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.08;
}

.calls-missed-phone,
.calls-missed-meta {
  margin: 0;
  color: var(--muted);
}

.calls-missed-meta {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  font-size: 0.84rem;
  text-align: right;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
}

.calls-missed-header-trailing {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
}

.calls-missed-card-menu {
  flex: 0 0 auto;
}

.calls-missed-card-menu-trigger {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  font-size: 1.25rem;
}

.calls-missed-card-menu-popover {
  z-index: 20;
  min-width: 150px;
}

.calls-missed-card:has(.calls-missed-card-menu-popover:not(.hidden)) {
  z-index: 10;
}

.calls-missed-side {
  grid-area: side;
  display: grid;
  width: 100%;
  justify-items: stretch;
  align-content: end;
  align-self: stretch;
  gap: 12px;
}

.calls-missed-copy {
  grid-area: copy;
  gap: 9px;
  min-width: 0;
}

.calls-missed-transcript-preview {
  max-width: none;
  margin: 0;
  color: rgba(45, 39, 49, 0.9);
  font-size: 0.92rem;
  line-height: 1.5;
}

.calls-missed-transcript-preview.is-muted {
  color: var(--muted);
}

.calls-missed-transcript-preview.is-error {
  color: rgba(174, 49, 69, 0.94);
}

.calls-missed-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  justify-content: stretch;
  gap: 10px;
  width: 100%;
  flex: 0 0 100%;
}

.calls-missed-voicemail-button,
.calls-missed-callback-button,
.calls-missed-schedule-button,
.calls-missed-resolve-button {
  width: 100%;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease, border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.calls-missed-voicemail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(239, 22, 101, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.calls-missed-voicemail-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(122, 133, 153, 0.16);
}

.calls-missed-callback-button {
  grid-column: auto;
}

.calls-missed-schedule-button {
  border: 1px solid rgba(239, 22, 101, 0.18);
  background: rgba(239, 22, 101, 0.07);
  color: var(--accent-deep);
  cursor: pointer;
}

.calls-missed-schedule-button:hover {
  transform: translateY(-1px);
  background: rgba(239, 22, 101, 0.12);
  box-shadow: 0 12px 24px rgba(239, 22, 101, 0.1);
}

.calls-missed-schedule-button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  box-shadow: none;
}

.calls-missed-resolve-button {
  border: 1px solid rgba(37, 182, 108, 0.24);
  background: rgba(37, 182, 108, 0.09);
  color: #168b53;
  cursor: pointer;
}

.calls-missed-resolve-button:hover {
  transform: translateY(-1px);
  background: rgba(37, 182, 108, 0.14);
  box-shadow: 0 12px 24px rgba(37, 182, 108, 0.1);
}

.calls-missed-resolve-button.is-reopen {
  border-color: rgba(122, 133, 153, 0.2);
  background: rgba(122, 133, 153, 0.08);
  color: rgba(65, 73, 88, 0.92);
}

.calls-missed-resolve-button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  box-shadow: none;
}

.calls-missed-voicemail-player {
  margin-top: 4px;
}

.calls-missed-voicemail-player audio {
  width: min(100%, 320px);
  display: block;
}

.calls-missed-voicemail-error {
  margin: 2px 0 0;
  color: rgba(194, 35, 59, 0.94);
  font-size: 0.82rem;
  font-weight: 600;
}

.calls-missed-schedule-modal {
  width: min(560px, calc(calc(100 * var(--vw)) - 32px));
}

.calls-missed-schedule-form {
  display: grid;
  gap: 18px;
}

.calls-missed-schedule-lead {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.calls-missed-schedule-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.calls-missed-schedule-form input {
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid rgba(239, 22, 101, 0.18);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.calls-missed-schedule-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.calls-missed-schedule-actions > button {
  width: 100%;
  margin: 0;
}

.calls-missed-empty {
  display: grid;
  gap: 6px;
}

.calls-missed-empty strong {
  color: rgba(24, 21, 28, 0.9);
}

.calls-completed-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "header header"
    "copy side";
  gap: 10px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 248, 251, 0.94), rgba(255, 253, 249, 0.9));
  border: 1px solid rgba(239, 22, 101, 0.08);
}

.calls-completed-copy {
  grid-area: copy;
  display: grid;
  gap: 4px;
}

.calls-completed-title {
  margin: 0;
  min-width: 0;
  color: rgba(24, 21, 28, 0.94);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.08;
}

.calls-completed-phone,
.calls-completed-meta {
  margin: 0;
  color: var(--muted);
}

.calls-completed-meta {
  margin: 0;
  min-width: 0;
  max-width: 100%;
  font-size: 0.84rem;
  text-align: right;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
}

.calls-card-meta-with-tag {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.calls-routing-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 220px;
  min-height: 30px;
  padding: 4px 11px 4px 8px;
  border: 1px solid rgba(239, 22, 101, 0.36);
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.09);
  color: #bf0d52;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.calls-routing-tag svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  padding: 3px;
  overflow: visible;
  border-radius: 50%;
  background: #ef1665;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.calls-routing-tag.is-team {
  border-color: rgba(245, 118, 40, 0.4);
  background: rgba(245, 118, 40, 0.1);
  color: #a55218;
}

.calls-routing-tag.is-team svg {
  background: #f57628;
}

.calls-routing-tag > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.calls-contact-type-tag.is-lead {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.1);
  color: #a65f00;
}

.calls-contact-type-tag.is-lead svg {
  background: #f59e0b;
}

.calls-contact-type-tag.is-active-member {
  border-color: rgba(25, 153, 91, 0.38);
  background: rgba(25, 153, 91, 0.1);
  color: #117744;
}

.calls-contact-type-tag.is-active-member svg {
  background: #19995b;
}

.calls-contact-type-tag.is-inactive-member {
  border-color: rgba(108, 117, 134, 0.35);
  background: rgba(108, 117, 134, 0.1);
  color: #596273;
}

.calls-contact-type-tag.is-inactive-member svg {
  background: #6c7586;
}

.calls-contact-type-tag.is-pending-member {
  border-color: rgba(245, 118, 40, 0.38);
  background: rgba(245, 118, 40, 0.1);
  color: #b34d0c;
}

.calls-contact-type-tag.is-pending-member svg {
  background: #f57628;
}

.calls-completed-side {
  grid-area: side;
  display: grid;
  justify-items: end;
  align-content: end;
  align-self: end;
  gap: 12px;
}

.calls-completed-header {
  grid-area: header;
}

.calls-completed-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.calls-completed-state.has-recording {
  background: rgba(37, 182, 108, 0.14);
  color: #168b53;
}

.calls-completed-state.no-recording {
  background: rgba(122, 133, 153, 0.12);
  color: rgba(84, 93, 111, 0.9);
}

.calls-completed-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.calls-completed-listen-button {
  min-width: 148px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(239, 22, 101, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent-deep);
  font: inherit;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease, border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}

.calls-completed-listen-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(122, 133, 153, 0.16);
}

.calls-completed-player {
  margin-top: 4px;
}

.calls-completed-player audio {
  width: min(100%, 320px);
  display: block;
}

.calls-completed-error {
  margin: 2px 0 0;
  color: rgba(194, 35, 59, 0.94);
  font-size: 0.82rem;
  font-weight: 600;
}

.calls-missed-callback-button {
  border: none;
  background: #ef1665;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
  cursor: pointer;
}

.calls-missed-callback-button:hover {
  transform: translateY(-1px);
  background: #ef1665;
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
  filter: none;
}

.calls-missed-callback-button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  box-shadow: none;
}

.calls-log-list {
  display: grid;
  gap: 16px;
}

.calls-log-card {
  border: 1px solid rgba(239, 22, 101, 0.12);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 247, 251, 0.98), rgba(255, 254, 250, 0.96));
  box-shadow: 0 18px 40px rgba(116, 16, 59, 0.08);
  padding: 18px 20px;
  display: grid;
  gap: 14px;
}

.calls-log-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.calls-log-card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.calls-log-card-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
}

.calls-log-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.calls-log-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid rgba(239, 22, 101, 0.12);
  background: rgba(255, 240, 246, 0.92);
  color: var(--accent-deep);
}

.calls-log-badge[data-direction="inbound"] {
  background: rgba(31, 122, 140, 0.12);
  color: #0f6170;
}

.calls-log-badge[data-direction="outbound"] {
  background: rgba(239, 22, 101, 0.1);
  color: var(--accent-deep);
}

.calls-log-badge[data-status="answered"],
.calls-log-badge[data-status="completed"] {
  background: rgba(25, 135, 84, 0.14);
  color: #146c43;
}

.calls-log-badge[data-status="no-answer"],
.calls-log-badge[data-status="busy"],
.calls-log-badge[data-status="failed"],
.calls-log-badge[data-status="canceled"] {
  background: rgba(196, 135, 0, 0.14);
  color: #8f6200;
}

.calls-log-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.calls-log-detail {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(17, 17, 17, 0.06);
  padding: 12px 14px;
}

.calls-log-detail-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.calls-log-notes {
  margin: 0;
  border-radius: 18px;
  background: rgba(255, 248, 251, 0.92);
  border: 1px solid rgba(239, 22, 101, 0.12);
  padding: 14px 16px;
  color: var(--muted);
}

.calls-log-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.calls-log-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(239, 22, 101, 0.18);
  background: linear-gradient(135deg, rgba(255, 235, 244, 0.94), rgba(255, 246, 205, 0.94));
  color: var(--accent-deep);
  font-weight: 700;
  text-decoration: none;
}

.calls-log-transcript {
  border-radius: 18px;
  background: rgba(255, 252, 254, 0.96);
  border: 1px solid rgba(239, 22, 101, 0.12);
  padding: 14px 16px;
}

.calls-log-transcript-meta,
.calls-log-transcript-body {
  margin: 0;
}

.calls-log-transcript-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.calls-log-transcript-body {
  margin-top: 10px;
  color: var(--ink);
  white-space: pre-wrap;
 }

.calls-log-empty {
  padding: 26px 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed rgba(239, 22, 101, 0.2);
  color: var(--muted);
}

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

  .page-grid.calls-summary-grid.calls-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .calls-activity-head-actions {
    justify-content: flex-start;
  }

  .calls-missed-toolbar {
    justify-content: flex-start;
  }

  .calls-completed-toolbar {
    justify-content: flex-start;
  }

  .calls-widget-pagination {
    justify-content: flex-start;
  }

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

  .calls-missed-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "header"
      "copy"
      "side";
  }

  .calls-completed-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "header"
      "copy"
      "side";
  }

  .calls-timing-rate {
    text-align: left;
  }

  .calls-missed-actions {
    width: 100%;
    flex-basis: auto;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .calls-missed-side,
  .calls-completed-side {
    justify-items: stretch;
  }

  .calls-missed-meta,
  .calls-completed-meta {
    text-align: left;
    white-space: normal;
  }

  .calls-card-meta-with-tag {
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .calls-missed-callback-button {
    width: 100%;
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .page-grid.calls-summary-grid,
  .calls-log-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-grid.calls-summary-grid.calls-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
  }

  .calls-kpi-grid .metric-card {
    aspect-ratio: auto;
    min-height: 148px;
  }

  .calls-log-card-head {
    flex-direction: column;
  }

  .calls-log-badges {
    justify-content: flex-start;
  }

  .calls-activity-head-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .calls-missed-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .calls-completed-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .calls-widget-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .calls-missed-filter-toggle {
    width: 100%;
    grid-auto-columns: 1fr;
    overflow-x: auto;
  }

  .calls-missed-filter-button {
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .calls-completed-filter-toggle {
    width: 100%;
    grid-auto-columns: 1fr;
  }

  .calls-sort-toggle-button {
    width: 100%;
  }

  .calls-widget-search {
    width: 100%;
  }

  .calls-widget-pagination-actions {
    width: 100%;
    justify-content: space-between;
  }

  .calls-activity-range-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .calls-rep-row,
  .calls-timing-row,
  .calls-missed-card,
  .calls-completed-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .calls-missed-card,
  .calls-completed-card {
    grid-template-areas:
      "header"
      "copy"
      "side";
  }

  .calls-missed-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .calls-missed-header,
  .calls-completed-header {
    grid-template-columns: minmax(0, 1fr);
  }
}

body.sidebar-collapsed .main-content {
  padding-left: 10px;
}

.nav-item:hover {
  background: rgba(255, 190, 27, 0.18);
  color: #fffef8;
}

.nav-item.active,
.nav-item.nav-item-panel-active {
  background: linear-gradient(135deg, rgba(255, 239, 244, 0.96), rgba(255, 219, 123, 0.92));
  color: var(--accent-deep);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 10px 20px rgba(116, 16, 59, 0.1);
}

.module-link-chip {
  text-decoration: none;
}

.hero-module-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.module-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 10px 16px;
  border-radius: 18px;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.12), rgba(255, 190, 27, 0.18));
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.12);
  font-weight: 700;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.module-action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(116, 16, 59, 0.1);
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.16), rgba(255, 190, 27, 0.24));
}

.calendar-delete-button {
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.16), rgba(179, 15, 82, 0.24));
  border-color: rgba(179, 15, 82, 0.22);
  color: var(--accent-deep);
}

.breadcrumb-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.breadcrumb-link-row a {
  color: var(--accent-deep);
  text-decoration: none;
}

.breadcrumb-link-row a:hover {
  text-decoration: underline;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--accent-deep);
}

.eyebrow-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.eyebrow-inline .eyebrow {
  margin-bottom: 0;
}

.eyebrow-date-range {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sidebar-copy,
.muted,
.hero-copy,
.feed-item small,
.calendar-item small,
table small {
  color: var(--muted);
}

.sidebar .sidebar-copy,
.sidebar .muted,
.sidebar .compact-list,
.sidebar label,
.sidebar h1,
.sidebar h2,
.sidebar strong,
.sidebar li {
  color: #fff9fb;
}

.sidebar .eyebrow {
  color: rgba(255, 240, 172, 0.94);
}

.sidebar-copy {
  display: none;
}

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

.panel {
  padding: 20px;
}

.sidebar .panel {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.compact-list {
  padding-left: 18px;
  margin: 12px 0 0;
}

.compact-list li + li {
  margin-top: 8px;
}

.main-content {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.right-sidebar {
  padding: 28px 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.42), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(252, 252, 253, 0.98) 100%);
  border-left: 1px solid rgba(17, 17, 17, 0.06);
  position: sticky;
  top: 0;
  align-self: start;
  height: calc(100 * var(--vh));
  max-height: calc(100 * var(--vh));
  min-height: calc(100 * var(--vh));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  overflow: hidden;
  isolation: isolate;
  transition: padding 240ms ease, gap 240ms ease, border-color 240ms ease;
}

.right-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.right-sidebar-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.right-sidebar-tab {
  border: 1px solid rgba(239, 22, 101, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  width: 48px;
  height: 48px;
  min-width: 48px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease, border-color 140ms ease;
}

.right-sidebar-tab::before {
  content: "";
  width: 22px;
  height: 22px;
  display: block;
  background-color: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.right-sidebar-tab[data-sidebar-tab="tasks"]::before {
  mask-image: var(--nav-icon-tasks);
  -webkit-mask-image: var(--nav-icon-tasks);
}

.right-sidebar-tab[data-sidebar-tab="messages"]::before {
  mask-image: var(--nav-icon-communications);
  -webkit-mask-image: var(--nav-icon-communications);
}

.right-sidebar-tab[data-sidebar-tab="team-messaging"]::before {
  width: 38px;
  height: 38px;
  mask-image: var(--nav-icon-team-messaging);
  -webkit-mask-image: var(--nav-icon-team-messaging);
}

.right-sidebar-tab[data-sidebar-tab="calendar"]::before {
  mask-image: var(--nav-icon-calendar);
  -webkit-mask-image: var(--nav-icon-calendar);
}

.right-sidebar-tab[data-sidebar-tab="phone"]::before {
  mask-image: var(--nav-icon-calls);
  -webkit-mask-image: var(--nav-icon-calls);
}

.right-sidebar-tab:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-deep);
}

.right-sidebar-tab.is-active {
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.12), rgba(255, 190, 27, 0.2));
  border-color: rgba(239, 22, 101, 0.18);
  color: var(--accent-deep);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.right-sidebar-body {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
  transition: opacity 180ms ease;
}

.right-sidebar.is-loading .right-sidebar-body {
  opacity: 0;
  pointer-events: none;
}

.right-sidebar-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: hidden;
}

.right-sidebar-section[data-sidebar-panel="calendar"] {
  min-height: 0;
}

.right-sidebar-section[data-sidebar-panel="tasks"] {
  overflow: visible;
}

.right-sidebar-section[data-sidebar-panel="phone"] {
  min-height: 0;
  overflow: visible;
}

.right-sidebar-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.right-sidebar-section[data-sidebar-panel="tasks"] .right-sidebar-section-head > div {
  display: grid;
  justify-items: start;
  width: 100%;
}

.sidebar-task-header-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin-top: 10px;
}

.sidebar-call-header-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin-top: 10px;
}

.sidebar-phone-head-actions {
  display: grid;
  justify-items: end;
  gap: 0;
}

.right-sidebar-section-head h3 {
  margin: 0;
  line-height: 1.08;
}

.sidebar-calendar-head-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.sidebar-task-header-button {
  width: 100%;
  min-width: 0;
  margin-top: 0;
  padding: 10px 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.sidebar-task-header-button-primary {
  background: #ef1665;
  color: #ffffff;
  border: 1px solid rgba(239, 22, 101, 0.12);
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
}

.sidebar-task-header-button-primary:hover,
.sidebar-task-header-button-primary:focus-visible {
  background: #ef1665;
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
}

.messaging-inbox-modal #messagingInboxSaveButton {
  height: 42px;
  min-height: 42px;
  padding: 8px 18px;
  line-height: 1.2;
  white-space: nowrap;
}

.sidebar-task-header-button-secondary {
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.14);
  box-shadow: 0 10px 22px rgba(116, 16, 59, 0.08);
}

.sidebar-task-header-button-secondary:hover,
.sidebar-task-header-button-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 24px rgba(116, 16, 59, 0.1);
}

.sidebar-calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sidebar-calendar-nav-button {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(239, 22, 101, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.sidebar-calendar-nav-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(239, 22, 101, 0.2);
}

.sidebar-calendar-date-input {
  min-width: 0;
  width: 154px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.right-sidebar-toggle {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 999px;
  border: 1px solid rgba(239, 22, 101, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(116, 16, 59, 0.08);
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}

.right-sidebar-toggle:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.94);
}

.right-sidebar-toggle-icon {
  font-size: 1.5rem;
  line-height: 1;
  transform: rotate(180deg);
  transition: transform 240ms ease;
}

.right-sidebar-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 28px 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.58), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(252, 252, 253, 0.98) 100%);
}

.right-sidebar-loading.hidden {
  display: none;
}

.right-sidebar-loading-shell {
  width: 100%;
  min-height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 22px;
  animation: sidebarLoadingFade 1.1s ease-in-out infinite alternate;
}

.right-sidebar-loading-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.right-sidebar-loading-icon,
.right-sidebar-loading-kicker,
.right-sidebar-loading-title,
.right-sidebar-loading-card {
  position: relative;
  overflow: hidden;
  background: rgba(239, 22, 101, 0.08);
}

.right-sidebar-loading-icon::after,
.right-sidebar-loading-kicker::after,
.right-sidebar-loading-title::after,
.right-sidebar-loading-card::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.82), transparent);
  animation: sidebarLoadingShimmer 1.2s ease-in-out infinite;
}

.right-sidebar-loading-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
}

.right-sidebar-loading-copy {
  display: grid;
  gap: 10px;
}

.right-sidebar-loading-kicker {
  width: 88px;
  height: 14px;
  border-radius: 999px;
}

.right-sidebar-loading-title {
  width: min(100%, 220px);
  height: 44px;
  border-radius: 16px;
}

.right-sidebar-loading-stack {
  display: grid;
  align-content: start;
  gap: 14px;
}

.right-sidebar-loading-card {
  width: 100%;
  min-height: 112px;
  border-radius: 28px;
  border: 1px solid rgba(239, 22, 101, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 244, 249, 0.88) 100%);
  box-shadow: 0 18px 38px rgba(116, 16, 59, 0.06);
}

@keyframes sidebarLoadingShimmer {
  100% {
    transform: translateX(100%);
  }
}

@keyframes sidebarLoadingFade {
  from {
    opacity: 0.92;
  }
  to {
    opacity: 1;
  }
}

.account-topbar {
  --account-topbar-control-size: 42px;
  --account-topbar-icon-size: 18px;
  --account-topbar-avatar-size: 32px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 120;
  margin: -10px -10px 0;
  padding: 7px 10px 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 250, 252, 0.94) 72%, rgba(255, 250, 252, 0.86) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.05);
}

.account-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.account-topbar-center {
  flex: 1 1 360px;
  min-width: 280px;
  display: flex;
  justify-content: center;
}

.account-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.account-language-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(239, 22, 101, 0.18);
  background: rgba(255, 255, 255, 0.92);
}

.account-language-option {
  min-width: 36px;
  height: 30px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6f6068;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.account-language-option:hover {
  color: #ef1665;
}

.account-language-option.is-active {
  background: #ef1665;
  color: #fff;
}

.topbar-lead-search {
  position: relative;
  width: min(560px, 100%);
}

.topbar-lead-search-field {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 12px 28px rgba(62, 10, 32, 0.08);
}

.topbar-lead-search-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 1.5px solid rgba(102, 85, 95, 0.68);
  border-radius: 999px;
  position: relative;
}

.topbar-lead-search-icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 1.5px;
  border-radius: 999px;
  background: rgba(102, 85, 95, 0.68);
  right: -3px;
  bottom: -1px;
  transform: rotate(45deg);
}

.topbar-lead-search-field input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 0.84rem;
}

.topbar-lead-search-field input::placeholder {
  color: rgba(102, 85, 95, 0.78);
}

.topbar-lead-search-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;
  padding: 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 22px 48px rgba(62, 10, 32, 0.14);
  display: grid;
  gap: 8px;
  z-index: 140;
  max-height: min(70vh, 520px);
  overflow-y: auto;
}

.topbar-lead-search-result {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(17, 17, 17, 0.04);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
}

.topbar-lead-search-result:hover,
.topbar-lead-search-result:focus-visible {
  border-color: rgba(239, 22, 101, 0.14);
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.05), rgba(255, 190, 27, 0.08));
}

.topbar-lead-search-result strong,
.topbar-lead-search-result small {
  display: block;
}

.topbar-lead-search-result small,
.topbar-lead-search-empty {
  color: var(--muted);
}

.topbar-lead-search-empty {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(17, 17, 17, 0.03);
  font-weight: 600;
}

.account-sales-progress-wrap {
  position: relative;
}

.account-sales-progress-trigger {
  width: var(--account-topbar-control-size);
  height: var(--account-topbar-control-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.account-sales-progress-ring {
  --sales-progress: 0%;
  width: var(--account-topbar-control-size);
  height: var(--account-topbar-control-size);
  border-radius: 999px;
  padding: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background:
    conic-gradient(
      from 180deg,
      #ef1665 0 var(--sales-progress),
      rgba(239, 22, 101, 0.16) var(--sales-progress) 100%
    );
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
  transition: background 180ms ease;
}

.account-sales-progress-core {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 187, 209, 0.9);
}

.account-sales-progress-value {
  color: var(--accent-deep);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
}

.account-topbar-action-button {
  width: var(--account-topbar-control-size);
  height: var(--account-topbar-control-size);
  min-width: var(--account-topbar-control-size);
  padding: 0;
  margin-top: 0;
  border-radius: 999px;
  border: 1px solid rgba(239, 22, 101, 0.12);
  background: #ef1665;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
  cursor: default;
}

.account-topbar-action-button:hover,
.account-topbar-action-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
  background: #ef1665;
}

.account-topbar-action-button:disabled {
  opacity: 1;
  cursor: default;
}

.account-mode-launcher-trigger:not(:disabled) {
  cursor: pointer;
}

.account-topbar-action-icon {
  width: var(--account-topbar-icon-size);
  height: var(--account-topbar-icon-size);
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='2.25' y='2.25' width='7.5' height='7.5' rx='1.9' stroke='white' stroke-width='2.2'/%3E%3Crect x='14.25' y='2.25' width='7.5' height='7.5' rx='1.9' stroke='white' stroke-width='2.2'/%3E%3Crect x='2.25' y='14.25' width='7.5' height='7.5' rx='1.9' stroke='white' stroke-width='2.2'/%3E%3Crect x='14.25' y='14.25' width='7.5' height='7.5' rx='1.9' stroke='white' stroke-width='2.2'/%3E%3C/svg%3E");
}

.preview-menu {
  position: relative;
}

.preview-trigger,
.preview-menu .preview-trigger {
  width: auto;
  min-width: 82px;
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.12), rgba(255, 190, 27, 0.18));
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.12);
  min-height: var(--account-topbar-control-size);
  padding: 8px 14px;
}

.preview-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 220px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 18px 44px rgba(62, 10, 32, 0.18);
  display: grid;
  gap: 8px;
  z-index: 20;
}

.preview-option {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(239, 22, 101, 0.06);
  color: var(--ink);
  border: none;
}

.preview-option:hover,
.preview-active {
  background: rgba(255, 190, 27, 0.2);
  color: var(--accent-deep);
}

.preview-chip {
  display: inline-flex;
  align-items: center;
  min-height: var(--account-topbar-control-size);
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--accent-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

.account-menu {
  position: relative;
}

.account-mode-launcher {
  position: relative;
}

.account-notification-wrap {
  position: relative;
}

.account-notification-trigger {
  position: relative;
  width: var(--account-topbar-control-size);
  height: var(--account-topbar-control-size);
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef1665;
  border: 1px solid rgba(239, 22, 101, 0.12);
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
}

.account-notification-icon {
  width: 20px;
  height: 17px;
  display: block;
  background-image: var(--notification-envelope-icon);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.account-notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: #b11b59;
  background: rgba(255, 250, 252, 0.98);
  border: 1px solid rgba(255, 187, 209, 0.88);
  box-shadow: 0 8px 18px rgba(116, 16, 59, 0.16);
}

.account-mode-launcher-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: max-content;
  max-width: calc(calc(100 * var(--vw)) - 32px);
  padding: 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 18px 44px rgba(62, 10, 32, 0.18);
  display: grid;
  gap: 14px;
  z-index: 140;
}

.account-mode-launcher-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.account-mode-launcher-head h3 {
  margin: 4px 0 0;
  font-size: 1.15rem;
}

.account-mode-launcher-summary {
  white-space: nowrap;
}

.account-mode-launcher-grid {
  display: grid;
  grid-template-columns: repeat(2, 88px);
  gap: 8px;
}

.account-mode-launcher-option {
  width: 88px;
  aspect-ratio: 1;
  min-height: 0;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 187, 209, 0.7);
  background: rgba(239, 22, 101, 0.05);
  color: var(--ink);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.account-mode-launcher-option:hover,
.account-mode-launcher-option:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(239, 22, 101, 0.18);
  background: rgba(255, 223, 236, 0.72);
  box-shadow: 0 14px 26px rgba(116, 16, 59, 0.12);
}

.account-mode-launcher-option.is-active {
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.13), rgba(255, 190, 27, 0.18));
  border-color: rgba(239, 22, 101, 0.22);
}

.account-mode-launcher-option-title {
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.2;
}

.account-mode-launcher-option-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.account-mode-launcher-option-icon img {
  display: none;
}

.account-mode-launcher-option-icon::before {
  content: "";
  display: block;
  width: 28px;
  height: 28px;
  background: var(--accent);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.account-mode-launcher-option[data-mode-target="sales"] .account-mode-launcher-option-icon::before {
  -webkit-mask-image: url("assets/nav-finance-dollar.png");
  mask-image: url("assets/nav-finance-dollar.png");
}

.account-mode-launcher-option[data-mode-target="admin"] .account-mode-launcher-option-icon::before {
  -webkit-mask-image: url("assets/mode-admin-briefcase.svg");
  mask-image: url("assets/mode-admin-briefcase.svg");
}

.account-mode-launcher-option[data-mode-target="events"] .account-mode-launcher-option-icon::before {
  -webkit-mask-image: url("assets/nav-calendar-tasks-calendar.png");
  mask-image: url("assets/nav-calendar-tasks-calendar.png");
}

.account-mode-launcher-option[data-mode-target="clinical-calls"] .account-mode-launcher-option-icon::before {
  -webkit-mask-image: url("assets/mode-clinical-clinic.svg");
  mask-image: url("assets/mode-clinical-clinic.svg");
}

.account-mode-launcher-option[data-mode-target="training"] .account-mode-launcher-option-icon::before {
  -webkit-mask-image: url("assets/mode-training-graduation-cap.svg");
  mask-image: url("assets/mode-training-graduation-cap.svg");
}

.account-mode-launcher-option[data-mode-target="px"] .account-mode-launcher-option-icon::before {
  -webkit-mask-image: url("assets/mode-px-people.svg");
  mask-image: url("assets/mode-px-people.svg");
}

.account-mode-launcher-option-copy {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.account-notification-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(360px, calc(calc(100 * var(--vw)) - 32px));
  max-height: min(calc(70 * var(--vh)), 560px);
  overflow: auto;
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 252, 253, 0.66)),
    linear-gradient(135deg, rgba(255, 246, 250, 0.54), rgba(255, 235, 244, 0.24) 55%, rgba(255, 241, 214, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.68);
  box-shadow: 0 20px 40px rgba(122, 133, 153, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(22px) saturate(1.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
  display: grid;
  gap: 12px;
  z-index: 140;
}

.account-notification-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.account-notification-head h3,
.account-notification-head p {
  color: rgba(29, 27, 32, 0.92);
}

.account-notification-list {
  display: grid;
  gap: 10px;
}

.account-notification-empty {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.24);
  color: rgba(76, 70, 80, 0.84);
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.36);
}

.account-notification-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 250, 252, 0.82)),
    linear-gradient(135deg, rgba(255, 248, 251, 0.78), rgba(255, 234, 242, 0.38) 60%, rgba(255, 244, 221, 0.34));
  border: 1px solid rgba(228, 214, 221, 0.9);
  box-shadow:
    0 10px 24px rgba(122, 133, 153, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.account-notification-item-setup {
  border-color: rgba(255, 199, 103, 0.44);
}

.account-notification-item-password-reset {
  border-color: rgba(239, 22, 101, 0.24);
}

.account-notification-item-link {
  color: inherit;
  text-decoration: none;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-notification-item-link-button {
  appearance: none;
  border: 0;
  background: transparent;
  width: 100%;
  padding: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.account-notification-item-link strong {
  color: rgba(24, 21, 28, 0.94);
  font-size: 1rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.account-notification-item-link span,
.account-notification-item-link small {
  color: rgba(86, 76, 90, 0.86);
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.account-notification-item-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 245, 249, 0.96);
  color: rgba(111, 28, 74, 0.92);
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid rgba(236, 206, 220, 0.92);
}

.account-notification-dismiss {
  justify-self: end;
  width: auto;
  min-width: 88px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.22);
  color: rgba(44, 36, 48, 0.92);
  font: inherit;
  font-weight: 700;
}

.account-notification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.account-notification-action {
  width: auto;
  min-width: 96px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.22);
  color: rgba(44, 36, 48, 0.92);
  font: inherit;
  font-weight: 700;
}

.account-notification-action-secondary {
  background: rgba(255, 255, 255, 0.14);
}

.account-notification-action:hover,
.account-notification-action:focus-visible,
.account-notification-dismiss:hover,
.account-notification-dismiss:focus-visible {
  background: rgba(255, 255, 255, 0.36);
  transform: translateY(-1px);
}

.account-notification-summary.chip {
  background: rgba(255, 255, 255, 0.24);
  color: rgba(57, 46, 63, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.38);
}

.account-trigger {
  width: var(--account-topbar-control-size);
  height: var(--account-topbar-control-size);
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.12);
}

.avatar-circle {
  width: var(--account-topbar-avatar-size);
  height: var(--account-topbar-avatar-size);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fffdfd;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.avatar-photo {
  color: transparent;
}

.avatar-photo-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  border-radius: inherit;
}

.account-summary-avatar {
  width: 56px;
  height: 56px;
}

.avatar-magenta {
  background: linear-gradient(135deg, #ef1665, #b30f52);
}

.avatar-gold {
  background: linear-gradient(135deg, #ffbe1b, #d58a00);
}

.avatar-plum {
  background: linear-gradient(135deg, #9b1c65, #5b0d39);
}

.avatar-ink {
  background: linear-gradient(135deg, #3b3b42, #15151a);
}

.avatar-sun {
  background: linear-gradient(135deg, #ff9d1b, #ef1665);
}

.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 280px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 18px 44px rgba(62, 10, 32, 0.18);
  display: grid;
  gap: 8px;
  z-index: 20;
}

.account-summary {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.account-summary strong,
.account-summary small {
  display: block;
}

.account-summary small {
  color: var(--muted);
}

.account-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  margin-top: 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.14);
  box-shadow: 0 10px 22px rgba(116, 16, 59, 0.08);
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}

.account-option:hover,
.account-option:focus-visible {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 12px 24px rgba(116, 16, 59, 0.1);
}

.account-admin-testing-modal {
  width: min(1080px, calc(calc(100 * var(--vw)) - 40px));
}

.account-admin-testing-search-label {
  display: grid;
  gap: 10px;
}

.account-admin-testing-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.signout-option {
  color: var(--accent-deep);
}

.account-profile-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
  overscroll-behavior: contain;
}

.account-profile-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.account-profile-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 12, 22, 0.46);
  backdrop-filter: blur(10px);
}

.account-profile-modal {
  position: relative;
  width: min(560px, calc(calc(100 * var(--vw)) - 32px));
  max-height: calc(calc(100 * var(--vh)) - 32px);
  border-radius: 28px;
  background: rgba(255, 254, 255, 0.98);
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 28px 70px rgba(62, 10, 32, 0.22);
  padding: 24px;
  display: grid;
  gap: 18px;
  overflow-y: auto;
}

.account-profile-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.account-profile-close {
  width: auto;
  min-width: 96px;
}

.account-profile-body {
  display: grid;
  gap: 18px;
}

.account-profile-summary {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.account-profile-summary strong,
.account-profile-summary small {
  display: block;
}

.account-profile-summary small {
  color: var(--muted);
}

.account-profile-avatar {
  width: 72px;
  height: 72px;
}

.account-profile-form {
  display: grid;
  gap: 14px;
}

.account-profile-form label span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.account-profile-form input {
  width: 100%;
}

.account-profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.photo-crop-overlay {
  position: fixed;
  inset: 0;
  z-index: 1510;
  display: grid;
  place-items: center;
  overflow: hidden;
  overscroll-behavior: contain;
}

.photo-crop-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.photo-crop-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 12, 22, 0.5);
  backdrop-filter: blur(12px);
}

.photo-crop-modal {
  position: relative;
  width: min(680px, calc(calc(100 * var(--vw)) - 32px));
  border-radius: 28px;
  background: rgba(255, 254, 255, 0.98);
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 28px 70px rgba(62, 10, 32, 0.26);
  padding: 24px;
  display: grid;
  gap: 20px;
}

.photo-crop-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
}

.photo-crop-close {
  width: auto;
  min-width: 96px;
}

.photo-crop-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 22px;
  align-items: start;
}

.photo-crop-stage {
  display: grid;
  place-items: center;
  padding: 14px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(239, 22, 101, 0.08), rgba(255, 190, 27, 0.12)),
    rgba(255, 249, 252, 0.94);
  border: 1px solid rgba(239, 22, 101, 0.12);
  min-height: 360px;
}

.photo-crop-frame {
  position: relative;
  width: min(100%, 280px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 32px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, #ef1665, #ffbe1b);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.88), 0 16px 36px rgba(116, 16, 59, 0.18);
  touch-action: none;
  cursor: grab;
}

.photo-crop-frame:active {
  cursor: grabbing;
}

.photo-crop-frame::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 24px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 999px rgba(13, 9, 12, 0.18);
  pointer-events: none;
}

.photo-crop-frame img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  user-select: none;
  pointer-events: none;
  transform-origin: center center;
}

.photo-crop-controls {
  display: grid;
  gap: 14px;
}

.photo-crop-controls label span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.photo-crop-controls input[type="range"] {
  width: 100%;
}

.photo-crop-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.status-error {
  background: rgba(239, 22, 101, 0.12);
  border: 1px solid rgba(239, 22, 101, 0.18);
  color: #8d1243;
}

.patient-link {
  padding: 0;
  border: none;
  background: none;
  color: var(--accent-deep);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(179, 15, 82, 0.24);
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.inline-link {
  display: inline;
  font-weight: 600;
}

.patient-card-overlay {
  position: fixed;
  inset: 0;
  z-index: 1600;
  overflow: hidden;
  overscroll-behavior: contain;
}

.patient-card-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 8, 20, 0.46);
  backdrop-filter: blur(4px);
}

.patient-card-modal {
  position: relative;
  width: min(920px, calc(calc(100 * var(--vw)) - 40px));
  max-height: calc(calc(100 * var(--vh)) - 48px);
  overflow: auto;
  margin: 24px auto;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 28px 70px rgba(49, 8, 26, 0.24);
}

.patient-card-modal.member-card-modal {
  border-color: rgba(239, 22, 101, 0.16);
  box-shadow: 0 30px 76px rgba(239, 22, 101, 0.12);
}

.patient-card-modal.employee-card-modal {
  border-color: rgba(239, 22, 101, 0.16);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 30px 76px rgba(239, 22, 101, 0.12);
}

.patient-card-modal.member-card-modal .patient-card-head .eyebrow {
  color: var(--accent-deep);
}

.patient-card-modal.employee-card-modal .patient-card-head .eyebrow {
  color: var(--accent-deep);
}

.patient-card-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1605;
}

.patient-card-loading-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 8, 20, 0.24);
  backdrop-filter: blur(3px);
}

.patient-card-loading-modal {
  position: relative;
  width: min(360px, calc(calc(100 * var(--vw)) - 40px));
  margin: min(calc(20 * var(--vh)), 180px) auto 0;
  padding: 24px 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(239, 22, 101, 0.12);
  box-shadow: 0 24px 60px rgba(49, 8, 26, 0.18);
  text-align: center;
}

.patient-card-loading-modal h2 {
  margin: 8px 0 0;
  font-size: 1.5rem;
}

.patient-card-loading-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  border-radius: 999px;
  border: 4px solid rgba(239, 22, 101, 0.16);
  border-top-color: var(--accent);
  animation: patient-card-loading-spin 0.85s linear infinite;
}

@keyframes patient-card-loading-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.patient-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.patient-card-title-block {
  display: grid;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.patient-card-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.patient-card-title-row h2 {
  margin: 0;
}

.patient-card-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.patient-card-header-action {
  width: auto;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  text-decoration: none;
}

.patient-card-header-action .patient-inline-action-icon {
  width: 18px;
  height: 18px;
}

.patient-card-header-action:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.patient-card-close {
  width: auto;
  min-width: 92px;
}

@media (max-width: 700px) {
  .patient-card-header-action {
    width: 44px;
    min-width: 44px;
    padding: 0;
    border-radius: 999px;
  }

  .patient-card-header-action > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

.patient-card-body {
  display: grid;
  gap: 0;
}

/* Patient-card sections share one edge-to-edge surface, separated by rules. */
.patient-card-body > .patient-panel {
  padding: 24px 0;
  border: 0;
  border-top: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.patient-card-body > .patient-progress-panel {
  border-top: 0;
}

.patient-progress-panel {
  display: grid;
  gap: 18px;
}

.patient-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.patient-progress-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.patient-task-button {
  min-width: 0;
  padding: 10px 16px;
}

.patient-family-panel {
  grid-column: 1 / -1;
}

.patient-family-summary-row {
  display: grid;
  gap: 8px;
}

.patient-family-summary-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.patient-family-summary-value {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.patient-family-inline-button {
  padding: 6px 12px;
  font-size: 0.9rem;
}

.patient-family-tree-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 18px;
  background: rgba(17, 17, 17, 0.08);
}

.patient-family-tree-summary > div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  background: #ffffff;
}

.patient-family-tree-summary span {
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.patient-family-tree-summary strong {
  color: var(--text-strong);
}

.patient-family-tree {
  display: grid;
  justify-items: stretch;
  min-width: 0;
  padding: 8px 0 4px;
}

.patient-family-tree-level {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 0;
}

.patient-family-tree-level-label {
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.patient-family-tree-people {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.patient-family-tree-person {
  position: relative;
  display: grid;
  flex: 0 1 190px;
  width: min(100%, 190px);
  min-width: 140px;
  min-height: 106px;
  align-content: center;
  justify-items: center;
  gap: 7px;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(239, 22, 101, 0.14);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(62, 10, 32, 0.07);
  color: var(--text-strong);
  font: inherit;
  text-align: center;
}

button.patient-family-tree-person {
  cursor: pointer;
}

button.patient-family-tree-person:hover,
button.patient-family-tree-person:focus-visible {
  border-color: rgba(239, 22, 101, 0.34);
  box-shadow: 0 14px 28px rgba(62, 10, 32, 0.11);
  transform: translateY(-1px);
}

.patient-family-tree-person.is-current-patient {
  border-color: rgba(239, 22, 101, 0.28);
  background: rgba(255, 249, 252, 0.98);
}

.patient-family-tree-person.is-primary-contact {
  border-color: rgba(239, 22, 101, 0.52);
  background: linear-gradient(135deg, rgba(255, 236, 244, 0.98), rgba(255, 247, 218, 0.98));
  box-shadow: 0 0 0 3px rgba(239, 22, 101, 0.1), 0 16px 32px rgba(116, 16, 59, 0.13);
}

.patient-family-tree-person-role {
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.patient-family-tree-person strong {
  font-size: 0.98rem;
  line-height: 1.25;
}

.patient-family-tree-primary-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent-deep);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.patient-family-tree-connector {
  width: 2px;
  height: 34px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(239, 22, 101, 0.42), rgba(239, 22, 101, 0.18));
}

@media (max-width: 720px) {
  .patient-family-tree-summary {
    grid-template-columns: 1fr;
  }

  .patient-family-tree-person {
    flex-basis: min(100%, 170px);
  }
}

.patient-family-manager {
  display: grid;
  gap: 18px;
}

.patient-family-manager-head {
  display: grid;
  gap: 6px;
}

.patient-family-add-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.patient-family-add-option {
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 9px 13px;
  border: 1px solid rgba(239, 22, 101, 0.16);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(116, 16, 59, 0.05);
  color: var(--accent-deep);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: left;
}

.patient-family-add-option:hover,
.patient-family-add-option:focus-visible {
  border-color: rgba(239, 22, 101, 0.3);
  background: rgba(255, 250, 252, 0.98);
  box-shadow: 0 14px 26px rgba(116, 16, 59, 0.1);
  transform: translateY(-1px);
}

.patient-family-editor-layout {
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.patient-family-add-panel {
  display: grid;
  gap: 13px;
  padding-right: 20px;
  border-right: 1px solid rgba(17, 17, 17, 0.08);
}

.patient-family-editor-members {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.patient-family-editor-members-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.patient-family-editor-head-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.patient-family-primary-field {
  display: grid;
  gap: 5px;
}

.patient-family-primary-field > span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.patient-family-primary-field select {
  min-height: 40px;
  max-width: 230px;
  padding: 7px 32px 7px 11px;
  border: 1px solid rgba(239, 22, 101, 0.22);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text-strong);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
}

.patient-family-editor-members-head h4,
.patient-family-editor-members-head p,
.patient-family-editor-empty {
  margin: 0;
}

.patient-family-editor-member-list {
  display: grid;
  gap: 9px;
}

.patient-family-editor-member {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 13px 14px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 16px;
  background: #ffffff;
}

.patient-family-editor-member.is-primary-contact {
  border-color: rgba(239, 22, 101, 0.34);
  background: linear-gradient(135deg, rgba(255, 242, 247, 0.96), #ffffff);
  box-shadow: 0 8px 20px rgba(116, 16, 59, 0.08);
}

.patient-family-editor-member-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.patient-family-editor-member-copy strong,
.patient-family-editor-member-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-family-editor-member-copy span {
  color: var(--text-soft);
  font-size: 0.86rem;
}

.patient-family-editor-member-copy small {
  width: max-content;
  margin-top: 3px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-deep);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
}

.patient-family-editor-member-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.patient-family-editor-member-actions select {
  min-height: 38px;
  padding: 7px 30px 7px 11px;
  border: 1px solid rgba(239, 22, 101, 0.18);
  border-radius: 12px;
  background: #ffffff;
  color: var(--text-strong);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
}

.patient-family-remove-button {
  width: auto;
  min-width: 0;
  min-height: 38px;
  margin: 0;
  padding: 7px 12px;
  font-size: 0.86rem;
}

.patient-family-editor-empty {
  padding: 20px;
  border: 1px dashed rgba(17, 17, 17, 0.12);
  border-radius: 16px;
  text-align: center;
}

.patient-family-editor-feedback {
  grid-column: 1 / -1;
}

.patient-family-add-flow-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.patient-family-add-flow-head > div {
  display: grid;
  gap: 5px;
}

.patient-family-add-flow-head h4,
.patient-family-add-flow-head p {
  margin: 0;
}

.patient-family-add-back {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
  margin: 0;
  padding: 9px 14px;
}

.patient-family-search-field {
  display: grid;
  gap: 7px;
  color: var(--text-strong);
  font-weight: 700;
}

.patient-family-search-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(239, 22, 101, 0.18);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text-strong);
  font: inherit;
  padding: 12px 15px;
}

.patient-family-search-field input:focus {
  border-color: rgba(239, 22, 101, 0.42);
  box-shadow: 0 0 0 3px rgba(239, 22, 101, 0.09);
  outline: none;
}

@media (max-width: 720px) {
  .patient-family-editor-layout {
    grid-template-columns: 1fr;
  }

  .patient-family-add-panel {
    padding: 0 0 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  }

  .patient-family-add-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .patient-family-editor-members-head {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .patient-family-add-options,
  .patient-family-editor-member {
    grid-template-columns: 1fr;
  }

  .patient-family-editor-member-actions {
    align-items: stretch;
  }

  .patient-family-editor-member-actions label,
  .patient-family-editor-member-actions select,
  .patient-family-primary-field,
  .patient-family-primary-field select {
    width: 100%;
    max-width: none;
  }

  .patient-family-editor-head-controls {
    width: 100%;
  }
}

.patient-family-candidate-list {
  display: grid;
  gap: 9px;
}

.patient-family-candidate-select {
  width: 100%;
  min-height: 64px;
  margin: 0;
  padding: 13px 15px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 17px;
  background: #ffffff;
  color: var(--text-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font: inherit;
  text-align: left;
}

.patient-family-candidate-select > span:first-child {
  display: grid;
  gap: 4px;
}

.patient-family-candidate-select small {
  color: var(--text-soft);
}

.patient-family-candidate-select:hover,
.patient-family-candidate-select:focus-visible,
.patient-family-candidate-select.is-selected {
  border-color: rgba(239, 22, 101, 0.36);
  background: rgba(255, 248, 251, 0.98);
}

.patient-family-candidate-check {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border: 1px solid rgba(239, 22, 101, 0.24);
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
}

.patient-family-candidate-select.is-selected .patient-family-candidate-check {
  border-color: var(--accent-deep);
  background: var(--accent-deep);
}

.patient-family-candidate-select.is-already-linked,
.patient-family-candidate-select.is-already-linked:hover {
  border-color: rgba(17, 17, 17, 0.08);
  background: rgba(247, 244, 246, 0.92);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
  transform: none;
}

.patient-family-linked-status {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 3px;
  color: var(--accent-deep);
  text-align: right;
}

.patient-family-linked-status strong {
  font-size: 0.76rem;
  font-weight: 800;
}

.patient-family-linked-status small {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.patient-family-add-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.patient-family-add-actions > span {
  color: var(--text-soft);
  font-size: 0.86rem;
  font-weight: 700;
}

.patient-family-add-actions .sidebar-task-header-button {
  width: auto;
}

@media (max-width: 560px) {
  .patient-family-add-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .patient-family-add-actions .sidebar-task-header-button {
    width: 100%;
  }
}

.sales-shell-route-pending {
  min-height: calc(55 * var(--vh));
}

.sales-shell-route-loading {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 12px;
  margin: clamp(48px, calc(16 * var(--vh)), 160px) auto 0;
  padding: 18px 22px;
  border: 1px solid rgba(239, 22, 101, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  box-shadow: 0 18px 44px rgba(70, 28, 46, 0.08);
  font-weight: 700;
}

.sales-shell-route-loading p {
  margin: 0;
}

.sales-shell-route-loading-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(239, 22, 101, 0.16);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: patient-card-loading-spin 0.85s linear infinite;
}

.patient-family-feedback {
  margin: 0;
  color: var(--accent-deep);
  font-weight: 600;
}

.patient-family-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 40;
}

.patient-family-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 8, 20, 0.38);
}

.patient-family-modal {
  position: relative;
  width: min(760px, calc(calc(100 * var(--vw)) - 48px));
  max-height: min(calc(86 * var(--vh)), 900px);
  overflow: auto;
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 32px 80px rgba(38, 14, 28, 0.24);
  display: grid;
  gap: 18px;
}

.patient-family-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.patient-history-close-button {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(239, 22, 101, 0.22);
  border-radius: 999px;
  background: rgba(255, 236, 244, 0.95);
  color: var(--accent-deep);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
}

.patient-history-close-button:hover,
.patient-history-close-button:focus-visible {
  background: rgba(255, 220, 233, 0.98);
  border-color: rgba(239, 22, 101, 0.34);
  outline: none;
}

.patient-history-panel {
  display: flex;
  flex-direction: column;
}

.patient-history-category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.1);
}

.patient-history-category-button {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid rgba(239, 22, 101, 0.14);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(116, 16, 59, 0.05);
  color: var(--accent-deep);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.patient-history-category-button:hover,
.patient-history-category-button:focus-visible {
  border-color: rgba(239, 22, 101, 0.28);
  background: rgba(255, 250, 252, 0.98);
  box-shadow: 0 10px 20px rgba(116, 16, 59, 0.08);
}

.patient-history-category-button.is-active {
  border-color: rgba(239, 22, 101, 0.34);
  background: rgba(239, 22, 101, 0.1);
  box-shadow: none;
}

.patient-history-list {
  display: grid;
  gap: 0;
  background: #ffffff;
}

.patient-history-inline-list {
  flex: 1 1 auto;
}

.patient-history-item {
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 0;
  background: #ffffff;
  display: grid;
  gap: 10px;
}

.patient-history-item:first-child {
  border-top: 1px solid rgba(17, 17, 17, 0.1);
}

/* Patient card > Conversations (Spruce-style list of threads with this number) */
.patient-conversation-list {
  display: grid;
}

.patient-conversation-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 6px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.1);
  color: inherit;
  text-decoration: none;
}

.patient-conversation-row:first-child {
  border-top: 1px solid rgba(17, 17, 17, 0.1);
}

.patient-conversation-row:hover,
.patient-conversation-row:focus-visible {
  background: rgba(239, 22, 101, 0.06);
}

.patient-conversation-icon,
.patient-conversation-owner {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(239, 22, 101, 0.1);
  color: #c4114f;
  font-size: 11px;
  font-weight: 700;
}

.patient-conversation-owner {
  width: 28px;
  height: 28px;
  background: #e9e9ee;
  color: #444;
}

.patient-conversation-main {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.patient-conversation-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.patient-conversation-top strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-conversation-top time {
  flex: 0 0 auto;
  font-size: 13px;
  color: #666;
}

.patient-conversation-preview {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #444;
  font-size: 14px;
}

.patient-conversations-status {
  margin: 18px 0;
  color: #666;
}

.patient-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.patient-history-kind,
.patient-history-meta,
.patient-history-detail {
  margin: 0;
}

.patient-history-kind {
  color: var(--accent-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.patient-history-meta {
  color: var(--text-soft);
  font-weight: 600;
}

.patient-history-detail {
  color: var(--text-soft);
  line-height: 1.5;
}

.secondary-chip-button {
  border: 1px solid rgba(239, 22, 101, 0.18);
  border-radius: 999px;
  background: rgba(255, 236, 244, 0.95);
  color: var(--accent-deep);
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
}

.patient-stage-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  align-items: start;
  padding: 0 28px;
}

.patient-stage-line {
  content: "";
  position: absolute;
  top: 13px;
  /* The dots are left-aligned inside each stage column, so anchor the line
     to the center of the first and last dot rather than using percentage
     insets that place it inside the gaps. */
  left: 41px;
  right: calc(28px + (100% - 56px) / 5 - 13px);
  height: 6px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.12);
  z-index: 0;
}

.patient-stage-line-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f4bfd3, #ef1665);
}

.member-status-track {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.member-status-track.pending-layout {
  grid-template-columns: minmax(0, 1fr);
}

.member-status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(246, 243, 246, 0.92);
  color: #7d6480;
}

.member-status-card.active {
  border-color: rgba(37, 164, 92, 0.26);
  background: rgba(231, 248, 237, 0.96);
  color: #1f7e4f;
}

.member-status-card.active.inactive-member {
  border-color: rgba(214, 58, 74, 0.24);
  background: rgba(255, 236, 239, 0.96);
  color: #b42333;
}

.member-status-card.active.pending-member {
  align-items: flex-start;
  border-color: rgba(232, 169, 36, 0.26);
  background: rgba(255, 247, 225, 0.98);
  color: #8a5b00;
}

.member-status-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(125, 100, 128, 0.34);
  flex: 0 0 auto;
}

.member-status-card.active .member-status-dot {
  background: #25a45c;
  box-shadow: 0 0 0 8px rgba(37, 164, 92, 0.14);
}

.member-status-card.active.inactive-member .member-status-dot {
  background: #d63a4a;
  box-shadow: 0 0 0 8px rgba(214, 58, 74, 0.14);
}

.member-status-card.active.pending-member .member-status-dot {
  background: #e8a924;
  box-shadow: 0 0 0 8px rgba(232, 169, 36, 0.16);
}

.member-status-copy {
  display: grid;
  gap: 4px;
}

.member-status-copy span {
  font-size: 0.95rem;
  line-height: 1.4;
  color: inherit;
  opacity: 0.92;
}

.patient-descriptive-tags {
  display: grid;
  gap: 12px;
}

.patient-descriptive-tags-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.patient-descriptive-tags-head > div {
  display: grid;
  gap: 4px;
}

.patient-descriptive-tags-head p,
.patient-descriptive-tags-head span {
  margin: 0;
}

.patient-add-tags-button {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 10px 18px;
}

.patient-descriptive-tag-groups {
  display: grid;
  gap: 9px;
}

.patient-descriptive-tag-group {
  display: grid;
  grid-template-columns: minmax(92px, 128px) minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid rgba(17, 17, 17, 0.06);
}

.patient-descriptive-tag-group:first-child {
  border-top: 0;
}

.patient-descriptive-tag-category {
  padding-top: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.25;
  text-transform: uppercase;
}

.patient-descriptive-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.patient-descriptive-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  min-height: 34px;
  margin: 0;
  padding: 4px 10px 4px 5px;
  border: 1px solid rgba(91, 77, 84, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #6f5e67;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.patient-descriptive-tag:hover,
.patient-descriptive-tag:focus-visible {
  border-color: var(--patient-tag-color, var(--accent));
  background: color-mix(in srgb, var(--patient-tag-color, var(--accent)) 7%, #fff);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgba(83, 21, 49, 0.08);
}

.patient-descriptive-tag.is-assigned {
  border-color: color-mix(in srgb, var(--patient-tag-color, var(--accent)) 50%, #fff);
  background: color-mix(in srgb, var(--patient-tag-color, var(--accent)) 12%, #fff);
  color: color-mix(in srgb, var(--patient-tag-color, var(--accent)) 72%, #31101f);
}

.patient-descriptive-tag-display,
.patient-descriptive-tag-display:hover,
.patient-descriptive-tag-display:focus-visible {
  border-color: color-mix(in srgb, var(--patient-tag-color, var(--accent)) 50%, #fff);
  background: color-mix(in srgb, var(--patient-tag-color, var(--accent)) 12%, #fff);
  color: color-mix(in srgb, var(--patient-tag-color, var(--accent)) 72%, #31101f);
  cursor: default;
  transform: none;
  box-shadow: none;
}

.patient-descriptive-tag.is-do-not-contact,
.patient-descriptive-tag.is-do-not-contact:hover,
.patient-descriptive-tag.is-do-not-contact:focus-visible {
  border-color: #ff1f1f;
  background: #ff1f1f;
  color: #ffffff;
}

.patient-descriptive-tag:disabled {
  cursor: wait;
  opacity: 0.58;
  transform: none;
}

.patient-descriptive-tag-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 999px;
  background: rgba(91, 77, 84, 0.08);
  color: #7d6480;
}

.patient-descriptive-tag.is-assigned .patient-descriptive-tag-icon {
  background: var(--patient-tag-color, var(--accent));
  color: #fff;
}

.patient-descriptive-tag-icon svg {
  display: block;
  width: 13px;
  height: 13px;
}

.patient-descriptive-tags-empty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 11px 7px 6px;
  border: 1px dashed rgba(91, 77, 84, 0.18);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.patient-tag-picker-overlay {
  z-index: 50;
}

.patient-family-modal.patient-tag-picker-modal {
  width: min(560px, calc(calc(100 * var(--vw)) - 48px));
  max-height: min(calc(88 * var(--vh)), 760px);
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  overflow: hidden;
}

.patient-tag-picker-head h3,
.patient-tag-picker-head p {
  margin: 0;
}

.patient-tag-picker-head > div {
  display: grid;
  gap: 5px;
}

.patient-tag-picker-field {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(91, 77, 84, 0.16);
  border-radius: 16px;
  background: #fff;
}

.patient-tag-picker-field:focus-within {
  border-color: color-mix(in srgb, var(--accent) 55%, #fff);
  box-shadow: 0 0 0 3px rgba(239, 22, 101, 0.1);
}

.patient-tag-picker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 132px;
  overflow-y: auto;
}

.patient-tag-picker-chips-empty {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.patient-tag-picker-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  padding: 3px 8px 3px 3px;
  border: 1px solid color-mix(in srgb, var(--patient-tag-color, var(--accent)) 45%, #fff);
  border-radius: 999px;
  background: color-mix(in srgb, var(--patient-tag-color, var(--accent)) 10%, #fff);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.patient-tag-picker-chip > span:not(.patient-descriptive-tag-icon) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-tag-picker-chip .patient-descriptive-tag-icon {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
  background: var(--patient-tag-color, var(--accent));
  color: #fff;
}

.patient-tag-picker-chip button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1;
  box-shadow: none;
}

.patient-tag-picker-chip button:hover,
.patient-tag-picker-chip button:focus-visible {
  background: rgba(91, 77, 84, 0.12);
  color: var(--ink);
}

.patient-tag-picker-chip.is-do-not-contact {
  border-color: #d90000;
  background: #e60000;
  color: #fff;
}

.patient-tag-picker-chip.is-do-not-contact .patient-descriptive-tag-icon,
.patient-descriptive-tag.is-do-not-contact .patient-descriptive-tag-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.patient-tag-picker-chip.is-do-not-contact button {
  color: #fff;
}

.patient-tag-picker-search {
  width: 100%;
  margin: 0;
  padding: 6px 4px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  box-shadow: none;
}

.patient-tag-picker-results {
  display: grid;
  align-content: start;
  gap: 2px;
  height: min(380px, calc(46 * var(--vh)));
  overflow-y: auto;
  padding: 4px;
  border: 1px solid rgba(91, 77, 84, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
}

.patient-tag-picker-row {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.patient-tag-picker-row:hover,
.patient-tag-picker-row.is-active {
  background: rgba(239, 22, 101, 0.07);
}

.patient-tag-picker-row-group {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patient-tag-picker-create {
  grid-template-columns: auto minmax(0, auto);
  justify-content: start;
}

.patient-tag-picker-create-label {
  color: var(--accent-deep);
  font-size: 0.84rem;
  font-weight: 800;
}

.patient-tag-picker-chip.is-preview {
  border-style: dashed;
}

.patient-tag-picker-more {
  margin: 4px 8px 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.patient-tag-picker-error {
  margin: 0;
  color: #b42318;
  font-size: 0.8rem;
  font-weight: 700;
}

.patient-tag-picker-error:empty {
  display: none;
}

.patient-tag-picker-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(91, 77, 84, 0.16);
  border-radius: 999px;
  color: transparent;
  font-size: 0.76rem;
}

.patient-tag-picker-row.is-selected .patient-tag-picker-check {
  border-color: var(--patient-tag-color, var(--accent));
  background: var(--patient-tag-color, var(--accent));
  color: #fff;
}

.patient-tag-picker-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.patient-tag-picker-actions > span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.patient-tag-picker-actions > div {
  display: flex;
  gap: 9px;
}

.patient-tag-picker-actions button {
  width: auto;
  min-width: 104px;
  margin: 0;
}

.patient-tag-picker-empty {
  padding: 36px 20px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .patient-descriptive-tag-group {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .patient-descriptive-tag-category {
    padding-top: 0;
  }

  .patient-card-grid > .patient-panel,
  .patient-card-grid > .patient-panel:nth-child(odd),
  .patient-card-grid > .patient-panel:nth-child(even) {
    padding-inline: 0;
    border-right: 0;
  }

}

@media (max-width: 560px) {
  .patient-tag-picker-modal {
    width: calc(calc(100 * var(--vw)) - 24px);
    padding: 20px;
  }

  .patient-tag-picker-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .patient-tag-picker-actions > div,
  .patient-tag-picker-actions button {
    width: 100%;
  }
}

.patient-stage-step {
  position: relative;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  z-index: 1;
}

.patient-stage-dot {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #ffffff;
  border: 6px solid rgba(239, 22, 101, 0.18);
  box-sizing: border-box;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.96);
}

.patient-stage-step strong {
  color: #8d91a5;
  line-height: 1.2;
  font-size: 0.94rem;
}

.patient-stage-step:hover strong {
  color: var(--accent-deep);
}

.patient-stage-step:focus-visible {
  outline: 2px solid rgba(239, 22, 101, 0.34);
  outline-offset: 8px;
  border-radius: 18px;
}

.patient-stage-step.complete .patient-stage-dot {
  background: #ef1665;
  border-color: #ef1665;
  box-shadow: 0 0 0 6px rgba(239, 22, 101, 0.12), 0 0 0 12px rgba(255, 255, 255, 0.96);
}

.patient-stage-step.active .patient-stage-dot {
  background: #ef1665;
  border-color: #ef1665;
  box-shadow: 0 0 0 6px rgba(239, 22, 101, 0.18), 0 0 0 12px rgba(255, 255, 255, 0.96);
}

.patient-stage-step.active strong {
  color: var(--accent-deep);
}

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

.patient-panel {
  box-shadow: none;
}

.patient-card-grid > .patient-panel {
  padding: 24px 18px;
  border: 0;
  border-top: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 0;
  background: transparent;
}

.patient-card-grid > .patient-panel:nth-child(odd) {
  padding-left: 0;
  border-right: 1px solid rgba(17, 17, 17, 0.1);
}

.patient-card-grid > .patient-panel:nth-child(even) {
  padding-right: 0;
}

.patient-card-sections {
  display: grid;
  grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
  min-height: 520px;
  border-top: 1px solid rgba(17, 17, 17, 0.1);
}

.patient-card-section-nav {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  padding: 24px 18px 24px 0;
  border-right: 1px solid rgba(17, 17, 17, 0.1);
}

.patient-card-section-button {
  width: 100%;
  min-height: 0;
  padding: 15px 16px;
  border: 0;
  border-bottom: 1px solid rgba(239, 22, 101, 0.12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  transform: none;
  transition: color 160ms ease, background-color 160ms ease, padding-left 160ms ease;
}

.patient-card-section-button:hover {
  padding-left: 20px;
  background: rgba(239, 22, 101, 0.045);
  color: var(--accent-deep);
  box-shadow: none;
  transform: none;
}

.patient-card-section-button.is-active {
  padding-left: 20px;
  background: linear-gradient(90deg, rgba(239, 22, 101, 0.09), rgba(239, 22, 101, 0.015));
  box-shadow: inset 4px 0 0 var(--accent);
  color: var(--accent-deep);
}

.patient-card-section-button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid rgba(239, 22, 101, 0.34);
  outline-offset: -2px;
}

.patient-card-section-content {
  min-width: 0;
  padding: 24px 0 24px 28px;
}

.patient-card-section-panel {
  display: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.patient-card-section-panel.is-active {
  display: block;
}

.patient-card-section-panel[hidden] {
  display: none;
}

.patient-card-section-panel > h3:first-child {
  margin-top: 0;
}

.patient-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.patient-panel-head h3 {
  margin: 0;
}

.patient-inline-action {
  margin-left: auto;
}

.patient-inline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.patient-inline-actions .patient-inline-action {
  margin-left: 0;
}

.patient-inline-action-icon-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.patient-inline-action-icon {
  width: 20px;
  height: 20px;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: brightness(0) saturate(100%) invert(18%) sepia(58%) saturate(2951%) hue-rotate(319deg) brightness(92%) contrast(93%);
}

.patient-inline-action-icon-call {
  background-image: var(--nav-icon-calls);
}

.patient-inline-action-icon-message {
  background-image: var(--nav-icon-communications);
}

.call-panel-stack {
  position: fixed;
  right: 24px;
  top: 24px;
  z-index: 2147483000;
  width: min(400px, calc(calc(100 * var(--vw)) - 32px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.call-panel-stack[data-visible="false"] {
  display: none;
}

.call-panel {
  position: relative;
  width: 100%;
  width: min(400px, calc(calc(100 * var(--vw)) - 32px));
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.32)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 233, 242, 0.16) 60%, rgba(255, 241, 214, 0.18));
  box-shadow: 0 20px 40px rgba(122, 133, 153, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(22px) saturate(1.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
  opacity: 0;
  transform: translate3d(calc(100% + 32px), 0, 0) scale(0.98);
  pointer-events: none;
  transition:
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease,
    box-shadow 220ms ease;
  will-change: transform, opacity;
}

.call-panel[data-mode="outgoing"],
.call-panel[data-mode="active"] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.34)),
    linear-gradient(135deg, rgba(255, 247, 250, 0.44), rgba(255, 233, 242, 0.18) 60%, rgba(255, 241, 214, 0.2));
}

.call-panel[data-mode="incoming"] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.32)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.44), rgba(232, 243, 255, 0.18) 60%, rgba(255, 241, 214, 0.16));
}

.call-panel[data-mode="message"] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.34)),
    linear-gradient(135deg, rgba(255, 246, 250, 0.46), rgba(255, 228, 240, 0.2) 58%, rgba(255, 241, 214, 0.18));
}

.call-panel-message-card {
  padding: 12px 14px;
}

.call-panel[data-visible="true"] {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

.call-panel[data-entering="true"] {
  animation: call-panel-slide-in 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes call-panel-slide-in {
  0% {
    opacity: 0;
    transform: translate3d(calc(100% + 32px), 0, 0) scale(0.98);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.call-nav-shell {
  position: fixed;
  inset: 0;
  z-index: 2050;
  background: transparent;
}

.call-nav-shell[hidden] {
  display: none;
}

.call-nav-shell-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.call-panel-hero {
  display: flex;
  align-items: center;
  gap: 12px;
}

.call-panel-message-card .call-panel-hero {
  align-items: flex-start;
  gap: 10px;
}

.call-panel-dismiss {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.22);
  color: rgba(44, 36, 48, 0.92);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}

.call-panel-dismiss:hover {
  background: rgba(255, 255, 255, 0.36);
  transform: scale(1.03);
}

.call-panel-dismiss.hidden {
  display: none;
}

.call-panel-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  background: linear-gradient(180deg, rgba(120, 129, 146, 0.96), rgba(77, 84, 100, 0.96));
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.call-panel-avatar-message {
  background: linear-gradient(180deg, #ff6aa7, #d71469);
}

.call-panel-message-card .call-panel-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  font-size: 1.2rem;
}

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

.call-panel-eyebrow {
  margin: 0 0 4px;
  color: rgba(111, 28, 74, 0.78);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.call-panel-routing {
  margin: 0 0 6px;
  color: rgba(111, 28, 74, 0.78);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.05;
}

.call-panel-routing.is-unassigned {
  color: rgba(194, 35, 59, 0.94);
}

.call-panel-message-card .call-panel-eyebrow {
  margin-bottom: 3px;
}

.call-panel-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(24, 21, 28, 0.94);
  line-height: 1.05;
}

.call-panel-message-card .call-panel-title {
  font-size: 1.05rem;
  line-height: 1.08;
  padding-right: 36px;
}

.call-panel-subtitle {
  margin: 2px 0 0;
  color: rgba(72, 63, 78, 0.88);
  font-size: 0.9rem;
  line-height: 1.15;
}

.call-panel-triage-participants {
  color: rgba(92, 81, 97, 0.74);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.call-panel-status {
  margin: 6px 0 0;
  color: rgba(92, 81, 97, 0.86);
  font-weight: 700;
  font-size: 0.84rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.call-panel-message-card .call-panel-status {
  margin-top: 4px;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.call-panel-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 186, 186, 0.5);
  color: rgba(127, 28, 59, 0.9);
  font-size: 0.92rem;
}

.call-panel-actions-context {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.call-panel-context-card {
  display: grid;
  gap: 6px;
}

.call-panel-context-copy {
  margin: 0;
  color: rgba(92, 81, 97, 0.9);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
}

.call-panel-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  position: relative;
}

.call-panel-actions-message {
  margin-top: 10px;
  gap: 4px;
}

.call-panel-actions-utility,
.call-panel-actions-held,
.call-panel-actions-primary {
  display: flex;
  align-items: center;
}

.call-panel-actions-held {
  width: 100%;
}

.call-panel-actions-primary {
  width: 100%;
  min-width: 0;
  gap: 8px;
  flex-wrap: wrap;
}

.call-panel-actions-message .call-panel-actions-primary {
  gap: 0;
}

.call-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 40px;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.22);
  color: rgba(44, 36, 48, 0.92);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease, background-color 140ms ease;
}

.call-action-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(122, 133, 153, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.72);
  filter: saturate(1.06);
}

.call-action-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.call-action-button.hidden {
  display: none;
}

.call-action-button-accept,
.call-action-button-decline {
  flex: 1 1 0;
  min-width: 0;
  min-height: 52px;
  padding: 10px 14px;
}

.call-action-button-close,
.call-action-button-decline[data-call-hangup] {
  flex: 0 0 auto;
}

.call-action-button-resume,
.call-action-button-triage {
  font-size: 0.82rem;
}

.call-action-button-decline[data-call-hangup],
.call-action-button-triage-live {
  flex: 1 1 calc(50% - 4px);
  min-width: 0;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 12px;
}

.call-action-button-accept {
  border-color: rgba(74, 209, 88, 0.3);
  background: linear-gradient(180deg, #35d44b, #30c945);
  color: #ffffff;
}

.call-action-button-decline {
  border-color: rgba(255, 91, 86, 0.3);
  background: linear-gradient(180deg, #ff5b56, #f54741);
  color: #ffffff;
}

.call-action-button-close {
  min-width: 74px;
  min-height: 40px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
}

.call-action-button-triage {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border-color: rgba(150, 16, 81, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(150, 16, 81, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.call-action-button-triage-live {
  min-height: 52px;
  padding: 10px 14px;
  border-color: rgba(255, 179, 71, 0.34);
  background: linear-gradient(180deg, #ffb347, #ff9d2f);
  color: #2c2430;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(255, 179, 71, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

.call-action-button-resume {
  width: 100%;
  min-height: 46px;
  justify-content: center;
  background: linear-gradient(180deg, #ffb347, #ff9d2f);
  border-color: rgba(255, 179, 71, 0.3);
  color: #251300;
}

.call-action-button-message {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(215, 20, 105, 0.16);
  color: rgba(150, 16, 81, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  justify-content: center;
  font-size: 0.86rem;
}

.call-action-button-context {
  width: fit-content;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.call-action-button-create {
  border-color: rgba(239, 22, 101, 0.12);
  background: linear-gradient(135deg, rgba(255, 239, 244, 0.96), rgba(255, 219, 123, 0.92));
  color: var(--accent-deep);
  box-shadow: 0 12px 26px rgba(116, 16, 59, 0.1);
}

.call-action-button-create:hover,
.call-action-button-create:focus-visible {
  background: linear-gradient(135deg, rgba(255, 233, 240, 0.98), rgba(255, 210, 105, 0.94));
  color: var(--accent-deep);
}

.call-action-button-assign-self {
  border-color: rgba(25, 135, 84, 0.18);
  background: linear-gradient(135deg, rgba(227, 247, 236, 0.98), rgba(207, 241, 221, 0.96));
  color: #146c43;
  box-shadow: 0 12px 24px rgba(25, 135, 84, 0.12);
}

.call-action-button-assign-self:hover,
.call-action-button-assign-self:focus-visible {
  background: linear-gradient(135deg, rgba(214, 244, 225, 0.98), rgba(190, 235, 208, 0.96));
  color: #0f5132;
}

.call-panel-message-meta {
  margin: 0;
  color: rgba(92, 81, 97, 0.84);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.call-panel-triage {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.38);
}

.call-panel-triage-copy {
  margin: 0;
  color: rgba(92, 81, 97, 0.9);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
}

.call-panel-triage-steps {
  display: grid;
  gap: 8px;
}

.call-panel-triage-step {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.call-panel-triage-step.is-current {
  border-color: rgba(215, 20, 105, 0.2);
}

.call-panel-triage-step.is-complete {
  border-color: rgba(25, 135, 84, 0.18);
  background: rgba(227, 247, 236, 0.72);
}

.call-panel-triage-step strong {
  color: rgba(44, 36, 48, 0.96);
  font-size: 0.8rem;
  font-weight: 700;
}

.call-panel-triage-step span {
  color: rgba(92, 81, 97, 0.84);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.25;
}

.call-panel-triage-search {
  display: block;
}

.call-panel-triage-search-input {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(215, 20, 105, 0.14);
  background: rgba(255, 255, 255, 0.78);
  color: rgba(44, 36, 48, 0.96);
  font: inherit;
}

.call-panel-triage-list {
  display: grid;
  gap: 6px;
  max-height: 182px;
  overflow-y: auto;
}

.call-panel-triage-option {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(215, 20, 105, 0.12);
  background: rgba(255, 255, 255, 0.76);
  color: rgba(44, 36, 48, 0.96);
  text-align: left;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.call-panel-triage-option.is-selected {
  border-color: rgba(215, 20, 105, 0.24);
  background: rgba(255, 240, 246, 0.88);
}

.call-panel-triage-option:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(122, 133, 153, 0.12);
}

.call-panel-triage-option strong {
  font-size: 0.86rem;
  font-weight: 700;
}

.call-panel-triage-option span,
.call-panel-triage-empty {
  color: rgba(92, 81, 97, 0.84);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.25;
}

.call-panel-triage-footer {
  display: grid;
  gap: 8px;
}

.call-panel-triage-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.call-action-button-triage-secondary,
.call-action-button-triage-complete {
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 12px;
  justify-content: center;
}

.call-action-button-triage-secondary {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(150, 16, 81, 0.12);
  color: rgba(150, 16, 81, 0.96);
}

.call-action-button-triage-complete {
  background: linear-gradient(180deg, #ffb347, #ff9d2f);
  border-color: rgba(255, 179, 71, 0.3);
  color: #251300;
}

.call-debug-overlay {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1600;
  width: min(420px, calc(calc(100 * var(--vw)) - 32px));
  max-height: min(calc(48 * var(--vh)), 520px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 22px;
  border: 1px solid rgba(215, 20, 105, 0.16);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 60px rgba(44, 24, 36, 0.18);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.call-debug-overlay.hidden {
  display: none;
}

.call-debug-overlay__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(215, 20, 105, 0.1);
  background: linear-gradient(135deg, rgba(255, 241, 246, 0.96), rgba(255, 237, 197, 0.92));
  color: rgba(92, 17, 54, 0.94);
  font-size: 0.86rem;
  font-weight: 800;
}

.call-debug-overlay__body {
  overflow: auto;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.call-debug-overlay__entry {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(215, 20, 105, 0.08);
  background: rgba(255, 255, 255, 0.84);
}

.call-debug-overlay__event {
  color: rgba(44, 36, 48, 0.96);
  font-size: 0.82rem;
  font-weight: 800;
}

.call-debug-overlay__time {
  color: rgba(108, 96, 113, 0.9);
  font-size: 0.72rem;
  font-weight: 700;
}

.call-debug-overlay__entry pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(72, 61, 79, 0.96);
  font-size: 0.7rem;
  line-height: 1.35;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.call-debug-overlay__empty {
  color: rgba(108, 96, 113, 0.9);
  font-size: 0.76rem;
  font-weight: 700;
}

.call-action-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background-image: url("assets/nav-calls-phone.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: brightness(0) saturate(100%) invert(100%);
}

.call-action-button-accept .call-action-icon {
  filter: brightness(0) saturate(100%) invert(100%);
}

.call-action-icon-hangup {
  transform: rotate(135deg);
}

.patient-detail-list {
  display: grid;
  gap: 14px;
}

.patient-detail-list div {
  display: grid;
  gap: 4px;
}

.patient-detail-list span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.patient-ahe-panel {
  display: grid;
  gap: 16px;
}

.patient-ahe-summary {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 244, 247, 0.96), rgba(255, 249, 242, 0.96));
  border: 1px solid rgba(239, 22, 101, 0.12);
}

.patient-ahe-summary small {
  color: var(--muted);
}

.patient-ahe-milestones,
.patient-ahe-checklist {
  display: grid;
  gap: 10px;
}

.patient-ahe-milestone,
.patient-ahe-check-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(17, 17, 17, 0.08);
}

.patient-ahe-milestone small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.patient-ahe-check-item {
  align-items: flex-start;
}

.patient-ahe-check-item span {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.patient-ahe-check-item.is-complete span {
  color: #1f7e4f;
}

.patient-edit-list label,
.patient-notes-editor {
  display: grid;
  gap: 10px;
}

.patient-contact-panel {
  display: flex;
  flex-direction: column;
}

.patient-contact-panel .patient-edit-list {
  flex: 1 1 auto;
}

.patient-schedule-panel {
  display: flex;
  flex-direction: column;
}

.patient-schedule-list {
  flex: 1 1 auto;
}

.patient-card-task-list {
  display: grid;
  align-content: start;
  flex: 1 1 auto;
  min-width: 0;
}

.patient-card-task-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 18px 0;
}

.patient-card-task-item:first-child {
  padding-top: 8px;
}

.patient-card-task-item + .patient-card-task-item {
  border-top: 1px solid rgba(228, 206, 217, 0.46);
}

.patient-card-task-content {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.patient-card-task-content strong,
.patient-card-task-content small {
  display: block;
}

.patient-card-task-content small,
.patient-card-task-date {
  color: var(--muted);
}

.patient-card-task-date {
  font-size: 0.86rem;
}

.patient-card-task-content:hover strong,
.patient-card-task-content:focus-visible strong {
  color: var(--accent-deep);
}

.sidebar-task-tag-list.patient-card-task-tags .sidebar-task-patient-tag,
.sidebar-task-tag-list.patient-card-task-tags .sidebar-task-teammate-tag {
  cursor: default;
}

.patient-card-task-empty {
  padding: 18px 0;
  color: var(--muted);
}

.patient-schedule-link {
  display: grid;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}

.patient-schedule-link-appointment {
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(239, 22, 101, 0.12);
  border-left: 8px solid var(--accent);
  background: rgba(239, 22, 101, 0.14);
  box-shadow: none;
}

.patient-schedule-link strong,
.patient-schedule-link small {
  display: block;
}

.patient-schedule-link-appointment strong {
  margin-bottom: 4px;
  color: #111111;
}

.patient-schedule-link-appointment small {
  color: rgba(70, 43, 56, 0.86);
}

.patient-schedule-link-detail {
  margin-top: 2px;
}

.patient-schedule-link:hover strong,
.patient-schedule-link:focus-visible strong {
  color: var(--accent-deep);
}

.patient-schedule-actions {
  margin-top: auto;
}

.patient-edit-list input,
.patient-edit-list textarea,
.patient-notes-editor textarea {
  width: 100%;
  border: 1px solid rgba(44, 35, 45, 0.12);
  border-radius: 18px;
  padding: 14px 16px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 250, 246, 0.92);
}

.patient-edit-list textarea,
.patient-notes-editor textarea {
  resize: vertical;
  min-height: 110px;
}

.patient-card-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.patient-card-actions .module-action-button {
  width: auto;
  min-width: 0;
  padding-inline: 16px;
}

.patient-panel-head-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-top: 0;
}

.patient-panel-head-actions.patient-schedule-actions {
  display: flex;
}

.patient-panel-head .patient-panel-head-actions .module-action-button {
  width: auto;
  padding: 10px 18px;
}

.patient-panel-head .patient-inline-actions .patient-card-section-action {
  width: auto;
  padding: 10px 18px;
}

.patient-notes-actions .module-action-button,
.patient-family-membership-actions .module-action-button,
.patient-contact-actions .module-action-button,
.patient-schedule-actions .module-action-button {
  width: 100%;
}

.patient-schedule-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.patient-task-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.patient-notes-actions {
  align-self: start;
  align-items: flex-start;
}

.patient-notes-actions .module-action-button {
  align-self: flex-start;
}

.patient-editor-feedback-empty {
  display: none;
}

.patient-notes {
  grid-column: auto;
  width: calc(100% + 28px);
  margin-left: -28px;
}

.patient-notes-editor {
  height: auto;
}

.patient-notes-editor textarea {
  min-height: 220px;
}

.patient-notes-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  min-height: 390px;
}

.patient-note-history {
  padding-right: 0;
  border-right: 1px solid rgba(17, 17, 17, 0.1);
}

.patient-note-list-item {
  display: grid;
  width: 100%;
  min-height: 0;
  gap: 5px;
  padding: 15px 14px;
  border: 0;
  border-bottom: 1px solid rgba(239, 22, 101, 0.12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  transform: none;
  transition: color 160ms ease, background-color 160ms ease, padding-left 160ms ease;
}

.patient-note-list-item:hover,
.patient-note-list-item.is-active {
  padding-left: 18px;
  background: rgba(239, 22, 101, 0.055);
  box-shadow: inset 4px 0 0 var(--accent);
  color: var(--accent-deep);
  transform: none;
}

.patient-note-list-item strong,
.patient-note-list-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.patient-note-list-item strong {
  white-space: nowrap;
}

.patient-note-list-item small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
  white-space: nowrap;
}

.patient-note-add-item {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
}

.patient-note-add-item > span:last-child {
  display: grid;
  gap: 3px;
}

.patient-note-add-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}

.patient-note-list-status {
  margin: 18px 14px;
  color: var(--muted);
  font-size: 0.86rem;
}

.patient-note-detail {
  min-width: 0;
  padding-left: 28px;
}

.patient-note-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.patient-note-detail-head h3,
.patient-note-detail-head .eyebrow {
  margin-top: 0;
}

.patient-note-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.patient-note-archive-button {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 10px 18px;
}

.patient-note-detail-meta {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 0.86rem;
}

.patient-note-body {
  color: var(--ink);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

#unifiedEntityTagPicker .unified-entity-tag-modal {
  width: min(1040px, calc(calc(100 * var(--vw)) - 32px));
}

#unifiedEntityTagPicker {
  z-index: 1700;
}

.unified-entity-tag-toolbar {
  margin-bottom: 14px;
}

.unified-entity-tag-toolbar > input[type="search"] {
  width: 100%;
}

.unified-entity-tag-browser {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  width: calc(100% + 48px);
  min-height: 360px;
  margin-inline: -24px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.unified-entity-tag-browser.has-team-hierarchy {
  grid-template-columns: 210px 230px minmax(0, 1fr);
}

.unified-entity-tag-targets,
.unified-entity-tag-groups {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px 0;
  border-right: 1px solid var(--line);
  background: rgba(255, 249, 251, 0.72);
}

.unified-entity-tag-targets button,
.unified-entity-tag-list-row {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 68px;
  margin: 0;
  padding: 14px 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  text-align: left;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.unified-entity-tag-targets button:hover,
.unified-entity-tag-list-row:hover {
  background: rgba(239, 22, 101, 0.035);
}

.unified-entity-tag-targets button.is-active,
.unified-entity-tag-list-row.is-active {
  background: linear-gradient(90deg, rgba(239, 22, 101, 0.08), rgba(239, 22, 101, 0.025));
  color: var(--accent-deep);
}

.unified-entity-tag-targets button.is-active::before,
.unified-entity-tag-list-row.is-active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
}

.unified-entity-tag-list-row > span {
  display: grid;
  gap: 4px;
}

.unified-entity-tag-list-row small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.unified-entity-tag-selected {
  flex-wrap: wrap;
  align-content: flex-start;
  min-height: 42px;
  max-height: 112px;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 4px 4px 0;
}

.unified-entity-tag-selection-summary {
  flex: 1 1 360px;
  min-width: 0;
}

#unifiedEntityTagPicker .team-group-modal-actions {
  align-items: flex-end;
}

#unifiedEntityTagPicker .team-group-modal-action-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: 0 0 auto;
  width: min(440px, 48%);
}

.unified-entity-tag-results {
  max-height: min(420px, calc(45 * var(--vh)));
  overflow-y: auto;
  padding: 16px;
}

@media (max-width: 720px) {
  .unified-entity-tag-browser,
  .unified-entity-tag-browser.has-team-hierarchy {
    grid-template-columns: 1fr;
    max-height: calc(55 * var(--vh));
    overflow-y: auto;
  }

  .unified-entity-tag-targets,
  .unified-entity-tag-groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .unified-entity-tag-groups {
    grid-template-columns: 1fr;
  }

  .unified-entity-tag-targets button,
  .unified-entity-tag-list-row {
    justify-content: center;
    min-height: 52px;
    padding: 10px;
    text-align: center;
  }
}

.hero {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
}

.hero-copy {
  max-width: 620px;
  margin: 10px 0 0;
}

.hero-stat {
  min-width: 190px;
  text-align: right;
}

.hero-stat span,
.metric-card span {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
}

.hero-stat strong,
.metric-card strong {
  display: block;
  font-size: 2.4rem;
  margin-top: 6px;
}

.grid {
  display: grid;
  gap: 10px;
}

.goal-overview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.sales-core-goal-grid {
  grid-template-columns: minmax(0, 1fr);
}

.sales-core-goal-grid .goal-widget {
  width: 100%;
}

.reports-section-heading {
  margin-top: 24px;
  padding: 0 2px;
}

.reports-section-heading h2 {
  margin: 2px 0 0;
}

.reports-relocated-sales-grid {
  align-items: start;
}

.reports-relocated-widget-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.reports-sales-workspace-reset {
  min-height: 1px;
}

.reports-sales-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.reports-active-payers-kpi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  padding: 18px 20px;
  border-radius: 24px;
  background: #fff;
}

.reports-sales-summary-kpi {
  position: relative;
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 142px;
  padding: 20px 22px;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
}

.reports-sales-summary-kpi::after {
  content: none;
}

.reports-sales-summary-kpi-pace {
  background: #fff;
}

.reports-sales-summary-kpi-pace::after {
  content: none;
}

.reports-sales-summary-kpi-cme {
  background: #fff;
}

.reports-sales-summary-kpi-cme::after {
  content: none;
}

.reports-sales-summary-kpi h3 {
  position: relative;
  z-index: 1;
  margin: 5px 0 4px;
  font-size: 1rem;
}

.reports-sales-summary-kpi small {
  position: relative;
  z-index: 1;
  color: var(--muted);
  line-height: 1.3;
}

.reports-sales-summary-value {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  color: #171216;
  font-size: clamp(2rem, calc(3 * var(--vw)), 3rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.reports-sales-summary-value.is-positive {
  color: #148356;
}

.reports-sales-summary-value.is-negative {
  color: #b72a37;
}

.reports-sales-summary-value.is-neutral {
  color: var(--muted);
}

.reports-active-payers-copy {
  min-width: 0;
}

.reports-active-payers-copy h3 {
  margin: 4px 0 4px;
}

.reports-active-payers-copy small {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

.reports-active-payers-gauge {
  --active-payer-percent: 0;
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 106px;
  width: 106px;
  height: 106px;
  border-radius: 50%;
  background: conic-gradient(
    #ef1665 calc(var(--active-payer-percent) * 1%),
    rgba(239, 22, 101, 0.1) 0
  );
  text-align: center;
}

.reports-active-payers-gauge::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: inherit;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(239, 22, 101, 0.08);
}

.reports-active-payers-gauge strong,
.reports-active-payers-gauge span {
  position: relative;
  z-index: 1;
}

.reports-active-payers-gauge strong {
  align-self: end;
  font-size: 1.55rem;
  line-height: 1;
}

.reports-active-payers-gauge span {
  align-self: start;
  max-width: 78px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.15;
}

.reports-active-payers-gauge.is-loading {
  background: conic-gradient(rgba(239, 22, 101, 0.2) 18%, rgba(239, 22, 101, 0.07) 0);
  animation: reports-active-payers-pulse 1.4s ease-in-out infinite;
}

.reports-active-payers-gauge.is-error {
  background: rgba(183, 42, 55, 0.1);
}

.reports-membership-workspace {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.reports-membership-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.reports-membership-kpi-card {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 142px;
  padding: 20px 22px;
  border-radius: 24px;
  background: #fff;
}

.reports-membership-kpi-card h3 {
  margin: 5px 0 4px;
  font-size: 1rem;
}

.reports-membership-kpi-card small {
  color: var(--muted);
  line-height: 1.3;
}

.reports-membership-kpi-value {
  margin-top: 10px;
  color: #171216;
  font-size: clamp(2rem, calc(3 * var(--vw)), 3rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.reports-membership-chargeback-card {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 360px;
  padding: 20px;
  overflow: hidden;
  border-radius: 26px;
}

.reports-membership-chargeback-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.reports-membership-chargeback-head h3 {
  margin: 4px 0 2px;
}

.reports-membership-chargeback-head small,
.reports-membership-chargeback-count,
.reports-membership-chargeback-axis {
  color: var(--muted);
}

.reports-membership-chargeback-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 10px;
}

.reports-membership-report-row {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  min-height: 0;
}

.reports-membership-chargeback-chart {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 260px;
  margin-top: 12px;
}

.reports-membership-chargeback-scroll {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.reports-membership-chargeback-svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
}

.reports-membership-chargeback-guide {
  stroke: rgba(91, 77, 84, 0.16);
  stroke-width: 1;
}

.reports-membership-chargeback-axis,
.reports-membership-chargeback-label,
.reports-membership-chargeback-count,
.reports-membership-chargeback-value {
  fill: #71636b;
  font-family: inherit;
  font-size: 11px;
}

.reports-membership-chargeback-label,
.reports-membership-chargeback-value {
  fill: #171216;
  font-weight: 700;
}

.reports-membership-chargeback-salespeople {
  flex: 0 0 auto;
  margin-top: 8px;
}

.reports-membership-chargeback-empty {
  display: grid;
  flex: 1 1 auto;
  min-height: 220px;
  place-items: center;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.reports-membership-sold-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 360px;
  padding: 20px;
  overflow: hidden;
  border-radius: 26px;
}

.reports-membership-sold-tabs {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: -20px -20px 0;
  border-bottom: 1px solid rgba(242, 15, 98, 0.12);
}

.reports-membership-sold-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 56px;
  padding: 10px 16px;
  color: var(--text);
  font: inherit;
  font-weight: 850;
  text-align: left;
  background: transparent;
  border: 0;
  border-right: 1px solid rgba(242, 15, 98, 0.1);
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}

.reports-membership-sold-tab:last-child {
  border-right: 0;
}

.reports-membership-sold-tab::after {
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transition: opacity 150ms ease;
}

.reports-membership-sold-tab:hover,
.reports-membership-sold-tab:focus-visible {
  color: var(--accent-deep);
  background: rgba(242, 15, 98, 0.05);
  outline: none;
}

.reports-membership-sold-tab.is-active {
  color: var(--accent-deep);
  background: linear-gradient(180deg, rgba(242, 15, 98, 0.035), rgba(242, 15, 98, 0.11));
}

.reports-membership-sold-tab.is-active::after {
  opacity: 1;
}

.reports-membership-sold-tab small {
  flex: 0 0 auto;
  min-width: 28px;
  padding: 3px 7px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
  text-align: center;
  background: rgba(255, 255, 255, 0.76);
  border-radius: 999px;
}

.reports-membership-sold-tab.is-active small {
  color: var(--accent-deep);
  background: rgba(255, 255, 255, 0.9);
}

.reports-membership-sold-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  margin: 0 -20px -20px;
  background: #fff;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.reports-membership-sold-item {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 20px;
  color: #171216;
  text-align: left;
  background: #fff;
  border: 0;
  border-bottom: 1px solid rgba(242, 17, 102, 0.13);
  border-radius: 0;
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.reports-membership-sold-item:hover,
.reports-membership-sold-item:focus-visible {
  background: rgba(242, 17, 102, 0.035);
  box-shadow: inset 4px 0 0 rgba(242, 17, 102, 0.65);
  outline: none;
}

.reports-membership-sold-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.reports-membership-sold-tags {
  margin-top: 6px;
}

.reports-membership-sold-copy strong,
.reports-membership-sold-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-membership-sold-copy small {
  color: var(--muted);
}

.reports-membership-sold-row-end {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.reports-membership-sold-status {
  padding: 5px 9px;
  color: #197247;
  font-size: 0.72rem;
  font-weight: 850;
  background: #e5f6ec;
  border-radius: 999px;
}

.reports-membership-sold-status-inactive,
.reports-membership-sold-status-unpaid,
.reports-membership-sold-status-chargeback {
  color: #ad2334;
  background: #ffe7e9;
}

.reports-membership-sold-arrow {
  flex: 0 0 auto;
  color: var(--pink-dark);
  font-size: 1.25rem;
  font-weight: 800;
}

.reports-membership-sold-more {
  flex: 0 0 auto;
  align-self: center;
  margin: 6px 0 4px;
}

.reports-membership-sold-empty {
  display: grid;
  flex: 1 1 auto;
  min-height: 180px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

@keyframes reports-active-payers-pulse {
  50% {
    opacity: 0.62;
  }
}

.reports-sales-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  margin-top: 18px;
}

.reports-weekly-sales-widget {
  min-width: 0;
  padding: 20px;
  border-radius: 26px;
  overflow: hidden;
}

.reports-sales-trend-widget {
  min-width: 0;
  padding: 20px;
  border-radius: 26px;
  overflow: hidden;
}

.reports-sales-trend-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.reports-sales-trend-head h3 {
  margin: 4px 0 2px;
}

.reports-sales-trend-head small {
  color: var(--muted);
}

.reports-sales-trend-chart {
  min-height: 278px;
}

.reports-sales-trend-scroll {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.reports-sales-trend-svg {
  display: block;
  width: 100%;
  min-width: 560px;
  height: auto;
}

.reports-sales-trend-guide {
  stroke: rgba(91, 77, 84, 0.22);
  stroke-dasharray: 2 7;
  stroke-width: 1;
}

.reports-sales-trend-baseline {
  stroke: rgba(91, 77, 84, 0.16);
  stroke-width: 1;
}

.reports-sales-trend-line {
  fill: none;
  stroke: #ef1665;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.reports-sales-trend-point {
  fill: #ef1665;
  stroke: #fff;
  stroke-width: 2;
}

.reports-sales-trend-axis-label,
.reports-sales-trend-value {
  fill: #71636b;
  font-family: inherit;
  font-size: 10px;
}

.reports-sales-trend-value {
  font-weight: 800;
}

.reports-weekly-sales-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.reports-weekly-sales-head h3 {
  margin: 4px 0 2px;
}

.reports-weekly-sales-head small {
  color: var(--muted);
}

.reports-chart-action-menu {
  flex: 0 0 auto;
}

.reports-chart-range-menu {
  width: 148px;
}

.reports-chart-range-menu button.is-active {
  background: rgba(239, 22, 101, 0.09);
  color: var(--accent-deep);
}

.reports-chart-settings-menu {
  width: 178px;
}

.reports-chart-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reports-chart-settings-row > span:last-child {
  color: var(--accent-deep);
  font-size: 1rem;
}

.reports-chart-settings-count {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  place-items: center;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.11);
  color: var(--accent-deep);
  font-size: 0.72rem;
}

.reports-chart-settings-back {
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.07) !important;
  border-radius: 8px 8px 0 0 !important;
  color: var(--muted) !important;
  font-size: 0.78rem !important;
}

.reports-chart-settings-menu:has(.reports-chart-custom-range:not(.hidden)) {
  width: 286px;
}

.reports-chart-custom-range {
  display: grid;
  gap: 10px;
  padding: 4px;
}

.reports-chart-custom-range.hidden {
  display: none;
}

.reports-chart-custom-range label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.reports-chart-custom-range input[type="date"] {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(239, 22, 101, 0.18);
  border-radius: 12px;
  background: #fffdfb;
  color: var(--ink);
  font: inherit;
  color-scheme: light;
}

.reports-chart-custom-range input[type="date"]:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(239, 22, 101, 0.11);
}

.reports-chart-custom-error {
  margin: 0;
  color: #b42335;
  font-size: 0.72rem;
  line-height: 1.35;
}

.reports-chart-custom-apply {
  justify-content: center !important;
  margin-top: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep)) !important;
  color: #fff !important;
  font-weight: 800 !important;
}

.reports-chart-filter-chips {
  display: flex;
  gap: 8px;
  max-width: 100%;
  margin: -2px 0 12px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.reports-chart-filter-chips .team-group-member-chip {
  flex: 0 0 auto;
  min-height: 36px;
}

.reports-chart-filter-chips .tagged-teammate-chip-icon {
  font-size: 0.62rem;
}

.reports-weekly-sales-chart {
  min-height: 278px;
}

.reports-chart-shimmer {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border: 1px solid rgba(239, 22, 101, 0.1);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 250, 252, 0.92), rgba(255, 247, 236, 0.82));
}

.reports-chart-shimmer::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  transform: translateX(-115%);
  background: linear-gradient(
    105deg,
    transparent 24%,
    rgba(255, 255, 255, 0.28) 38%,
    rgba(255, 255, 255, 0.86) 50%,
    rgba(255, 255, 255, 0.28) 62%,
    transparent 76%
  );
  animation: reports-chart-shimmer-sweep 1.45s ease-in-out infinite;
}

.reports-chart-shimmer-plot {
  position: absolute;
  inset: 18px 18px 42px 36px;
  border-left: 1px solid rgba(108, 85, 97, 0.12);
  border-bottom: 1px solid rgba(108, 85, 97, 0.12);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(25% - 1px),
    rgba(108, 85, 97, 0.1) calc(25% - 1px),
    rgba(108, 85, 97, 0.1) 25%
  );
}

.reports-chart-shimmer-bars {
  position: absolute;
  inset: 12px 12px 0;
  display: flex;
  align-items: end;
  justify-content: space-around;
  gap: clamp(6px, calc(2 * var(--vw)), 18px);
}

.reports-chart-shimmer-bars i {
  width: min(8%, 34px);
  height: var(--reports-shimmer-bar-height);
  min-width: 9px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, rgba(239, 22, 101, 0.2), rgba(255, 145, 42, 0.13));
}

.reports-chart-shimmer-label {
  position: absolute;
  left: 18px;
  bottom: 13px;
  color: rgba(91, 77, 84, 0.72);
  font-size: 0.74rem;
  font-weight: 700;
}

@keyframes reports-chart-shimmer-sweep {
  to {
    transform: translateX(115%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reports-chart-shimmer::after {
    animation: none;
    transform: none;
    opacity: 0.42;
  }
}

.reports-weekly-sales-chart-scroll {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.reports-weekly-sales-svg {
  display: block;
  width: 100%;
  min-width: 610px;
  height: auto;
}

.reports-weekly-sales-axis-label {
  fill: #71636b;
  font-family: inherit;
  font-size: 10px;
}

.reports-weekly-sales-total {
  fill: #171216;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
}

.reports-weekly-sales-legend {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 2px 0;
  scrollbar-width: thin;
}

.reports-weekly-sales-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
}

.reports-weekly-sales-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.reports-weekly-sales-empty {
  display: grid;
  place-items: center;
  min-height: 250px;
  padding: 28px;
  border: 1px dashed rgba(185, 0, 77, 0.2);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

.reports-calls-workspace {
  --reports-call-trend-height: clamp(120px, calc((calc(100 * var(--dvh)) - 430px) / 2), 248px);
  --reports-call-duration-height: clamp(120px, calc((calc(100 * var(--dvh)) - 430px) / 2), 286px);
  min-width: 0;
  margin-top: 18px;
}

.reports-call-duration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.reports-call-duration-card {
  order: 2;
  min-width: 0;
  padding: 20px;
  border-radius: 26px;
  overflow: hidden;
}

.reports-call-kpi-grid {
  display: grid;
  order: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  align-self: stretch;
  gap: 12px;
  min-width: 0;
  min-height: calc(var(--reports-call-trend-height) + 94px);
}

.reports-call-kpi-card {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 0;
  padding: clamp(13px, calc(1.7 * var(--vh)), 20px);
  overflow: hidden;
  border-radius: 26px;
  background: #fff;
}

.reports-call-kpi-card .eyebrow {
  margin: 0;
  font-size: clamp(0.64rem, calc(0.72 * var(--vw)), 0.76rem);
}

.reports-call-kpi-card h3 {
  margin: 5px 0 3px;
  font-size: clamp(0.88rem, calc(1 * var(--vw)), 1rem);
}

.reports-call-kpi-card small {
  color: var(--muted);
  font-size: clamp(0.69rem, calc(0.75 * var(--vw)), 0.78rem);
  line-height: 1.25;
}

.reports-call-kpi-value {
  margin-top: clamp(7px, calc(1 * var(--vh)), 12px);
  color: #171216;
  font-size: clamp(1.75rem, calc(2.6 * var(--vw)), 2.65rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.reports-call-kpi-value.is-positive {
  color: #148356;
}

.reports-call-kpi-value.is-negative {
  color: #b72a37;
}

.reports-call-kpi-value.is-neutral {
  color: var(--muted);
}

.reports-calls-per-sale-widget {
  order: 1;
}

.reports-calls-workspace .reports-sales-trend-chart {
  height: var(--reports-call-trend-height);
  min-height: var(--reports-call-trend-height);
}

.reports-calls-workspace .reports-call-duration-chart {
  height: var(--reports-call-duration-height);
  min-height: var(--reports-call-duration-height);
}

.reports-calls-workspace .reports-chart-shimmer {
  height: 100%;
  min-height: 100%;
}

.reports-calls-workspace .reports-sales-trend-scroll,
.reports-calls-workspace .reports-call-duration-scroll {
  height: 100%;
}

.reports-calls-workspace .reports-sales-trend-svg,
.reports-calls-workspace .reports-call-duration-svg {
  height: 100%;
  max-height: 100%;
}

.reports-call-duration-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.reports-call-duration-head h3 {
  margin: 4px 0 2px;
}

.reports-call-duration-head small {
  color: var(--muted);
  line-height: 1.35;
}

.reports-call-duration-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 14px 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.reports-call-duration-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.reports-call-duration-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.reports-call-duration-legend .is-short,
.reports-call-duration-bar-short {
  fill: #ef0f62;
  background: #ef0f62;
}

.reports-call-duration-legend .is-long,
.reports-call-duration-bar-long {
  fill: #ffb51b;
  background: #ffb51b;
}

.reports-call-duration-chart {
  min-height: 286px;
}

.reports-call-duration-scroll {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.reports-call-duration-svg {
  display: block;
  width: 100%;
  min-width: 610px;
  height: auto;
}

.reports-call-duration-grid-line {
  stroke: rgba(91, 77, 84, 0.14);
  stroke-dasharray: 2 6;
  stroke-width: 1;
}

.reports-call-duration-axis-label,
.reports-call-duration-total {
  fill: #71636b;
  font-family: inherit;
  font-size: 10px;
}

.reports-call-duration-total {
  fill: #171216;
  font-weight: 900;
}

.reports-call-duration-empty {
  display: grid;
  place-items: center;
  min-height: 250px;
  padding: 28px;
  border: 1px dashed rgba(185, 0, 77, 0.2);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

.reports-pipeline-workspace {
  min-width: 0;
  margin-top: 18px;
  container-type: inline-size;
}

#reportsPipelineWorkspace .reports-pipeline-menu {
  position: fixed;
  inset: auto;
  margin: 0;
  width: 200px;
  max-width: calc(calc(100 * var(--vw)) - 16px);
  max-height: calc(calc(100 * var(--dvh)) - 16px);
  overflow-y: auto;
}

.reports-pipeline-menu-note {
  display: block;
  padding: 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.reports-pipeline-kpis .reports-message-kpi-card { position: relative; }
.reports-pipeline-kpis [data-pipeline-menu-host] {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}
.reports-pipeline-kpis .eyebrow,
.reports-pipeline-kpis .reports-message-kpi-value { padding-right: 28px; }
.reports-pipeline-panel .reports-message-panel-head { gap: 8px; }

.reports-pipeline-notice {
  flex: 0 0 auto;
  margin: 7px 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.reports-pipeline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.reports-pipeline-grid .reports-pipeline-panel {
  display: flex;
  flex-direction: column;
  background: #fff;
}

.reports-pipeline-chart {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  gap: 8px;
  overflow: auto;
}

.reports-pipeline-bars {
  display: grid;
  flex: 1 1 auto;
  align-content: space-evenly;
  gap: 5px;
}

.reports-pipeline-bar-row {
  display: grid;
  grid-template-columns: minmax(85px, 1fr) minmax(45px, 1.8fr) minmax(28px, auto);
  align-items: center;
  gap: 8px;
  min-height: 22px;
  font-size: clamp(0.66rem, calc(0.85 * var(--vw)), 0.83rem);
  line-height: 1.15;
}

.reports-pipeline-bar-row strong { text-align: right; }
.reports-pipeline-bar-track {
  display: flex;
  height: clamp(10px, calc(1.8 * var(--vh)), 20px);
  overflow: hidden;
  border-radius: 5px;
  background: #f5f3f5;
}
.reports-pipeline-bar-track span { height: 100%; flex: 0 0 auto; }
.reports-pipeline-legend {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 12px;
  color: var(--muted);
  font-size: 0.67rem;
}
.reports-pipeline-legend span { display: inline-flex; align-items: center; gap: 5px; }
.reports-pipeline-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.reports-pipeline-movement svg { display: block; width: 100%; flex: 1 1 0; min-height: 100px; }
.reports-pipeline-movement svg text { font-family: inherit; font-size: 11px; fill: var(--muted); }
.reports-pipeline-empty { margin: auto; padding: 12px; text-align: center; color: var(--muted); font-size: 0.85rem; }
.reports-pipeline-data { flex: 0 0 auto; font-size: 0.68rem; color: var(--muted); }
.reports-pipeline-data summary { cursor: pointer; }
.reports-pipeline-data table { width: 100%; text-align: left; border-collapse: collapse; }
.reports-pipeline-data td, .reports-pipeline-data th { padding: 4px; border-bottom: 1px solid #eee; }

@media (max-width: 1040px) {
  .reports-pipeline-grid { grid-template-columns: minmax(0, 1fr); }
  .reports-pipeline-grid .reports-pipeline-panel { min-height: 290px; }
  body[data-active-reports-subsection="pipeline"] .reports-master-detail-shell { grid-template-columns: minmax(0, 1fr); }
  body[data-active-reports-subsection="pipeline"] .reports-master-pane { min-width: 0; }
}

@media (min-width: 1041px) and (max-height: 800px) {
  .reports-pipeline-kpis .eyebrow { display: none; }
  .reports-pipeline-workspace .reports-pipeline-kpis h3 { font-size: 0.8rem; margin: 3px 0 2px; }
  .reports-pipeline-workspace .reports-pipeline-kpis small { font-size: 0.64rem; line-height: 1.2; }
  .reports-pipeline-bars { gap: 3px; }
}

@container (max-width: 600px) {
  #reportsPipelineWorkspace .reports-pipeline-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    flex: 0 0 auto;
  }
  #reportsPipelineWorkspace .reports-pipeline-kpis { min-height: 260px; }
  #reportsPipelineWorkspace .reports-pipeline-panel { min-height: 280px; }
}

.reports-messages-workspace {
  min-width: 0;
  margin-top: 18px;
}

.reports-messages-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.reports-message-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  min-height: 340px;
}

.reports-message-kpi-card {
  display: grid;
  align-content: center;
  min-width: 0;
  min-height: 0;
  padding: clamp(14px, calc(1.8 * var(--vh)), 20px);
  overflow: hidden;
  border-radius: 26px;
  background: #fff;
}

.reports-message-kpi-card-action {
  position: relative;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.reports-message-kpi-card-action::after {
  content: "View messages  →";
  position: absolute;
  right: 18px;
  bottom: 14px;
  color: #bd0e52;
  font-size: 0.68rem;
  font-weight: 800;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.reports-message-kpi-card-action:hover,
.reports-message-kpi-card-action:focus-visible {
  border-color: rgba(239, 15, 98, 0.34);
  box-shadow: 0 18px 38px rgba(115, 28, 62, 0.12);
  outline: none;
  transform: translateY(-2px);
}

.reports-message-kpi-card-action:hover::after,
.reports-message-kpi-card-action:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.reports-message-kpi-card .eyebrow {
  margin: 0;
  font-size: clamp(0.64rem, calc(0.72 * var(--vw)), 0.76rem);
}

.reports-message-kpi-card h3 {
  margin: 5px 0 3px;
  font-size: clamp(0.88rem, calc(1 * var(--vw)), 1rem);
}

.reports-message-kpi-card small,
.reports-message-panel-head small {
  color: var(--muted);
  font-size: clamp(0.69rem, calc(0.75 * var(--vw)), 0.78rem);
  line-height: 1.3;
}

.reports-message-kpi-value {
  margin-top: clamp(7px, calc(1 * var(--vh)), 12px);
  color: #171216;
  font-size: clamp(1.75rem, calc(2.6 * var(--vw)), 2.65rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.reports-message-panel {
  min-width: 0;
  min-height: 340px;
  padding: 20px;
  overflow: hidden;
  border-radius: 26px;
  background: #fff;
}

.reports-message-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.reports-message-panel-head h3 {
  margin: 4px 0 2px;
}

body.reports-dialog-open {
  overflow: hidden;
}

.reports-awaiting-dialog-shell {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: clamp(16px, calc(3 * var(--vw)), 42px);
}

.reports-awaiting-dialog-shell.hidden {
  display: none;
}

.reports-awaiting-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(62, 36, 47, 0.58);
  backdrop-filter: blur(10px);
}

.reports-awaiting-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(900px, 100%);
  max-height: min(820px, calc(calc(100 * var(--vh)) - 44px));
  overflow: hidden;
  border: 1px solid rgba(239, 15, 98, 0.17);
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(53, 24, 36, 0.3);
}

.reports-awaiting-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px 22px;
  border-bottom: 1px solid #f1e7eb;
}

.reports-awaiting-dialog-head .eyebrow {
  margin: 0 0 7px;
}

.reports-awaiting-dialog-head h2 {
  margin: 0;
  font-size: clamp(1.55rem, calc(2 * var(--vw)), 2.15rem);
}

.reports-awaiting-dialog-head .muted {
  margin: 7px 0 0;
}

.reports-awaiting-dialog-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border: 1px solid #ffd0df;
  border-radius: 16px;
  background: #fff;
  color: #bd0e52;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.reports-awaiting-dialog-close:hover,
.reports-awaiting-dialog-close:focus-visible {
  border-color: #ef0f62;
  background: #fff3f7;
  outline: none;
}

.reports-awaiting-list {
  min-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 18px 20px;
}

.reports-awaiting-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 12px;
  border: 0;
  border-bottom: 1px solid #f1e7eb;
  background: transparent;
  color: #171216;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 150ms ease, padding 150ms ease;
}

.reports-awaiting-item:hover,
.reports-awaiting-item:focus-visible {
  padding-inline: 16px;
  border-radius: 18px;
  background: linear-gradient(90deg, #fff2f7, #fffaf5);
  outline: none;
}

.reports-awaiting-avatar {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef0f62, #ff8b42);
  color: #fff;
  font-weight: 800;
}

.reports-awaiting-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.reports-awaiting-name {
  font-weight: 850;
}

.reports-awaiting-preview {
  overflow: hidden;
  color: #5f5058;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-awaiting-item.is-expanded {
  align-items: start;
  margin-block: 6px;
  padding: 18px 16px;
  border-bottom-color: transparent;
  border-radius: 18px;
  background: linear-gradient(90deg, #fff2f7, #fffaf5);
}

.reports-awaiting-item.is-expanded .reports-awaiting-preview {
  overflow: visible;
  padding: 7px 0 3px;
  color: #33282e;
  line-height: 1.55;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: pre-wrap;
}

.reports-awaiting-meta {
  color: #8a747f;
  font-size: 0.76rem;
}

.reports-awaiting-arrow {
  color: #bd0e52;
  font-size: 1.25rem;
  transform: rotate(0deg);
  transition: transform 160ms ease;
}

.reports-awaiting-item.is-expanded .reports-awaiting-arrow {
  transform: rotate(180deg);
}

.reports-awaiting-empty {
  display: grid;
  min-height: 250px;
  place-items: center;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.reports-awaiting-limit-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

@media (max-width: 640px) {
  .reports-awaiting-dialog-shell {
    padding: 10px;
  }

  .reports-awaiting-dialog {
    max-height: calc(calc(100 * var(--vh)) - 20px);
    border-radius: 24px;
  }

  .reports-awaiting-dialog-head {
    padding: 22px 20px 18px;
  }

  .reports-awaiting-item {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .reports-awaiting-avatar {
    width: 42px;
    height: 42px;
  }
}

.reports-message-status-chart {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(190px, 1fr);
  align-items: center;
  gap: clamp(20px, calc(3 * var(--vw)), 42px);
  min-height: 250px;
  padding: 8px clamp(4px, calc(2 * var(--vw)), 22px) 2px;
}

.reports-message-donut {
  position: relative;
  width: min(220px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(
    #ef0f62 0 var(--messages-responded-stop),
    #ffb51b var(--messages-responded-stop) var(--messages-unread-stop),
    #7657f6 var(--messages-unread-stop) 100%
  );
  box-shadow: 0 18px 38px rgba(93, 40, 66, 0.12);
}

.reports-message-donut.is-empty {
  background: #f4edf0;
}

.reports-message-donut::after {
  position: absolute;
  inset: 21%;
  display: block;
  border-radius: inherit;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(92, 75, 84, 0.08);
  content: "";
}

.reports-message-donut-center {
  position: absolute;
  inset: 24%;
  z-index: 1;
  display: grid;
  place-content: center;
  text-align: center;
}

.reports-message-donut-center strong {
  color: #171216;
  font-size: clamp(1.7rem, calc(2.6 * var(--vw)), 2.55rem);
  line-height: 1;
}

.reports-message-donut-center span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.reports-message-status-legend {
  display: grid;
  gap: 12px;
}

.reports-message-status-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(91, 77, 84, 0.12);
}

.reports-message-status-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.reports-message-status-row i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--message-status-color);
}

.reports-message-status-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.reports-message-status-row strong {
  color: #171216;
  font-size: 1rem;
}

.reports-message-volume-chart,
.reports-message-aging-chart {
  min-height: 250px;
}

.reports-message-volume-scroll {
  height: 255px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.reports-message-volume-svg {
  display: block;
  width: 100%;
  min-width: 610px;
  height: 255px;
}

.reports-message-volume-grid-line {
  stroke: rgba(91, 77, 84, 0.14);
  stroke-dasharray: 2 6;
  stroke-width: 1;
}

.reports-message-volume-axis-label {
  fill: #71636b;
  font-family: inherit;
  font-size: 10px;
}

.reports-message-volume-line-inbound,
.reports-message-volume-line-outbound,
.reports-message-volume-line-total {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reports-message-volume-line-inbound {
  stroke: #7657f6;
  stroke-width: 3;
}

.reports-message-volume-line-outbound {
  stroke: #ff9b22;
  stroke-width: 3;
}

.reports-message-volume-line-total {
  stroke: #ef0f62;
  stroke-width: 4;
}

.reports-message-volume-dot-inbound { fill: #7657f6; }
.reports-message-volume-dot-outbound { fill: #ff9b22; }
.reports-message-volume-dot-total { fill: #ef0f62; }

.reports-message-volume-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.reports-message-volume-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.reports-message-volume-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.reports-message-aging-list {
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 250px;
  padding: 4px 2px;
}

.reports-message-aging-row {
  display: grid;
  grid-template-columns: minmax(105px, 0.75fr) minmax(150px, 2.25fr) auto;
  align-items: center;
  gap: 12px;
}

.reports-message-aging-label {
  color: #32282e;
  font-size: 0.79rem;
  font-weight: 800;
}

.reports-message-aging-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #f4edf0;
}

.reports-message-aging-fill {
  width: var(--message-aging-width);
  min-width: var(--message-aging-min-width, 0);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7eae, #ef0f62);
}

.reports-message-aging-value {
  min-width: 28px;
  color: #171216;
  text-align: right;
  font-size: 0.9rem;
  font-weight: 900;
}

.reports-message-chart-empty {
  display: grid;
  place-items: center;
  min-height: 245px;
  padding: 28px;
  border: 1px dashed rgba(185, 0, 77, 0.2);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .reports-sales-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-sales-dashboard-grid {
    grid-template-columns: 1fr;
  }

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

  .reports-messages-grid {
    grid-template-columns: 1fr;
  }

  .reports-calls-workspace {
    --reports-call-trend-height: 248px;
    --reports-call-duration-height: 286px;
  }

  .reports-call-kpi-grid {
    min-height: 372px;
  }

  .reports-message-kpi-grid,
  .reports-message-panel {
    min-height: 340px;
  }
}

@media (max-width: 620px) {
  .reports-message-kpi-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .reports-message-kpi-card {
    min-height: 150px;
  }

  .reports-message-status-chart {
    grid-template-columns: 1fr;
  }

  .reports-message-aging-row {
    grid-template-columns: minmax(92px, 0.9fr) minmax(100px, 2fr) auto;
    gap: 8px;
  }
}

@media (min-width: 981px) and (max-height: 760px) {
  .reports-calls-workspace {
    margin-top: 10px;
  }

  .reports-call-kpi-card small {
    display: none;
  }

  .reports-call-duration-card,
  .reports-calls-per-sale-widget {
    padding: 14px 16px;
  }

  .reports-sales-trend-head {
    margin-bottom: 8px;
  }

  .reports-call-duration-legend {
    margin: 8px 0 2px;
  }
}

@media (max-width: 640px) {
  .reports-sales-kpi-row {
    grid-template-columns: 1fr;
  }

  .reports-weekly-sales-head,
  .reports-sales-trend-head,
  .reports-call-duration-head {
    flex-direction: column;
  }

  .reports-chart-action-menu {
    align-self: flex-end;
  }
}

.goal-overview-left {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.goal-overview-right {
  display: grid;
  gap: 10px;
  min-width: 0;
  align-content: start;
}

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

.metric-card {
  padding: 18px;
}

.leads-filter-widget {
  grid-column: span 2;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(245, 245, 248, 0.94), rgba(241, 241, 245, 0.92)),
    rgba(255, 255, 255, 0.96);
}

.leads-filter-widget-primary {
  grid-column: 1 / -1;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 190, 27, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(252, 252, 253, 0.97));
}

.leads-filter-widget-primary.sales-home-pipeline-shell {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.leads-filter-widget-primary .section-head {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(239, 22, 101, 0.3) transparent;
}

.leads-filter-widget-primary .section-head::-webkit-scrollbar {
  height: 7px;
}

.leads-filter-widget-primary .section-head::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.3);
}

.leads-filter-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: flex-start;
  width: max-content;
  min-width: 100%;
  padding-bottom: 3px;
}

.leads-filter-head-actions .pipeline-utility-actions {
  display: contents;
  margin: 0;
}

.leads-filter-head-actions > button,
.leads-filter-head-actions .pipeline-utility-actions > * {
  flex: 0 0 auto;
}

.pipeline-aging-key {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 42px;
  align-items: center;
  gap: 6px;
  margin-left: 0;
  padding: 7px 8px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  box-shadow: 0 8px 18px rgba(70, 39, 56, 0.055);
  white-space: nowrap;
}

.pipeline-aging-key > strong {
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 800;
}

.pipeline-aging-key-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
}

.pipeline-aging-key-item > i {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 3px;
}

.pipeline-aging-key-item > i.is-green {
  background: #16a34a;
}

.pipeline-aging-key-item > i.is-yellow {
  background: #eab308;
}

.pipeline-aging-key-item > i.is-orange {
  background: #f97316;
}

.pipeline-aging-key-item > i.is-red {
  background: #dc2626;
}

.leads-create-button {
  flex: 0 0 auto;
  width: auto;
  min-width: max-content;
  margin-top: 0;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.92rem;
  white-space: nowrap;
}

.leads-header-action-button {
  background: linear-gradient(135deg, rgba(255, 239, 244, 0.96), rgba(255, 219, 123, 0.92));
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.12);
  box-shadow: 0 12px 26px rgba(116, 16, 59, 0.1);
  font-weight: 700;
}

.leads-filter-widget-primary #openLeadsMetric {
  padding: 6px 11px;
  font-size: 0.86rem;
}

.bulk-lead-upload-modal {
  max-width: min(720px, calc(calc(100 * var(--vw)) - 32px));
}

.bulk-lead-upload-copy {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.55;
}

.bulk-lead-upload-grid {
  align-items: start;
}

.bulk-lead-upload-preview {
  margin-top: 12px;
}

.bulk-lead-upload-preview-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 24px;
  border: 1px solid rgba(239, 22, 101, 0.12);
  background: linear-gradient(135deg, rgba(255, 248, 250, 0.98), rgba(255, 252, 241, 0.98));
}

.bulk-lead-upload-preview-card img {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(239, 22, 101, 0.1);
  box-shadow: 0 16px 30px rgba(132, 24, 76, 0.12);
}

.bulk-lead-upload-preview-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.bulk-lead-upload-preview-copy strong {
  color: var(--ink);
  font-size: 1rem;
}

.leads-header-action-button:hover,
.leads-header-action-button:focus-visible {
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.16), rgba(255, 190, 27, 0.24));
  box-shadow: 0 14px 28px rgba(116, 16, 59, 0.14);
}

.leads-filter-group {
  display: grid;
  gap: 10px;
}

.leads-filter-layout {
  display: grid;
  grid-template-columns: minmax(176px, 228px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.leads-filter-group + .leads-filter-group {
  margin-top: 14px;
}

.leads-filter-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.leads-filter-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.leads-filter-widget-primary .leads-filter-buttons {
  gap: 10px;
}

.leads-filter-pill {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background: rgba(255, 255, 255, 0.98);
  color: #5c5c73;
  box-shadow: 0 10px 24px rgba(70, 39, 56, 0.06);
}

.leads-filter-widget-primary .leads-filter-pill {
  min-height: 72px;
  padding: 10px 14px;
  border-radius: 18px;
}

.leads-filter-sequence {
  position: absolute;
  top: 12px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.1);
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
}

.leads-filter-widget-primary .leads-filter-sequence {
  top: 14px;
  left: 16px;
}

.leads-filter-pill-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}

.leads-filter-pill span {
  display: block;
  font-size: 0.96rem;
  font-weight: 700;
  color: inherit;
  text-align: left;
}

.leads-filter-widget-primary .leads-filter-pill span {
  font-size: 1rem;
}

.leads-filter-pill-copy small {
  font-size: 0.78rem;
  line-height: 1.2;
  color: rgba(92, 92, 115, 0.82);
}

.leads-filter-pill strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.12);
  color: var(--accent-deep);
  font-size: 1rem;
  margin-top: 0;
}

.leads-filter-widget-primary .leads-filter-pill strong {
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  font-size: 0.98rem;
}

.leads-filter-pill-hint {
  justify-content: space-between;
  text-align: left;
  align-items: center;
}

.leads-filter-pill-hint:hover {
  background: rgba(255, 255, 255, 0.98);
}

.leads-filter-pill-hint.is-disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.leads-filter-pill-hint-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  gap: 16px;
}

.leads-filter-pill-hint-logo {
  order: 2;
  width: 150px;
  max-width: 38%;
  height: 42px;
  object-fit: contain;
  object-position: center;
  flex: 0 0 auto;
}

.leads-filter-pill-waiversign-logo {
  width: 62px;
  max-width: none;
  height: 62px;
  border-radius: 16px;
}

.leads-filter-pill-hint-label {
  order: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 1.2rem;
  font-weight: 700;
  color: inherit;
  line-height: 1.2;
  text-align: left;
  flex: 1 1 auto;
  min-width: 0;
}

.leads-filter-pill strong.leads-count-good {
  background: rgba(25, 135, 84, 0.16);
  color: #146c43;
}

.leads-filter-pill strong.leads-count-warning {
  background: rgba(255, 190, 27, 0.2);
  color: #9b6400;
}

.leads-filter-pill strong.leads-count-danger {
  background: rgba(239, 22, 101, 0.14);
  color: var(--accent-deep);
}

.leads-filter-pill:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(239, 22, 101, 0.18);
  color: var(--accent-deep);
  box-shadow: 0 14px 28px rgba(116, 16, 59, 0.12);
}

.leads-filter-pill:hover strong {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff9fb;
}

.leads-filter-pill:hover strong.leads-count-good {
  background: linear-gradient(135deg, #198754, #37b36f);
  color: #f7fff9;
}

.leads-filter-pill:hover strong.leads-count-warning {
  background: linear-gradient(135deg, #f0ad00, #ffbe1b);
  color: #fffaf0;
}

.leads-filter-pill:hover strong.leads-count-danger {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff9fb;
}

.leads-filter-pill.is-active {
  border-color: rgba(239, 22, 101, 0.16);
  color: var(--accent-deep);
  box-shadow: 0 16px 30px rgba(116, 16, 59, 0.12);
  background: linear-gradient(135deg, rgba(255, 242, 246, 0.98), rgba(255, 251, 239, 0.96));
}

.leads-filter-pill.is-active strong {
  background: rgba(239, 22, 101, 0.12);
  color: var(--accent-deep);
}

.pipeline-inline-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100%;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background:
    radial-gradient(circle at top right, rgba(255, 190, 27, 0.1), transparent 28%),
    rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 36px rgba(70, 39, 56, 0.08);
}

.pipeline-inline-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pipeline-inline-panel-head h4 {
  margin: 2px 0 0;
  font-size: 1.2rem;
}

.pipeline-inline-body {
  display: grid;
  min-height: 0;
  height: 100%;
}

.leads-filter-pill.is-active strong.leads-count-good {
  background: rgba(25, 135, 84, 0.16);
  color: #146c43;
}

.leads-filter-pill.is-active strong.leads-count-warning {
  background: rgba(255, 190, 27, 0.2);
  color: #9b6400;
}

.leads-filter-pill.is-active strong.leads-count-danger {
  background: rgba(239, 22, 101, 0.14);
  color: var(--accent-deep);
}

/* Sales Core pipeline statuses use full-width list rows instead of card shells. */
.leads-filter-widget-primary .leads-filter-buttons {
  gap: 0;
}

.leads-filter-widget-primary .leads-filter-pill {
  min-height: 72px;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.leads-filter-widget-primary .leads-filter-pill:last-child {
  border-bottom: 0;
}

.leads-filter-widget-primary .leads-filter-pill:hover,
.leads-filter-widget-primary .leads-filter-pill.is-active {
  border-color: rgba(17, 17, 17, 0.1);
  background: rgba(239, 22, 101, 0.045);
  box-shadow: none;
}

.leads-filter-widget-primary .leads-filter-pill:last-child:hover,
.leads-filter-widget-primary .leads-filter-pill:last-child.is-active {
  border-bottom-color: transparent;
}

.pipeline-utility-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 14px;
}

.leads-filter-widget-primary .pipeline-utility-actions .leads-filter-pill {
  width: auto;
  min-width: 138px;
  min-height: 42px;
  padding: 7px 14px;
  border: 1px solid rgba(239, 22, 101, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 22px rgba(70, 39, 56, 0.07);
}

.leads-filter-widget-primary .pipeline-utility-actions .leads-filter-pill:hover,
.leads-filter-widget-primary .pipeline-utility-actions .leads-filter-pill:focus-visible {
  border-color: rgba(239, 22, 101, 0.24);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 242, 246, 0.98), rgba(255, 251, 239, 0.96));
  box-shadow: 0 12px 24px rgba(116, 16, 59, 0.1);
}

.pipeline-utility-actions .leads-filter-pill-hint-content {
  gap: 9px;
}

.pipeline-utility-actions .leads-filter-pill-hint-label {
  font-size: 0.9rem;
  white-space: nowrap;
}

.pipeline-utility-actions .leads-filter-pill-hint-logo {
  width: 76px;
  max-width: 76px;
  height: 28px;
}

.pipeline-utility-actions .leads-filter-pill-waiversign-logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.pipeline-board-view {
  min-width: 0;
}

.pipeline-board-toolbar {
  display: flex;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.pipeline-board-toolbar > .pipeline-board-search-field {
  display: flex;
  align-items: center;
  flex: 1 1 720px;
  gap: 12px;
  min-width: 280px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(62, 10, 32, 0.08);
}

.pipeline-board-toolbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.pipeline-board-search-icon {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 2px solid rgba(102, 85, 95, 0.68);
  border-radius: 50%;
}

.pipeline-board-search-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: rgba(102, 85, 95, 0.68);
  transform: rotate(45deg);
}

.pipeline-board-toolbar .pipeline-board-search-field input {
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.pipeline-board-search-field input::placeholder {
  color: rgba(102, 85, 95, 0.78);
}

.pipeline-board-tag-filter {
  position: relative;
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: none;
  min-width: 0;
  min-height: 44px;
  color: var(--copy);
  font-weight: 500;
}

.pipeline-board-sort {
  position: relative;
  flex: 0 0 auto;
}

.pipeline-board-sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-height: 36px;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid rgba(239, 22, 101, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--accent);
  box-shadow: none;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.pipeline-board-sort-button:hover,
.pipeline-board-sort-button:focus-visible,
.pipeline-board-sort-button[aria-expanded="true"] {
  border-color: rgba(239, 22, 101, 0.32);
  background: #fff;
  box-shadow: 0 10px 22px rgba(116, 16, 59, 0.08);
  transform: none;
}

.pipeline-board-sort-icon {
  position: relative;
  width: 18px;
  height: 16px;
  flex: 0 0 18px;
  background:
    linear-gradient(var(--accent), var(--accent)) 0 2px / 18px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 3px 7px / 12px 2px no-repeat,
    linear-gradient(var(--accent), var(--accent)) 6px 12px / 6px 2px no-repeat;
}

.pipeline-board-sort-chevron {
  width: 7px;
  height: 7px;
  margin: -3px 1px 0 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.pipeline-board-sort-popover {
  position: absolute;
  z-index: 61;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: 220px;
  overflow: hidden;
  padding: 7px;
  border: 1px solid rgba(239, 22, 101, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.995);
  box-shadow: 0 22px 46px rgba(62, 10, 32, 0.18);
}

.pipeline-board-sort-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--copy);
  box-shadow: none;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: left;
}

.pipeline-board-sort-option:hover,
.pipeline-board-sort-option:focus-visible,
.pipeline-board-sort-option.is-active {
  background: rgba(239, 22, 101, 0.08);
  color: var(--accent-deep);
  box-shadow: none;
  transform: none;
}

.pipeline-board-sort-check {
  color: var(--accent);
  font-weight: 900;
}

.pipeline-board-selected-tag-list {
  display: contents;
}

.pipeline-board-selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  min-height: 36px;
  max-width: 210px;
  margin: 0;
  padding: 5px 11px 5px 6px;
  border: 1px solid color-mix(in srgb, var(--pipeline-filter-tag-color, #ef1665) 30%, white);
  border-radius: 999px;
  background: color-mix(in srgb, var(--pipeline-filter-tag-color, #ef1665) 9%, white);
  color: color-mix(in srgb, var(--pipeline-filter-tag-color, #ef1665) 74%, #111);
  box-shadow: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.pipeline-board-selected-tag:hover,
.pipeline-board-selected-tag:focus-visible {
  border-color: color-mix(in srgb, var(--pipeline-filter-tag-color, #ef1665) 48%, white);
  background: color-mix(in srgb, var(--pipeline-filter-tag-color, #ef1665) 14%, white);
  box-shadow: 0 7px 16px color-mix(in srgb, var(--pipeline-filter-tag-color, #ef1665) 12%, transparent);
  transform: none;
}

.pipeline-board-selected-tag > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-board-selected-tag-overflow {
  display: inline-grid;
  min-width: 36px;
  min-height: 36px;
  padding: 5px 9px;
  place-items: center;
  border: 1px solid rgba(239, 22, 101, 0.16);
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.09);
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.pipeline-board-selected-tag-icon {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  place-items: center;
  border-radius: 50%;
  background: var(--pipeline-filter-tag-color, #ef1665);
  color: #fff;
}

.pipeline-board-selected-tag-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.pipeline-board-tag-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-height: 36px;
  margin: 0;
  padding: 6px 13px 6px 7px;
  border: 1px solid rgba(239, 22, 101, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--accent);
  box-shadow: none;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.pipeline-board-tag-filter-plus {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
}

.pipeline-board-tag-filter-button:hover,
.pipeline-board-tag-filter-button:focus-visible,
.pipeline-board-tag-filter-button[aria-expanded="true"] {
  border-color: rgba(239, 22, 101, 0.28);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 10px 22px rgba(116, 16, 59, 0.08);
  transform: none;
}

.pipeline-board-tag-filter-popover {
  position: absolute;
  z-index: 60;
  top: calc(100% + 8px);
  right: 0;
  width: min(420px, calc(calc(100 * var(--vw)) - 48px));
  max-height: min(520px, calc(68 * var(--vh)));
  overflow-y: auto;
  padding: 14px;
  border: 1px solid rgba(239, 22, 101, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.995);
  box-shadow: 0 22px 46px rgba(62, 10, 32, 0.18);
}

.pipeline-board-tag-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pipeline-board-tag-filter-head button {
  width: auto;
  min-height: 0;
  margin: 0;
  padding: 4px 7px;
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  box-shadow: none;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
}

.pipeline-board-tag-filter-popover > p {
  margin: 5px 0 12px;
  color: var(--muted);
  font-size: 0.76rem;
}

.pipeline-board-tag-filter-options {
  display: grid;
  gap: 12px;
}

.pipeline-board-tag-filter-options fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.pipeline-board-tag-filter-options legend {
  width: 100%;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pipeline-board-tag-filter-options label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  min-height: 34px;
  padding: 5px 10px 5px 7px;
  border: 1px solid rgba(17, 17, 17, 0.09);
  border-radius: 999px;
  background: rgba(250, 249, 250, 0.96);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.pipeline-board-tag-filter-options label:has(input:checked) {
  border-color: rgba(239, 22, 101, 0.28);
  background: rgba(239, 22, 101, 0.08);
  color: var(--accent-deep);
}

.pipeline-board-tag-filter-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pipeline-board-tag-filter-color {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--pipeline-filter-tag-color, var(--accent));
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.82);
}

.pipeline-board-tag-filter-footer {
  position: sticky;
  z-index: 2;
  bottom: -14px;
  display: flex;
  justify-content: flex-end;
  margin: 14px -14px -14px;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
}

.pipeline-board-tag-filter-footer button {
  width: auto;
  min-height: 36px;
  margin: 0;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(239, 22, 101, 0.12);
  background: #ef1665;
  color: #fff;
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
}

.pipeline-board-tag-filter-footer button:hover,
.pipeline-board-tag-filter-footer button:focus-visible {
  background: #ef1665;
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
}

.pipeline-board-loading {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.pipeline-kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(228px, 1fr));
  gap: 10px;
  align-items: start;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px 2px 12px;
  scrollbar-color: rgba(116, 16, 59, 0.34) transparent;
}

.pipeline-kanban-column {
  min-width: 228px;
  min-height: 320px;
  padding: 8px;
  border: 1px solid rgba(17, 17, 17, 0.07);
  border-radius: 18px;
  background: rgba(246, 246, 248, 0.78);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

@media (min-width: 901px) {
  body.sales-home-page {
    height: calc(100 * var(--vh));
    height: calc(100 * var(--dvh));
    min-height: 0;
    overflow: hidden;
  }

  body.sales-home-page .app-shell {
    height: calc(100 * var(--vh));
    height: calc(100 * var(--dvh));
    min-height: 0;
    overflow: hidden;
  }

  body.sales-home-page .sidebar,
  body.sales-home-page .right-sidebar {
    height: calc(100 * var(--vh));
    height: calc(100 * var(--dvh));
    min-height: 0;
  }

  body.sales-home-page .sidebar {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body.sales-home-page .main-content {
    height: calc(100 * var(--vh));
    height: calc(100 * var(--dvh));
    min-height: 0;
    overflow: hidden;
  }

  body.sales-home-page .main-content > .account-topbar {
    flex: 0 0 auto;
  }

  body.sales-home-page .main-content > .grid {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
    overflow: hidden;
  }

  body.sales-home-page .sales-home-pipeline-shell,
  body.sales-home-page .pipeline-board-view,
  body.sales-home-page #pipelineBoardBody {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
  }

  body.sales-home-page .sales-home-pipeline-shell > .section-head,
  body.sales-home-page .pipeline-board-toolbar,
  body.sales-home-page .pipeline-board-loading,
  body.sales-home-page #pipelineBoardStatus:not(.hidden) {
    flex: 0 0 auto;
  }

  body.sales-home-page .pipeline-kanban {
    flex: 1 1 auto;
    min-height: 0;
    grid-auto-rows: minmax(0, 1fr);
    align-items: stretch;
    overflow-y: hidden;
  }

  body.sales-home-page .pipeline-kanban-column {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
  }

  body.sales-home-page .pipeline-kanban-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }

  body:not(.right-sidebar-collapsed) .leads-filter-widget-primary {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body:not(.right-sidebar-collapsed) .pipeline-board-view {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body:not(.right-sidebar-collapsed) #pipelineBoardBody {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body:not(.right-sidebar-collapsed) .pipeline-kanban {
    grid-template-columns: repeat(5, minmax(228px, calc(20% + 53.2px)));
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
  }
}

/* On laptop-sized screens, use one horizontal workspace scroller so the full
   action row and every pipeline stage remain reachable together. */
@media (min-width: 901px) and (max-width: 1800px) {
  body.sales-home-page .main-content {
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
  }

  body.sales-home-page .main-content > .grid {
    width: 100%;
    min-width: 1500px;
  }

  body.sales-home-page .main-content > .account-topbar {
    position: sticky;
    left: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  body.sales-home-page .main-content > .grid {
    overflow: visible;
  }

  body.sales-home-page .sales-home-pipeline-shell > .section-head,
  body.sales-home-page .pipeline-kanban {
    max-width: none;
    overflow-x: visible;
  }

  body.sales-home-page .pipeline-board-view,
  body.sales-home-page #pipelineBoardBody {
    width: 100%;
    max-width: none;
  }
}

.pipeline-kanban-column.is-drag-over {
  border-color: rgba(239, 22, 101, 0.42);
  background: rgba(239, 22, 101, 0.075);
  transform: translateY(-2px);
}

.pipeline-kanban-column-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 8px 8px 10px;
  background: rgba(246, 246, 248, 0.96);
}

.pipeline-kanban-column-head strong {
  color: var(--ink);
  font-size: 0.94rem;
}

.pipeline-kanban-column-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.1);
  color: var(--accent-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

.pipeline-kanban-list {
  display: grid;
  gap: 8px;
  min-height: 248px;
  max-height: min(calc(68 * var(--vh)), 720px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 5px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: rgba(116, 16, 59, 0.3) transparent;
}

.pipeline-kanban-list:focus-visible {
  outline: 2px solid rgba(239, 22, 101, 0.28);
  outline-offset: 2px;
}

.pipeline-kanban-load-more,
.pipeline-kanban-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}

.pipeline-kanban-load-more .pipeline-segment-loading-spinner {
  width: 18px;
  height: 18px;
  border-width: 2px;
}

.pipeline-kanban-scroll-hint {
  opacity: 0.72;
}

.pipeline-kanban-empty {
  display: grid;
  place-items: center;
  min-height: 90px;
  padding: 12px;
  border: 1px dashed rgba(239, 22, 101, 0.18);
  border-radius: 14px;
  color: rgba(99, 82, 94, 0.7);
  font-size: 0.8rem;
  text-align: center;
}

.pipeline-board-card {
  position: relative;
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 18px rgba(70, 39, 56, 0.055);
  cursor: grab;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease, opacity 150ms ease;
}

.pipeline-board-card.is-aging-green {
  --pipeline-aging-color: #16a34a;
  --pipeline-aging-border: rgba(22, 163, 74, 0.38);
  background: rgba(22, 163, 74, 0.14);
}

.pipeline-board-card.is-aging-yellow {
  --pipeline-aging-color: #eab308;
  --pipeline-aging-border: rgba(234, 179, 8, 0.44);
  background: rgba(234, 179, 8, 0.18);
}

.pipeline-board-card.is-aging-orange {
  --pipeline-aging-color: #f97316;
  --pipeline-aging-border: rgba(249, 115, 22, 0.42);
  background: rgba(249, 115, 22, 0.16);
}

.pipeline-board-card.is-aging-red {
  --pipeline-aging-color: #dc2626;
  --pipeline-aging-border: rgba(220, 38, 38, 0.4);
  background: rgba(220, 38, 38, 0.14);
}

.pipeline-board-card[class*="is-aging-"] {
  border-color: var(--pipeline-aging-border);
  border-left: 5px solid var(--pipeline-aging-color);
}

.pipeline-board-card:hover,
.pipeline-board-card:focus-visible {
  border-color: rgba(239, 22, 101, 0.24);
  box-shadow: 0 12px 24px rgba(116, 16, 59, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.pipeline-board-card[class*="is-aging-"]:hover,
.pipeline-board-card[class*="is-aging-"]:focus-visible {
  border-color: var(--pipeline-aging-color);
}

.pipeline-board-card:has(.pipeline-lead-action-popover:not(.hidden)) {
  z-index: 30;
}

.pipeline-board-card:active {
  cursor: grabbing;
}

.pipeline-board-card.is-dragging {
  opacity: 0.42;
  transform: scale(0.98);
}

.pipeline-board-card.is-saving {
  pointer-events: none;
  opacity: 0.7;
}

.pipeline-board-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.pipeline-board-card-person {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pipeline-board-card-person strong,
.pipeline-board-card-person span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-board-card-person strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.pipeline-board-card-person span,
.pipeline-board-card-meta {
  color: var(--muted);
  font-size: 0.76rem;
}

.pipeline-board-card .pipeline-lead-action-trigger {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
}

.pipeline-board-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.pipeline-board-card-tags .pipeline-lead-tag {
  max-width: 100%;
  padding: 4px 7px 4px 4px;
  font-size: 0.7rem;
}

.pipeline-board-card-tags .pipeline-lead-tag > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-board-card-tags .pipeline-lead-tag-icon {
  width: 20px;
  height: 20px;
}

.pipeline-board-more-tags {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.08);
  color: var(--accent-deep);
  font-size: 0.7rem;
  font-weight: 700;
}

.pipeline-board-card-meta {
  display: grid;
  gap: 2px;
  line-height: 1.35;
}

.pipeline-board-saving-label {
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 700;
}

.cerebro-toast-action {
  width: auto;
  min-width: 0;
  min-height: 34px;
  margin: 0 0 0 auto;
  padding: 5px 12px;
  border: 1px solid rgba(239, 22, 101, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: none;
}

.goal-widget {
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 190, 27, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(252, 252, 253, 0.97));
}

.company-goal-widget {
  background:
    radial-gradient(circle at top left, rgba(239, 22, 101, 0.14), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(252, 252, 250, 0.97));
  min-width: 0;
}

.goal-overview-grid .goal-widget,
.goal-overview-grid .company-goal-widget {
  min-width: 0;
}

.sales-insights-widget {
  padding: 22px;
  background:
    radial-gradient(circle at bottom right, rgba(255, 190, 27, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(252, 252, 253, 0.97));
}

.sales-funnel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.sales-funnel-meta {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.sales-funnel-visual {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.sales-funnel-segment-wrap {
  display: flex;
  justify-content: center;
}

.sales-funnel-segment {
  width: calc(var(--segment-width, 0.5) * 100%);
  min-height: 64px;
  padding: 12px 18px 14px;
  display: grid;
  place-items: center;
  text-align: center;
  clip-path: polygon(0 0, 100% 0, 93% 100%, 7% 100%);
  background: linear-gradient(90deg, rgba(239, 22, 101, 0.2), rgba(255, 190, 27, 0.24));
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.sales-funnel-segment.is-empty {
  background: linear-gradient(90deg, rgba(129, 112, 121, 0.08), rgba(129, 112, 121, 0.04));
}

.sales-funnel-segment-copy {
  display: grid;
  gap: 1px;
  justify-items: center;
}

.sales-funnel-segment-copy strong {
  font-size: 0.98rem;
  line-height: 1.1;
}

.sales-funnel-segment-copy span {
  color: var(--muted);
  font-size: 0.8rem;
}

.sales-funnel-empty {
  padding: 20px 18px;
  border-radius: 22px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
}

.past-sales-widget {
  padding: 22px;
  background:
    radial-gradient(circle at top left, rgba(239, 22, 101, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(252, 252, 253, 0.97));
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.past-sales-widget:hover,
.past-sales-widget:focus-visible {
  transform: translateY(-3px);
}

.dnc-widget {
  padding: 22px;
  background:
    radial-gradient(circle at top left, rgba(176, 42, 55, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255, 251, 252, 0.98), rgba(255, 243, 244, 0.96));
}

.dnc-widget-compact {
  padding: 18px;
}

.dnc-widget-preview {
  display: grid;
  gap: 12px;
}

.dnc-widget-compact .dnc-widget-preview {
  gap: 10px;
}

.dnc-preview-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  border: 1px solid rgba(176, 42, 55, 0.1);
  background: rgba(255, 255, 255, 0.92);
}

.dnc-widget-compact .dnc-preview-item {
  padding: 14px 16px;
}

.dnc-preview-item strong,
.dnc-preview-item small {
  display: block;
}

.dnc-widget-actions .module-action-button {
  width: 100%;
}

.dnc-widget-compact .dnc-widget-actions {
  margin-top: 14px;
}

.dnc-widget-compact .dnc-widget-actions .module-action-button {
  min-height: 52px;
  padding: 14px 18px;
  font-size: 1rem;
}

.members-filter-group {
  margin-top: 4px;
}

.members-filter-buttons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.members-sales-head {
  margin-top: 18px;
}

.past-sales-preview {
  display: grid;
  gap: 12px;
}

.past-sales-chart-card {
  display: grid;
  gap: 14px;
  width: 100%;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(239, 22, 101, 0.08);
  background:
    radial-gradient(circle at top left, rgba(239, 22, 101, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 248, 251, 0.94), rgba(255, 253, 247, 0.9));
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.past-sales-chart-card:hover,
.past-sales-chart-card:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(116, 16, 59, 0.12);
}

.past-sales-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.past-sales-chart-head strong,
.past-sales-chart-head small {
  display: block;
}

.past-sales-chart-head small {
  margin-top: 4px;
  color: var(--muted);
}

.past-sales-line-shell {
  display: grid;
  gap: 10px;
  position: relative;
}

.past-sales-line-chart {
  width: 100%;
  height: auto;
  display: block;
}

.past-sales-line-shell-expanded {
  gap: 14px;
  padding-top: 8px;
}

.past-sales-line-chart-expanded {
  min-height: 320px;
}

.past-sales-grid-line {
  stroke: rgba(239, 22, 101, 0.1);
  stroke-width: 1;
}

.past-sales-area {
  fill: rgba(239, 22, 101, 0.1);
}

.past-sales-line {
  fill: none;
  stroke: url(#pastSalesLineGradient);
  stroke: #ef1665;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 10px 18px rgba(117, 18, 59, 0.08));
}

.past-sales-point {
  fill: #ff9b2f;
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 3;
}

.past-sales-axis-label {
  fill: rgba(92, 81, 97, 0.86);
  font-size: 12px;
  font-weight: 700;
}

.past-sales-y-axis-label {
  fill: rgba(92, 81, 97, 0.8);
  font-size: 11px;
  font-weight: 700;
}

.past-sales-chart-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.past-sales-chart-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  background: linear-gradient(135deg, #ef1665, #ff9b2f);
}

.past-sales-chart-tooltip {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  gap: 2px;
  min-width: 140px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(239, 22, 101, 0.16);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 34px rgba(116, 16, 59, 0.18);
  transform: translate(-50%, -100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
  z-index: 2;
}

.past-sales-chart-tooltip.is-visible {
  opacity: 1;
}

.past-sales-chart-tooltip strong,
.past-sales-chart-tooltip span {
  display: block;
  white-space: nowrap;
}

.past-sales-chart-tooltip strong {
  font-size: 0.92rem;
}

.past-sales-chart-tooltip span {
  color: var(--muted);
  font-size: 0.86rem;
}

.past-sales-expanded {
  display: grid;
  gap: 16px;
}

.past-sales-expanded-modal {
  width: min(1120px, calc(calc(100 * var(--vw)) - 32px));
}

.past-sales-expanded-modal-body {
  display: grid;
  gap: 18px;
}

.past-sales-chart-card-expanded {
  gap: 18px;
}

.past-sales-toolbar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.past-sales-toolbar label {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.past-sales-list {
  margin-top: 0;
}

.past-sales-modal-search {
  margin-top: -4px;
}

.pipeline-segment-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(170px, 0.85fr));
  gap: 14px;
  align-items: end;
}

.pipeline-segment-toolbar-inline {
  grid-template-columns: minmax(0, 1.8fr) repeat(2, minmax(150px, 0.8fr));
}

.pipeline-segment-toolbar label {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.company-events-widget {
  padding: 20px;
  background:
    radial-gradient(circle at bottom left, rgba(239, 22, 101, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(255, 251, 246, 0.98), rgba(255, 245, 238, 0.96));
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.company-events-widget:hover,
.company-events-widget:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 22px 38px rgba(116, 16, 59, 0.16);
  border-color: rgba(239, 22, 101, 0.22);
}

.company-events-widget:focus-visible {
  outline: none;
}

.company-events-photo {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  margin-top: 14px;
  box-shadow: 0 14px 28px rgba(116, 16, 59, 0.12);
}

.company-events-copy {
  margin-top: 14px;
  display: grid;
  gap: 6px;
}

.company-events-copy strong {
  font-size: 1.35rem;
  line-height: 1.15;
}

.company-events-copy div,
.company-events-copy small {
  color: var(--muted);
  line-height: 1.45;
}

.goal-mode-switcher {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
  align-items: center;
}

.goal-mode-button {
  width: auto;
  min-width: 0;
  padding: 10px 16px;
  margin-top: 0;
  border-radius: 999px;
  border: 1px solid rgba(239, 22, 101, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-deep);
  box-shadow: none;
}

.goal-mode-button.is-active {
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.12), rgba(255, 190, 27, 0.16));
  border-color: rgba(239, 22, 101, 0.2);
  color: var(--accent-deep);
}

.widget-preview {
  margin-top: 16px;
}

.goal-widget-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.goal-widget-progress-copy span {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
}

.goal-widget-focus {
  display: grid;
  justify-items: center;
  gap: 18px;
  margin-top: 14px;
}

.goal-widget-speedometer {
  --goal-progress: 0;
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 2 / 1;
}

.goal-widget-speedometer-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.goal-widget-speedometer-track,
.goal-widget-speedometer-progress {
  fill: none;
  stroke-width: 30;
}

.goal-widget-speedometer-track {
  stroke: rgba(17, 17, 17, 0.08);
}

.goal-widget-speedometer-progress {
  stroke: url(#goalWidgetSpeedometerGradient);
  stroke-linecap: butt;
  stroke-dasharray: calc(var(--goal-progress) * 1) 100;
}

.goal-widget-speedometer-needle-wrap {
  transition: transform 180ms ease;
}

.goal-widget-speedometer-needle-line {
  stroke: rgba(17, 17, 17, 0.78);
  stroke-width: 5;
  stroke-linecap: round;
}

.goal-widget-speedometer-needle-dot {
  fill: rgba(17, 17, 17, 0.92);
}

.goal-widget-speedometer-center {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
  z-index: 1;
}

.goal-widget-speedometer-center span {
  display: block;
  font-size: 0.92rem;
  color: var(--muted);
}

.goal-widget-speedometer-center strong {
  display: block;
  font-size: clamp(4rem, calc(8 * var(--vw)), 6rem);
  line-height: 0.9;
}

.goal-widget-speedometer::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 22px;
  height: 22px;
  transform: translate(-50%, 50%);
  border-radius: 999px;
  background: linear-gradient(135deg, #ef1665, #ffbe1b);
  box-shadow: 0 10px 20px rgba(239, 22, 101, 0.22);
}

.goal-widget-progress-copy {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

.goal-widget-progress-copy strong {
  display: block;
  font-size: 2.3rem;
  line-height: 1;
}

.goal-widget-progress-copy small {
  color: var(--muted);
}

.goal-progress-track {
  width: 100%;
  height: 18px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.08);
  overflow: hidden;
}

.goal-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  box-shadow: 0 10px 24px rgba(239, 22, 101, 0.18);
  transition: width 180ms ease;
}

.company-goal-hero {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.4fr);
  gap: 24px;
  align-items: center;
}

.company-goal-preview {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 252, 250, 0.96));
}

.company-goal-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.company-goal-preview-head strong {
  font-size: 0.98rem;
}

.company-goal-preview-head span {
  color: var(--muted);
  font-weight: 700;
}

.company-goal-preview-track {
  height: 14px;
}

.goal-widget-edit {
  width: auto;
  min-width: 0;
  padding-inline: 16px;
  justify-self: center;
}

.goal-editor {
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 252, 253, 0.96));
}

.goal-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.goal-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.company-goal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
  margin-top: 22px;
}

.company-goal-leaderboard {
  display: grid;
  gap: 12px;
}

.company-goal-leader {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: linear-gradient(180deg, rgba(255, 251, 246, 0.98), rgba(255, 243, 232, 0.96));
}

.company-goal-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.14), rgba(255, 190, 27, 0.28));
  color: var(--ink);
  font-weight: 700;
}

.company-goal-leader strong,
.company-goal-leader small {
  display: block;
}

.company-goal-leader small {
  margin-top: 4px;
  color: var(--muted);
}

.company-goal-admin {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: linear-gradient(180deg, rgba(255, 250, 252, 0.98), rgba(255, 244, 247, 0.96));
}

.company-goal-editor-grid {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 760px) {
  .goal-widget-speedometer {
    width: min(100%, 420px);
  }

  .goal-widget-speedometer-center {
    bottom: 12px;
  }

  .goal-widget-progress-copy strong {
    font-size: 2rem;
  }
}

.upcoming-task-list,
.upcoming-tasks-list {
  display: grid;
  gap: 0;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
  margin-inline: -22px;
}

.upcoming-task-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 16px 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.upcoming-task-item + .upcoming-task-item {
  border-top: 1px solid rgba(228, 206, 217, 0.24);
}

.upcoming-task-item:has(.pipeline-lead-action-popover:not(.hidden)) {
  position: relative;
  z-index: 20;
}

.upcoming-task-content {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  box-shadow: none;
}

.upcoming-task-content:hover {
  transform: none;
  opacity: 1;
}

.upcoming-task-item strong,
.upcoming-task-item small {
  display: block;
}

.upcoming-task-item small {
  color: var(--muted);
}

.sidebar-task-check {
  margin-top: 2px;
}

.sidebar-task-date-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.sidebar-task-date-row .upcoming-task-pill {
  flex: 0 0 auto;
}

.sidebar-task-tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.sidebar-task-tag-list .sidebar-task-teammate-tag {
  min-height: 29px;
  max-width: 100%;
  padding: 3px 8px 3px 4px;
  font-size: 0.72rem;
  cursor: pointer;
}

.sidebar-task-tag-list .sidebar-task-patient-tag {
  min-height: 29px;
  max-width: 100%;
  padding: 3px 8px 3px 4px;
  font-size: 0.72rem;
  cursor: pointer;
}

.sidebar-task-tag-list .sidebar-task-teammate-tag:hover,
.sidebar-task-tag-list .sidebar-task-teammate-tag:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 62%, #fff);
  background: color-mix(in srgb, var(--accent) 16%, #fff);
  color: var(--accent-deep);
}

.sidebar-task-tag-list .sidebar-task-patient-tag:hover,
.sidebar-task-tag-list .sidebar-task-patient-tag:focus-visible {
  border-color: color-mix(in srgb, var(--gold) 62%, #fff);
  background: color-mix(in srgb, var(--gold) 16%, #fff);
  color: #9a6000;
}

.sidebar-task-patient-tag-loading {
  width: 72px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(154, 96, 0, 0.12) 20%, rgba(154, 96, 0, 0.32) 50%, rgba(154, 96, 0, 0.12) 80%);
  background-size: 220% 100%;
  animation: sidebar-task-patient-tag-shimmer 1.1s ease-in-out infinite;
}

@keyframes sidebar-task-patient-tag-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-task-patient-tag-loading {
    animation: none;
  }
}

.sidebar-task-tag-list .patient-descriptive-tag-icon {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.sidebar-task-tag-list .patient-descriptive-tag-icon svg {
  width: 11px;
  height: 11px;
}

.sidebar-task-tag-list .tagged-patient-chip-icon {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.sidebar-task-tag-list .tagged-patient-chip-icon svg {
  width: 11px;
  height: 11px;
}

.sidebar-task-action-menu {
  grid-column: 3;
  grid-row: 1;
  align-self: start;
  justify-self: end;
}

.sidebar-task-action-popover {
  transition: width 140ms ease;
}

.sidebar-task-action-popover.has-patient-list {
  width: min(240px, calc(calc(100 * var(--vw)) - 40px));
}

.sidebar-task-patients-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-task-patient-options {
  display: grid;
  gap: 2px;
  margin: 2px 0 5px;
  padding: 5px 0;
  border-top: 1px solid rgba(17, 17, 17, 0.07);
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
}

.sidebar-task-patient-options button {
  overflow: hidden;
  color: var(--accent-deep);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-task-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.upcoming-task-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.1);
  color: var(--accent-deep);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.upcoming-task-message-link {
  grid-column: 2;
  justify-self: start;
  margin-top: 4px;
}

.upcoming-task-inline-actions {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.upcoming-task-inline-action {
  width: 100%;
  min-width: 0;
}

.upcoming-task-inline-actions .upcoming-task-message-link {
  grid-column: auto;
  justify-self: stretch;
  margin-top: 0;
}

.upcoming-task-actions {
  grid-column: 2;
  justify-self: start;
}

.upcoming-task-pill.is-overdue {
  background: rgba(198, 39, 63, 0.12);
  color: #9b1c31;
}

.upcoming-task-empty {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(17, 17, 17, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.sidebar-message-list,
.sidebar-calendar-list,
.sidebar-calls-list {
  display: grid;
  gap: 12px;
}

.sidebar-message-list {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  gap: 0;
  margin-inline: 0;
  padding: 0 0 0 4px;
  align-content: start;
}

.sidebar-calendar-list {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.sidebar-calls-list {
  min-height: 0;
  height: 100%;
  align-content: start;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
  margin-inline: -22px;
}

.sidebar-message-item {
  position: relative;
  width: 100%;
  padding: 14px 12px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: inherit;
  text-decoration: none;
  text-align: left;
  appearance: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  box-shadow: none;
  transition: background 140ms ease;
}

.sidebar-message-unread-dot {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef1665, #c70f7e);
  box-shadow: 0 0 0 3px rgba(255, 248, 252, 0.96), 0 6px 14px rgba(161, 18, 86, 0.24);
}

.sidebar-message-item:hover {
  background: rgba(239, 22, 101, 0.045);
}

.sidebar-message-item:visited {
  color: inherit;
  text-decoration: none;
}

.sidebar-message-item + .sidebar-message-item {
  border-top: 1px solid rgba(228, 206, 217, 0.24);
}

.sidebar-message-item .message-avatar {
  width: 44px;
  height: 44px;
  font-size: 1rem;
}

.sidebar-message-preview {
  color: var(--muted);
}

.sidebar-messages-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 6px;
}

.sidebar-messages-pagination span {
  flex: 1;
  text-align: center;
}

.sidebar-message-page-arrow {
  width: auto;
  height: 36px;
  min-width: 96px;
  padding: 0 16px;
  margin-top: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.16);
  box-shadow: none;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
}

.sidebar-message-page-arrow:hover,
.sidebar-message-page-arrow:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 248, 252, 0.98);
  color: var(--accent-deep);
  border-color: rgba(239, 22, 101, 0.28);
  box-shadow: 0 8px 18px rgba(116, 16, 59, 0.08);
}

.sidebar-message-page-arrow:disabled {
  opacity: 0.32;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.sidebar-message-list-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.sidebar-search-field {
  display: block;
}

.sidebar-search-field input {
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: none;
}

.sidebar-search-field input:focus-visible,
.sidebar-search-field input:hover {
  border-color: rgba(239, 22, 101, 0.18);
  background: rgba(255, 248, 252, 0.98);
}

.sidebar-message-detail-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 14px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  padding-top: 6px;
  padding-bottom: 0;
}

#sidebarMessageDetailView {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.sidebar-message-composer-region {
  display: grid;
  gap: 14px;
  min-height: 0;
  align-self: end;
}

.sidebar-message-detail-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
}

.sidebar-message-detail-title {
  display: block;
  color: var(--ink);
  font-size: 1.55rem;
  line-height: 1.1;
}

.sidebar-message-back {
  width: auto;
  height: auto;
  min-width: 0;
  padding: 0 4px 0 0;
  margin-top: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--accent-deep);
  border: 0;
  box-shadow: none;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  appearance: none;
}

.sidebar-message-thread-summary {
  display: grid;
  gap: 2px;
  padding: 0 2px 0 30px;
}

.sidebar-message-thread-summary small {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.sidebar-message-channel-row {
  display: flex;
  justify-content: flex-start;
  padding: 0 2px 0 30px;
}

.sidebar-message-thread-shell {
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: linear-gradient(180deg, rgba(255, 252, 253, 0.98), rgba(255, 246, 249, 0.96));
}

.sidebar-message-thread-shell .messaging-thread-header-main {
  gap: 10px;
}

.sidebar-message-thread-shell h3 {
  margin: 0 0 2px;
  font-size: 0.98rem;
  line-height: 1.05;
}

.sidebar-message-thread-shell .messaging-thread-meta {
  font-size: 0.82rem;
  line-height: 1.2;
}

.sidebar-message-thread-avatar {
  width: 56px;
  height: 56px;
  font-size: 1rem;
}

.messaging-conversation.sidebar-message-conversation {
  min-height: 0;
  max-height: none;
  width: 100%;
  overflow: auto;
  padding: 8px 4px 18px 0;
  margin-bottom: 0;
  scroll-padding-bottom: 18px;
}

.sidebar-message-conversation .message-bubble {
  max-width: 88%;
}

.sidebar-message-conversation .message-bubble-shell {
  position: relative;
  max-width: 88%;
  overflow: visible;
}

.sidebar-message-conversation .message-bubble-shell.outbound {
  margin-left: auto;
}

.sidebar-message-conversation .message-bubble-shell.inbound {
  margin-right: auto;
}

.sidebar-message-conversation .message-bubble-shell .message-bubble {
  max-width: 100%;
}

.sidebar-message-conversation .message-bubble-actions {
  display: none;
  top: calc(100% + 6px);
  transform: scale(0.98);
  z-index: 20;
}

.sidebar-message-conversation .message-bubble.inbound .message-bubble-actions {
  left: 0;
}

.sidebar-message-conversation .message-bubble.outbound .message-bubble-actions {
  right: 0;
}

.sidebar-message-conversation .message-bubble-shell.is-actions-open .message-bubble-actions {
  display: flex;
  transform: scale(1);
}

.sidebar-message-conversation .message-call-card,
.sidebar-message-conversation .message-internal-notes,
.sidebar-message-conversation .message-thread-internal-notes {
  max-width: 100%;
}

.sidebar-message-composer {
  padding: 0 0 max(0px, env(safe-area-inset-bottom));
  margin-top: 0;
  position: relative;
  z-index: 1;
  gap: 6px;
  align-self: end;
}

.sidebar-message-composer#sharedSidebarMessageComposerForm {
  width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin-top: 0;
}

.sidebar-message-composer#sharedSidebarMessageComposerForm .messaging-composer-label {
  width: 100%;
  gap: 0;
}

.sidebar-message-composer#sharedSidebarMessageComposerForm .messaging-composer-row {
  width: 100%;
  align-items: center;
}

.sidebar-message-composer#sharedSidebarMessageComposerForm textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  max-height: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  resize: none;
  overflow-y: hidden;
}

.sidebar-message-composer#sharedSidebarMessageComposerForm .messaging-send-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  box-shadow: 0 12px 20px rgba(217, 14, 87, 0.16);
}

.sidebar-message-composer#sharedSidebarMessageComposerForm .messaging-send-button img {
  width: 20px;
  height: 20px;
}

.sidebar-message-composer#sharedSidebarMessageComposerForm .status-box {
  margin: 0;
}

.sidebar-message-composer .team-message-composer-field {
  width: 100%;
}

.sidebar-message-composer .team-message-composer-inputs {
  gap: 6px;
}

.sidebar-message-composer .team-message-attachment-button {
  color: #fff;
}

.sidebar-message-composer .team-message-attachment-button svg {
  width: 18px;
  height: 18px;
  display: block;
}

.messaging-send-button .send-icon {
  width: 24px;
  height: 24px;
  display: block;
}

.sidebar-message-composer .team-message-composer-status {
  min-height: 0;
  padding: 0;
}

.sidebar-message-composer .team-message-composer-status:empty {
  display: none;
}

.sidebar-phone-layout {
  min-height: 0;
  height: 100%;
  max-height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
}

.right-sidebar-tab.has-active-call {
  position: relative;
  color: var(--accent-deep);
  border-color: rgba(239, 22, 101, 0.34);
  box-shadow: 0 0 0 4px rgba(239, 22, 101, 0.08);
}

.right-sidebar-tab.has-active-call::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ef1665;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.96);
  animation: sidebar-active-call-pulse 1.4s ease-in-out infinite;
}

.sidebar-active-call-view {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 4px;
}

.sidebar-active-call-hero {
  width: 100%;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.1), rgba(255, 190, 27, 0.18));
  border: 1px solid rgba(239, 22, 101, 0.14);
  cursor: pointer;
}

.sidebar-active-call-hero:focus-visible {
  outline: 3px solid rgba(239, 22, 101, 0.24);
  outline-offset: 3px;
}

.sidebar-active-call-hero:disabled {
  cursor: default;
  opacity: 1;
}

.sidebar-active-call-avatar {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ef1665;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(116, 16, 59, 0.18);
}

.sidebar-active-call-copy {
  min-width: 0;
}

.sidebar-active-call-name,
.sidebar-active-call-phone {
  display: block;
  margin: 0;
}

.sidebar-active-call-name {
  margin-top: 4px;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.sidebar-active-call-phone {
  margin-top: 3px;
  color: var(--muted);
}

.sidebar-active-call-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-active-call-live i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef1665;
  animation: sidebar-active-call-pulse 1.4s ease-in-out infinite;
}

.sidebar-active-call-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(228, 206, 217, 0.36);
}

.sidebar-active-call-status span,
.sidebar-active-call-status strong {
  display: block;
}

.sidebar-active-call-status span {
  color: var(--muted);
  font-size: 0.82rem;
}

.sidebar-active-call-status time {
  color: var(--accent-deep);
  font-size: 1.35rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.sidebar-active-call-record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-active-call-record-head span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-active-call-record-head strong {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.09);
  color: var(--accent-deep);
  font-size: 0.76rem;
  text-align: right;
}

.sidebar-active-call-details {
  display: grid;
  gap: 0;
  margin: 0;
}

.sidebar-active-call-details div {
  display: grid;
  grid-template-columns: minmax(90px, 0.7fr) minmax(0, 1.3fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(228, 206, 217, 0.28);
}

.sidebar-active-call-details dt,
.sidebar-active-call-details dd {
  margin: 0;
}

.sidebar-active-call-details dt {
  color: var(--muted);
}

.sidebar-active-call-details dd {
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.sidebar-active-call-notes,
.sidebar-active-call-unknown,
.sidebar-active-call-loading {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(17, 17, 17, 0.07);
  background: rgba(255, 249, 252, 0.78);
}

.sidebar-active-call-tags .patient-descriptive-tag {
  cursor: default;
}

.sidebar-active-call-tags,
.sidebar-active-call-tag-list {
  width: 100%;
}

.sidebar-active-call-tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
}

.sidebar-active-call-notes span {
  color: var(--muted);
  font-size: 0.82rem;
}

.sidebar-active-call-notes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-active-call-notes-head button,
.sidebar-active-call-note-actions button {
  width: auto;
  min-width: 0;
  margin: 0;
  box-shadow: none;
}

.sidebar-active-call-notes-head button {
  padding: 7px 11px;
  border: 1px solid rgba(239, 22, 101, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-deep);
  font-size: 0.76rem;
}

.sidebar-active-call-notes textarea {
  width: 100%;
  min-height: 112px;
  margin-top: 10px;
  padding: 11px 12px;
  resize: vertical;
  border: 1px solid rgba(239, 22, 101, 0.16);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  line-height: 1.4;
}

.sidebar-active-call-note-feedback {
  min-height: 18px;
  margin-top: 5px;
  color: var(--accent-deep);
  font-size: 0.74rem;
}

.sidebar-active-call-note-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 7px;
}

.sidebar-active-call-note-actions button {
  padding: 9px 10px;
  border-radius: 12px;
}

.sidebar-active-call-note-actions button:first-child {
  border: 1px solid rgba(239, 22, 101, 0.18);
  background: #fff;
  color: var(--accent-deep);
}

.sidebar-active-call-note-actions button:last-child {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.sidebar-active-call-notes p,
.sidebar-active-call-unknown p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.sidebar-active-call-notes p {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-active-call-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}

.sidebar-active-call-triage {
  background: #fff;
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.22);
}

.sidebar-active-call-hangup {
  background: #ef1665;
  color: #fff;
  border: 1px solid rgba(239, 22, 101, 0.18);
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
}

@keyframes sidebar-active-call-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.86); }
  50% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .right-sidebar-tab.has-active-call::after,
  .sidebar-active-call-live i {
    animation: none;
  }
}

.sidebar-call-card {
  display: grid;
  gap: 10px;
  padding: 16px 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.sidebar-call-card + .sidebar-call-card {
  border-top: 1px solid rgba(228, 206, 217, 0.24);
}

.sidebar-call-card:has(.pipeline-lead-action-popover:not(.hidden)) {
  position: relative;
  z-index: 20;
}

.sidebar-call-card strong,
.sidebar-call-card small {
  display: block;
}

.sidebar-call-card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.9fr);
  align-items: start;
  gap: 18px;
}

.sidebar-call-card-main {
  display: grid;
  justify-items: start;
  min-width: 0;
  gap: 5px;
}

.sidebar-call-direction-pill {
  margin-bottom: 2px;
}

.sidebar-call-card-aside {
  display: grid;
  justify-items: end;
  gap: 12px;
  min-width: 0;
}

.sidebar-call-card-menu {
  position: relative;
  z-index: 2;
}

.sidebar-call-tag-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.sidebar-call-tag-list .patient-descriptive-tag {
  min-height: 29px;
  max-width: 100%;
  padding: 3px 8px 3px 4px;
  font-size: 0.72rem;
}

.sidebar-call-tag-list .patient-descriptive-tag-icon {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.sidebar-call-tag-list .patient-descriptive-tag-icon svg {
  width: 11px;
  height: 11px;
}

.sidebar-call-tag-overflow {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  min-height: 29px;
  padding: 3px 9px;
  border: 1px solid rgba(239, 22, 101, 0.2);
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.09);
  color: var(--accent-deep);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
}

.sidebar-call-tag-list [hidden] {
  display: none;
}

.sidebar-call-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-call-card-meta {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.sidebar-call-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.sidebar-dialer-toggle {
  width: auto;
  min-width: 0;
  margin-top: 0;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(239, 22, 101, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-deep);
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(116, 16, 59, 0.06);
}

.sidebar-dialer-toggle:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(239, 22, 101, 0.2);
}

.sidebar-dialer {
  display: grid;
  gap: 8px;
  padding: 10px;
  max-height: min(calc(44 * var(--vh)), 500px);
  border-radius: 16px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: linear-gradient(180deg, rgba(255, 252, 253, 0.98), rgba(255, 243, 248, 0.98));
  box-shadow: 0 10px 20px rgba(116, 16, 59, 0.06);
}

.sidebar-dialer-label {
  display: grid;
  gap: 4px;
  font-weight: 700;
}

.sidebar-dialer-label span {
  font-weight: 700;
}

.sidebar-dialer-input,
.sidebar-dialer-label input {
  text-align: center;
  letter-spacing: 0.06em;
  font-size: 1rem;
  font-weight: 700;
  min-height: 46px;
  padding: 10px 12px;
}

.sidebar-dialer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.sidebar-dialer-secondary {
  width: 100%;
  margin-top: 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(239, 22, 101, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-weight: 700;
}

.sidebar-dialer-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.sidebar-dialer-key {
  width: 100%;
  min-width: 0;
  margin-top: 0;
  min-height: 58px;
  padding: 8px 6px;
  border-radius: 14px;
  border: 1px solid rgba(239, 22, 101, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 800;
  box-shadow: 0 8px 14px rgba(116, 16, 59, 0.05);
}

.sidebar-dialer-key:hover,
.sidebar-dialer-secondary:hover {
  border-color: rgba(239, 22, 101, 0.2);
  background: rgba(255, 255, 255, 0.98);
}

.sidebar-dialer-call {
  width: 100%;
  margin-top: 0;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(239, 22, 101, 0.12);
  background: #ef1665;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
}

.sidebar-dialer-call:disabled,
.sidebar-dialer-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sidebar-patient-card-button {
  width: 100%;
  min-width: 0;
  margin-top: 0;
  padding: 10px 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.14);
  box-shadow: 0 10px 22px rgba(116, 16, 59, 0.08);
}

.sidebar-patient-card-button:hover,
.sidebar-patient-card-button:focus-visible {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(239, 22, 101, 0.2);
  box-shadow: 0 10px 22px rgba(116, 16, 59, 0.08);
}

.clinical-calls-content {
  overflow: visible;
}

.clinical-calls-dialer-rail {
  padding: 28px 22px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.42), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(252, 252, 253, 0.98) 100%);
  border-left: 1px solid rgba(17, 17, 17, 0.06);
  position: sticky;
  top: 0;
  align-self: start;
  height: calc(100 * var(--vh));
  max-height: calc(100 * var(--vh));
  min-height: calc(100 * var(--vh));
  overflow-y: auto;
  overflow-x: hidden;
}

.clinical-calls-dialer-shell {
  display: grid;
  gap: 12px;
  padding: 10px 0 18px;
  height: 100%;
  align-content: start;
}

.clinical-calls-dialer-head h3 {
  margin: 0;
}

.clinical-calls-dialer-panel {
  gap: clamp(8px, calc(1 * var(--vh)), 12px);
  padding: clamp(12px, calc(1.4 * var(--vh)), 18px);
  height: calc(calc(100 * var(--vh)) - 96px);
  max-height: calc(calc(100 * var(--vh)) - 96px);
  overflow: hidden;
  border-radius: 28px;
  border-color: rgba(239, 22, 101, 0.1);
  box-shadow: 0 18px 42px rgba(116, 16, 59, 0.08);
}

.clinical-calls-dialer-panel .sidebar-dialer-label span {
  font-size: clamp(1.4rem, calc(2.2 * var(--vh)), 1.85rem);
}

.clinical-calls-dialer-panel .sidebar-dialer-label input {
  min-height: clamp(58px, calc(8 * var(--vh)), 86px);
  font-size: clamp(0.96rem, calc(1.45 * var(--vh)), 1.1rem);
  border-radius: 28px;
}

.clinical-calls-dialer-panel .sidebar-dialer-actions {
  gap: clamp(8px, calc(1 * var(--vh)), 10px);
}

.clinical-calls-dialer-panel .sidebar-dialer-secondary {
  padding: clamp(10px, calc(1.2 * var(--vh)), 14px) 18px;
  font-size: clamp(0.9rem, calc(1.35 * var(--vh)), 0.98rem);
}

.clinical-calls-dialer-panel .sidebar-dialer-keypad {
  gap: clamp(8px, calc(1 * var(--vh)), 10px);
  flex: 1 1 auto;
  grid-auto-rows: minmax(0, 1fr);
}

.clinical-calls-dialer-panel .sidebar-dialer-key {
  min-height: clamp(64px, calc(10.2 * var(--vh)), 112px);
  border-radius: 24px;
  font-size: clamp(1.15rem, calc(2.1 * var(--vh)), 1.6rem);
  padding: clamp(8px, calc(1 * var(--vh)), 12px) 8px;
}

.clinical-calls-dialer-panel .sidebar-dialer-call {
  padding: clamp(12px, calc(1.5 * var(--vh)), 18px) 20px;
  font-size: clamp(1rem, calc(1.7 * var(--vh)), 1.3rem);
}

@media (max-height: 920px) {
  .clinical-calls-dialer-panel {
    height: calc(calc(100 * var(--vh)) - 82px);
    max-height: calc(calc(100 * var(--vh)) - 82px);
  }

  .clinical-calls-dialer-head .eyebrow {
    margin-bottom: 4px;
  }
}

@media (max-height: 780px) {
  .clinical-calls-dialer-shell {
    gap: 10px;
    padding-bottom: 12px;
  }

  .clinical-calls-dialer-panel {
    border-radius: 24px;
  }

  .clinical-calls-dialer-panel .sidebar-dialer-key {
    border-radius: 20px;
  }
}

.sidebar-call-back-button {
  padding-inline: 12px;
  border-color: rgba(239, 22, 101, 0.12);
  background: #ef1665;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
}

.sidebar-call-back-button:hover,
.sidebar-call-back-button:focus-visible {
  background: #ef1665;
  border-color: rgba(239, 22, 101, 0.12);
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
}

.sidebar-calendar-time {
  font-weight: 700;
  color: var(--accent-deep);
}

.sidebar-calendar-pill,
.sidebar-message-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar-message-pill {
  background: rgba(239, 22, 101, 0.1);
  color: var(--accent-deep);
}

.sidebar-calendar-day-view {
  display: grid;
  gap: 10px;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.sidebar-calendar-timeline {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  min-height: 832px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 248, 252, 0.96));
  border: 1px solid rgba(17, 17, 17, 0.06);
}

.sidebar-calendar-axis {
  display: grid;
  grid-template-rows: repeat(13, 64px);
  background: rgba(255, 255, 255, 0.74);
}

.sidebar-calendar-hour {
  padding: 10px 12px 0;
  border-top: 1px solid rgba(17, 17, 17, 0.06);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.1;
}

.sidebar-calendar-surface {
  position: relative;
  border-left: 1px solid rgba(17, 17, 17, 0.06);
  border-top: 1px solid rgba(17, 17, 17, 0.06);
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(17, 17, 17, 0.05) 0,
      rgba(17, 17, 17, 0.05) 1px,
      transparent 1px,
      transparent 16px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(239, 22, 101, 0.035) 0,
      rgba(239, 22, 101, 0.035) 16px,
      transparent 16px,
      transparent 64px
    );
}

.sidebar-calendar-grid {
  display: grid;
  grid-template-rows: repeat(52, 16px);
  min-height: 832px;
}

.sidebar-calendar-slot {
  padding: 0;
  margin-top: 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(17, 17, 17, 0.03);
  background: transparent;
  box-shadow: none;
  width: 100%;
  min-width: 0;
  cursor: pointer;
  transition: background 140ms ease;
}

.sidebar-calendar-slot:hover {
  background: rgba(239, 22, 101, 0.05);
}

.sidebar-calendar-events {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sidebar-calendar-event {
  position: absolute;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 18px;
  pointer-events: auto;
}

.sidebar-calendar-event-copy {
  min-width: 0;
  width: 100%;
  overflow: hidden;
}

.sidebar-calendar-event strong {
  display: block;
  max-width: 100%;
  margin-bottom: 4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.96rem;
  line-height: 1.18;
}

.sidebar-calendar-event small {
  display: block;
  color: var(--muted);
  line-height: 1.35;
}

.sidebar-calendar-marker {
  position: absolute;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 4;
}

.sidebar-calendar-marker-dot {
  position: absolute;
  left: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(239, 22, 101, 0.14);
  transform: translateY(-50%);
}

.sidebar-calendar-marker-line {
  display: block;
  width: 100%;
  border-top: 3px solid var(--accent);
  box-shadow: 0 0 16px rgba(239, 22, 101, 0.22);
}

.sidebar-calendar-empty-note {
  position: absolute;
  top: 14px;
  right: 14px;
  left: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px dashed rgba(17, 17, 17, 0.12);
  color: var(--muted);
  font-size: 0.88rem;
}

.sidebar-calendar-composer {
  width: min(560px, calc(calc(100 * var(--vw)) - 32px));
}

.sidebar-calendar-composer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 760px) {
  .sidebar-calendar-composer-grid {
    grid-template-columns: 1fr;
  }
}

body.right-sidebar-collapsed .right-sidebar {
  padding: 20px 12px;
  gap: 14px;
  align-content: start;
}

body.right-sidebar-collapsed .right-sidebar-header {
  justify-content: center;
}

body.right-sidebar-collapsed .right-sidebar-tabs {
  display: none;
}

body.right-sidebar-collapsed .right-sidebar-body {
  display: none;
}

body.right-sidebar-collapsed .right-sidebar-toggle-icon {
  transform: rotate(0deg);
}

body.right-sidebar-collapsed .right-sidebar::after {
  display: none;
}

.metric-link-card {
  text-decoration: none;
  color: inherit;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
  text-align: left;
}

.content-grid {
  grid-template-columns: minmax(0, 1.58fr) minmax(300px, 0.82fr);
  align-items: start;
}

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

.page-content .hero {
  align-items: flex-start;
}

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

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

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

.light-list li {
  color: var(--ink);
}

.wide-panel {
  grid-row: span 2;
}

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

.widget-card {
  transition: box-shadow 160ms ease, transform 160ms ease;
  cursor: pointer;
}

.widget-card:hover,
.metric-link-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 46px rgba(116, 16, 59, 0.16);
  border-color: rgba(239, 22, 101, 0.18);
}

.widget-card .section-head {
  margin-bottom: 0;
  align-items: center;
  cursor: pointer;
}

.widget-card .section-head > div {
  min-width: 0;
}

.widget-toggle {
  display: none;
}

.widget-summary {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.widget-body {
  margin-top: 16px;
}

.widget-collapsed .widget-body {
  display: none;
}

.widget-expanded .widget-summary {
  display: none;
}

.widget-overlay {
  position: fixed;
  inset: 0;
  z-index: 1450;
  opacity: 1;
  visibility: visible;
  overflow: hidden;
  overscroll-behavior: contain;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.call-triage-overlay {
  z-index: 2147483647;
  display: grid;
  place-items: start center;
  overflow: hidden;
  padding: 24px 20px;
  pointer-events: auto;
}

.call-triage-overlay.hidden {
  pointer-events: none;
}

.call-triage-overlay .widget-backdrop {
  z-index: 0;
}

.call-triage-overlay .call-triage-modal {
  z-index: 1;
  margin: 0 auto;
  width: min(1180px, calc(calc(100 * var(--vw)) - 40px));
}

.call-triage-search {
  padding: 0;
}

.call-triage-browser {
  min-height: 390px;
  margin-top: 4px;
  border-block: 1px solid var(--line);
}

.call-triage-targets,
.call-triage-groups {
  padding-top: 0;
}

.call-triage-targets button:disabled,
.call-triage-groups button:disabled {
  cursor: default;
  opacity: 0.6;
}

.call-triage-results {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: min(430px, calc(45 * var(--vh)));
}

.call-triage-browser-empty {
  padding: 18px 22px;
}

@media (max-width: 720px) {
  .call-triage-overlay {
    padding: 12px 8px;
  }

  .call-triage-overlay .call-triage-modal {
    width: min(100%, calc(calc(100 * var(--vw)) - 16px));
  }

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

  .call-triage-browser {
    min-height: 0;
  }
}

.widget-overlay.hidden {
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.widget-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(35, 8, 20, 0.46);
  backdrop-filter: blur(5px);
  transition: opacity 220ms ease;
}

.widget-modal {
  position: relative;
  width: min(980px, calc(calc(100 * var(--vw)) - 40px));
  max-height: calc(calc(100 * var(--dvh)) - 48px);
  overflow: auto;
  overflow-x: hidden;
  margin: 24px auto;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 28px 70px rgba(49, 8, 26, 0.24);
  transform: translateY(0) scale(1);
  opacity: 1;
  transition: transform 240ms ease, opacity 220ms ease;
}

.widget-overlay.hidden .widget-backdrop {
  opacity: 0;
}

.widget-overlay.hidden .widget-modal {
  transform: translateY(28px) scale(0.98);
  opacity: 0;
}

.widget-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.widget-modal-head,
.patient-card-head,
.calendar-composer-head,
.account-profile-head,
.photo-crop-head,
.team-editor-head {
  position: sticky;
  top: -24px;
  z-index: 20;
  padding: 24px 0 12px;
  margin: -24px 0 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.06);
}

.widget-modal,
.patient-card-modal,
.calendar-composer-modal,
.account-profile-modal,
.photo-crop-modal,
.team-editor-modal {
  overscroll-behavior: contain;
}

.widget-modal-close {
  width: auto;
  min-width: 92px;
}

.widget-modal-content {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.widget-modal-content .widget-body {
  margin-top: 0;
}

.leads-modal {
  width: min(1120px, calc(calc(100 * var(--vw)) - 32px));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.leads-modal-list {
  display: grid;
  gap: 14px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(calc(100 * var(--vh)) - 340px);
  padding-right: 6px;
}

.lead-modal-workspace {
  display: grid;
  gap: 18px;
  min-height: 0;
}

.lead-modal-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  min-height: 0;
}

.lead-modal-form {
  padding: 18px;
  box-shadow: none;
  background: linear-gradient(180deg, rgba(255, 250, 252, 0.98), rgba(255, 243, 247, 0.96));
  display: grid;
  gap: 12px;
  position: sticky;
  top: 0;
  align-self: start;
}

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

.lead-modal-results {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.lead-modal-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.92fr) minmax(0, 0.92fr);
  gap: 12px;
  align-items: end;
  min-width: 0;
}

.lead-modal-item {
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 250, 252, 0.98), rgba(255, 244, 247, 0.96));
  border: 1px solid rgba(17, 17, 17, 0.08);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  color: var(--ink);
}

.lead-modal-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(116, 16, 59, 0.12);
  border-color: rgba(239, 22, 101, 0.18);
  opacity: 1;
}

.lead-modal-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 0;
}

.lead-modal-head strong,
.lead-modal-head small {
  display: block;
}

.lead-modal-head strong {
  color: var(--ink);
}

.lead-modal-head small {
  color: var(--muted);
  margin-top: 2px;
  font-size: 0.92rem;
}

.pipeline-lead-tags {
  display: flex;
  flex: 1 1 360px;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 280px;
  align-self: center;
  padding: 2px 0;
}

.pipeline-lead-tag,
.pipeline-lead-tags.is-empty {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 5px 11px 5px 6px;
  border: 1px solid color-mix(in srgb, var(--pipeline-tag-color, #ef1665) 24%, white);
  border-radius: 999px;
  background: color-mix(in srgb, var(--pipeline-tag-color, #ef1665) 8%, white);
  color: color-mix(in srgb, var(--pipeline-tag-color, #ef1665) 72%, #111);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.pipeline-lead-tag-icon {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  place-items: center;
  border-radius: 50%;
  background: var(--pipeline-tag-color, #ef1665);
  color: #fff;
}

.pipeline-lead-tag-icon svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.pipeline-lead-tags.is-empty {
  flex: 0 1 auto;
  min-width: 0;
  border-style: dashed;
  color: var(--muted);
  font-weight: 600;
  opacity: 0.72;
}

@media (min-width: 901px) {
  .pipeline-segment-item .lead-modal-head {
    display: grid;
    grid-template-columns: fit-content(240px) minmax(0, 1fr) auto;
    align-items: center;
  }

  .pipeline-segment-item .lead-modal-head > div:first-child {
    min-width: 0;
  }

  .pipeline-segment-item .pipeline-lead-tags {
    width: 100%;
    min-width: 0;
    flex: none;
  }

  .pipeline-segment-item .pipeline-lead-tags.is-empty {
    width: fit-content;
    justify-self: start;
  }
}

@media (max-width: 900px) {
  .pipeline-lead-tags {
    flex-basis: 100%;
    min-width: 0;
    order: 3;
    padding-inline: 0;
  }

  .lead-modal-head > .pipeline-unassign-button,
  .lead-modal-head > .pipeline-assign-self-button {
    order: 2;
    margin-left: auto;
  }

  .lead-modal-head > .pipeline-lead-action-menu {
    order: 2;
    margin-left: auto;
  }
}

.lead-modal-search input {
  width: 100%;
}

.lead-modal-toolbar label,
.lead-modal-toolbar input,
.lead-modal-toolbar select {
  min-width: 0;
}

.lead-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.25;
}

.lead-modal-notes {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.team-group-modal {
  width: min(760px, calc(calc(100 * var(--vw)) - 32px));
}

.team-group-details-modal {
  width: min(720px, calc(calc(100 * var(--vw)) - 32px));
}

.team-group-modal-content {
  gap: 18px;
}

.team-group-details-summary {
  display: flex;
  align-items: center;
  gap: 16px;
}

.team-group-details-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.team-group-details-copy strong {
  font-size: 1.2rem;
  color: var(--ink);
}

.team-group-details-members {
  display: grid;
  gap: 12px;
}

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

.team-group-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 500;
}

.team-group-form input {
  width: 100%;
}

.team-group-selected-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.team-group-pill-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 3px 1px 7px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.team-group-filter-pill {
  width: auto;
  min-width: max-content;
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid rgba(224, 73, 130, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-deep);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
}

.team-group-filter-pill:hover,
.team-group-filter-pill:focus-visible,
.team-group-filter-pill.is-active {
  border-color: rgba(224, 73, 130, 0.5);
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.12), rgba(255, 190, 27, 0.16));
}

.team-assignment-picker {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.team-assignment-team-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.team-assignment-team-option {
  padding: 7px 11px;
  border: 1px solid rgba(228, 206, 217, 0.85);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  box-shadow: none;
}

.team-assignment-team-option:hover,
.team-assignment-team-option.is-selected {
  border-color: rgba(224, 73, 130, 0.42);
  background: rgba(255, 240, 246, 0.96);
  color: var(--accent-deep);
}

.team-group-filter-pill.is-active {
  color: #b80f53;
  box-shadow: inset 0 0 0 1px rgba(224, 73, 130, 0.08);
}

.team-group-selected-users {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  min-height: 28px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0;
}

.team-group-selected-avatar-row {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  padding-left: 4px;
}

.team-group-selected-avatar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.team-group-selected-avatar-button + .team-group-selected-avatar-button {
  margin-left: -10px;
}

.team-group-selected-avatar-button .team-group-member-chip-avatar {
  border: 2px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 20px rgba(116, 16, 59, 0.12);
}

.team-group-selected-avatar-overflow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  margin-left: -10px;
  padding: 0 10px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.96);
  background: linear-gradient(135deg, rgba(255, 241, 246, 0.98), rgba(255, 247, 228, 0.95));
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 10px 20px rgba(116, 16, 59, 0.1);
}

.team-group-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(239, 22, 101, 0.18);
  background: linear-gradient(135deg, rgba(255, 240, 245, 0.98), rgba(255, 246, 225, 0.94));
  color: var(--accent-deep);
  font: inherit;
  cursor: pointer;
}

.tagged-teammate-chip {
  width: auto;
  max-width: max-content;
  flex: 0 0 auto;
  justify-self: start;
  gap: 7px;
  min-height: 34px;
  padding: 4px 10px 4px 5px;
  border-color: color-mix(in srgb, var(--accent) 50%, #fff);
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  color: color-mix(in srgb, var(--accent) 72%, #31101f);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.tagged-teammate-chip:hover,
.tagged-teammate-chip:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 17%, #fff);
  color: var(--accent-deep);
}

.tagged-teammate-chip-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}

.tagged-teammate-chip-icon svg {
  display: block;
  width: 13px;
  height: 13px;
}

.tagged-patient-chip {
  width: auto;
  max-width: max-content;
  flex: 0 0 auto;
  justify-self: start;
  gap: 7px;
  min-height: 34px;
  padding: 4px 10px 4px 5px;
  border-color: color-mix(in srgb, var(--gold) 62%, #fff);
  background: color-mix(in srgb, var(--gold) 16%, #fff);
  color: #9a6000;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

.tagged-patient-chip:hover,
.tagged-patient-chip:focus-visible {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--gold) 22%, #fff);
  color: #754900;
}

.tagged-patient-chip-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 999px;
  background: var(--gold);
  color: #6b4500;
}

.tagged-patient-chip-icon svg {
  display: block;
  width: 13px;
  height: 13px;
}

.team-group-member-chip-avatar,
.team-group-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.92), rgba(255, 140, 40, 0.88));
  color: #fff8fb;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.team-group-member-chip-copy {
  font-weight: 600;
}

.team-group-member-chip-remove {
  font-size: 1.1rem;
  line-height: 1;
}

.team-group-member-chip-group {
  border-color: rgba(239, 22, 101, 0.16);
  background: linear-gradient(135deg, rgba(255, 243, 247, 0.98), rgba(255, 248, 234, 0.94));
}

.team-group-member-chip-badge,
.team-group-user-avatar-badge {
  background: linear-gradient(135deg, rgba(119, 24, 67, 0.94), rgba(239, 22, 101, 0.9));
  color: #fff8fb;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.message-tag-mode-toggle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
  width: 100%;
}

.message-tag-mode-button {
  width: 100%;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.96);
  color: var(--copy);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background 140ms ease, color 140ms ease;
}

.message-tag-mode-button:hover,
.message-tag-mode-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(239, 22, 101, 0.18);
  box-shadow: 0 12px 24px rgba(116, 16, 59, 0.08);
}

.message-tag-mode-button.is-active {
  border-color: rgba(239, 22, 101, 0.22);
  background: linear-gradient(135deg, rgba(255, 241, 246, 0.98), rgba(255, 247, 228, 0.94));
  color: var(--accent-deep);
}

.team-group-selected-summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
}

.team-group-member-chip-summary {
  cursor: pointer;
  pointer-events: auto;
  max-width: 220px;
  border: 1px solid rgba(239, 22, 101, 0.16);
  background: linear-gradient(135deg, rgba(255, 245, 249, 0.98), rgba(255, 238, 244, 0.95));
}

.team-group-member-chip-overflow {
  cursor: default;
  pointer-events: none;
  padding-left: 14px;
  padding-right: 14px;
  font-weight: 800;
}

.team-group-user-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.team-group-user-option {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.team-group-user-option:hover,
.team-group-user-option:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(239, 22, 101, 0.2);
  box-shadow: 0 14px 24px rgba(116, 16, 59, 0.08);
}

.team-group-user-option.is-selected {
  background: linear-gradient(135deg, rgba(255, 241, 246, 0.98), rgba(255, 247, 228, 0.95));
  border-color: rgba(239, 22, 101, 0.24);
}

.team-group-user-option.is-disabled {
  background: rgba(246, 245, 247, 0.96);
  border-color: rgba(17, 17, 17, 0.08);
  color: rgba(102, 94, 109, 0.78);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  filter: grayscale(0.12);
}

.team-group-user-option.is-disabled:hover,
.team-group-user-option.is-disabled:focus-visible {
  transform: none;
  border-color: rgba(17, 17, 17, 0.08);
  box-shadow: none;
}

.team-group-user-option.is-disabled .team-group-user-avatar {
  background: linear-gradient(180deg, rgba(177, 180, 191, 0.95), rgba(139, 144, 160, 0.95));
  color: rgba(255, 255, 255, 0.96);
}

.team-group-user-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.team-group-user-copy strong,
.team-group-user-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-group-user-copy span {
  color: var(--muted);
  font-size: 0.92rem;
}

.team-group-user-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.06);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.team-group-user-option.is-selected .team-group-user-check {
  background: rgba(239, 22, 101, 0.14);
  color: var(--accent-deep);
}

.team-group-user-option.is-disabled .team-group-user-check {
  background: rgba(17, 17, 17, 0.08);
  color: rgba(102, 94, 109, 0.82);
}

.team-group-modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.team-group-modal-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .unified-entity-tag-modal .team-group-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .unified-entity-tag-selection-summary {
    flex-basis: auto;
  }

  .unified-entity-tag-modal .team-group-modal-action-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
}

.message-tag-modal {
  width: min(760px, calc(calc(100 * var(--vw)) - 32px));
}

.message-tag-modal-content {
  display: grid;
  gap: 16px;
}

.message-tag-selected-row {
  align-items: flex-start;
}

.message-tag-modal .muted {
  line-height: 1.45;
}

.pipeline-segment-modal {
  display: grid;
  gap: 10px;
  min-height: 0;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}

.pipeline-segment-inline {
  gap: 12px;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-height: 100%;
  height: 100%;
}

.pipeline-segment-head {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: flex-start;
}

.pipeline-segment-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-height: min(calc(68 * var(--vh)), 720px);
  min-height: 0;
  padding-bottom: 8px;
  align-content: start;
  align-items: start;
}

.pipeline-segment-list-inline {
  grid-template-columns: 1fr;
  max-height: none;
  height: 100%;
  align-content: start;
}

.pipeline-segment-loading {
  min-height: 220px;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.pipeline-segment-loading-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(239, 22, 101, 0.14);
  border-top-color: var(--accent-deep);
  animation: patient-card-loading-spin 0.85s linear infinite;
}

.pipeline-segment-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  bottom: 0;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 250, 252, 0.98) 35%);
  z-index: 1;
}

.reports-audit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.reports-audit-actions .goal-mode-button {
  width: auto;
  min-width: 124px;
  margin-top: 0;
}

.reports-widget-pagination {
  position: static;
  padding-top: 4px;
  background: transparent;
}

.sales-pagination-button {
  width: auto;
  height: 42px;
  min-width: 112px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  margin-top: 0;
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.16);
  box-shadow: none;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.sales-pagination-button:hover,
.sales-pagination-button:focus-visible {
  background: rgba(255, 248, 252, 0.98);
  border-color: rgba(239, 22, 101, 0.28);
  box-shadow: 0 8px 18px rgba(116, 16, 59, 0.08);
}

.sales-pagination-button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.sales-pagination-button.is-loading {
  color: transparent;
  opacity: 1;
  position: relative;
}

.sales-pagination-button.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 248, 244, 0.34);
  border-top-color: #fff8f4;
  animation: patient-card-loading-spin 0.85s linear infinite;
}

.pipeline-segment-item {
  gap: 8px;
}

.pipeline-claim-card {
  cursor: default;
  display: grid;
  gap: 8px;
  align-content: start;
  align-self: stretch;
  grid-template-rows: auto auto 1fr auto;
  min-height: 118px;
  padding: 14px 16px;
}

.pipeline-open-card {
  cursor: pointer;
  grid-template-rows: auto auto;
  min-height: 102px;
}

.pipeline-open-card:hover,
.pipeline-open-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(62, 10, 32, 0.12);
}

.pipeline-segment-inline .pipeline-segment-list-inline {
  gap: 0;
  margin-inline: -16px;
  border-top: 1px solid rgba(17, 17, 17, 0.07);
}

.pipeline-segment-inline .pipeline-segment-item {
  min-height: 102px;
  padding: 16px;
  border: 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.pipeline-segment-inline .pipeline-segment-item:hover,
.pipeline-segment-inline .pipeline-segment-item:focus-visible {
  transform: none;
  border-color: transparent;
  background: rgba(239, 22, 101, 0.07);
  box-shadow: none;
}

.pipeline-segment-inline .pipeline-open-card:focus-visible {
  outline: 2px solid rgba(239, 22, 101, 0.28);
  outline-offset: -2px;
}

.pipeline-claim-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 2px;
}

.pipeline-claim-actions-compact {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.pipeline-claim-button,
.pipeline-claim-open {
  margin-top: 0;
}

.lead-pool-action-button {
  width: 100%;
  min-width: 0;
  padding: 12px 16px;
}

.pipeline-assign-button {
  margin-top: 0;
}

.pipeline-unassign-button {
  width: auto;
  max-width: 160px;
  min-width: 104px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(176, 42, 55, 0.18);
  background: linear-gradient(135deg, rgba(255, 230, 235, 0.96), rgba(255, 212, 220, 0.94));
  color: #b02a37;
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(176, 42, 55, 0.12);
}

.pipeline-assign-self-button {
  border-color: rgba(25, 135, 84, 0.18);
  background: linear-gradient(135deg, rgba(227, 247, 236, 0.98), rgba(207, 241, 221, 0.96));
  color: #146c43;
  box-shadow: 0 12px 24px rgba(25, 135, 84, 0.12);
}

.pipeline-unassign-button:hover,
.pipeline-unassign-button:focus-visible {
  background: linear-gradient(135deg, rgba(255, 218, 225, 0.98), rgba(255, 198, 210, 0.96));
  color: #941f2e;
  transform: translateY(-1px);
}

.pipeline-lead-action-menu {
  position: relative;
  z-index: 8;
  align-self: start;
  justify-self: end;
}

.pipeline-segment-item:has(.pipeline-lead-action-popover:not(.hidden)) {
  position: relative;
  z-index: 20;
}

.pipeline-lead-action-trigger {
  display: grid;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent-deep);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  box-shadow: none;
}

.pipeline-lead-action-trigger:hover,
.pipeline-lead-action-trigger:focus-visible,
.pipeline-lead-action-trigger[aria-expanded="true"] {
  background: transparent;
  box-shadow: none;
  color: var(--accent);
  transform: none;
}

.pipeline-lead-action-popover {
  position: absolute;
  z-index: 31;
  top: calc(100% + 7px);
  right: 0;
  width: 132px;
  padding: 6px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 16px 32px rgba(62, 10, 32, 0.16);
}

.pipeline-lead-action-popover button {
  width: 100%;
  min-height: 0;
  padding: 9px 11px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  transform: none;
}

.pipeline-lead-action-popover button:hover,
.pipeline-lead-action-popover button:focus-visible {
  background: rgba(239, 22, 101, 0.07);
  color: var(--accent-deep);
  box-shadow: none;
  transform: none;
}

.pipeline-lead-action-popover button.is-danger {
  color: #b02a37;
}

.sidebar-call-card-menu .pipeline-lead-action-popover button:disabled,
.sidebar-call-card-menu .pipeline-lead-action-popover button:disabled:hover,
.sidebar-call-card-menu .pipeline-lead-action-popover button:disabled:focus-visible,
.sidebar-task-action-menu .pipeline-lead-action-popover button:disabled,
.sidebar-task-action-menu .pipeline-lead-action-popover button:disabled:hover,
.sidebar-task-action-menu .pipeline-lead-action-popover button:disabled:focus-visible {
  background: transparent;
  color: rgba(91, 77, 84, 0.38);
  cursor: not-allowed;
}

.pipeline-lead-assignment-modal {
  width: min(760px, calc(calc(100 * var(--vw)) - 40px));
}

.pipeline-lead-assignment-form {
  display: grid;
  gap: 18px;
}

.pipeline-lead-assignment-search {
  gap: 0;
}

.pipeline-lead-assignment-search label {
  color: var(--copy);
  font-weight: 700;
}

.pipeline-lead-assignment-list {
  max-height: min(calc(52 * var(--vh)), 460px);
}

.pipeline-lead-assignment-empty {
  margin: 8px 0;
}

.pipeline-lead-assignment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.pipeline-lead-assignment-actions button {
  width: auto;
  min-width: 122px;
  margin: 0;
}

.pipeline-assign-self-button:hover,
.pipeline-assign-self-button:focus-visible {
  background: linear-gradient(135deg, rgba(214, 244, 225, 0.98), rgba(190, 235, 208, 0.96));
  color: #0f5132;
}

@media (max-width: 1180px) {
  .leads-filter-layout {
    grid-template-columns: minmax(158px, 204px) minmax(0, 1fr);
    gap: 10px;
  }

  .leads-filter-pill {
    min-height: 64px;
    padding: 9px 12px;
  }

  .leads-filter-widget-primary .leads-filter-pill {
    min-height: 66px;
    padding: 9px 0;
  }

  .leads-filter-pill span,
  .leads-filter-widget-primary .leads-filter-pill span {
    font-size: 0.92rem;
  }

  .leads-filter-pill-copy small {
    font-size: 0.73rem;
  }
}

@media (max-width: 980px) {
  .leads-filter-layout {
    grid-template-columns: 1fr;
  }

  .pipeline-board-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .pipeline-board-toolbar > .pipeline-board-search-field {
    flex-basis: auto;
    min-width: 0;
  }

  .pipeline-board-toolbar-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .pipeline-board-tag-filter {
    justify-content: flex-start;
    max-width: none;
  }

  .pipeline-kanban {
    grid-template-columns: repeat(5, minmax(216px, 1fr));
  }

  .past-sales-toolbar,
  .pipeline-segment-toolbar {
    grid-template-columns: 1fr;
  }

  .pipeline-claim-actions {
    grid-template-columns: 1fr;
  }

  .pipeline-claim-actions-compact {
    display: flex;
  }

}

@media (max-width: 760px) {
  .leads-filter-buttons {
    grid-template-columns: 1fr;
  }

  .pipeline-segment-list {
    grid-template-columns: 1fr;
  }
}

.create-lead-modal {
  width: min(880px, calc(calc(100 * var(--vw)) - 40px));
}

.hint-member-link-modal {
  display: flex;
  flex-direction: column;
  width: min(1180px, calc(calc(100 * var(--vw)) - 32px));
  height: min(900px, calc(calc(100 * var(--dvh)) - 48px));
  max-height: calc(calc(100 * var(--dvh)) - 48px);
  padding: 0;
  overflow: hidden;
}

#hintMemberLinkOverlay {
  z-index: 1615;
}

.create-lead-modal-form {
  max-width: 100%;
  position: static;
}

.hint-member-link-modal-body {
  display: grid;
  gap: 16px;
}

.hint-member-link-modal > .widget-modal-head {
  position: relative;
  top: auto;
  z-index: 4;
  flex: 0 0 auto;
  margin: 0;
  padding: 24px;
}

.hint-member-link-modal > .widget-modal-head h2,
.hint-member-link-modal > .widget-modal-head p {
  margin: 0;
}

.hint-member-link-modal > .widget-modal-head h2 {
  margin-top: 4px;
}

.hint-member-link-modal > .widget-modal-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.hint-member-link-master-detail-form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

.hint-member-link-master-detail {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hint-member-link-master {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px 0;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(255, 249, 251, 0.72);
}

.hint-member-link-master button {
  position: relative;
  display: grid;
  align-content: center;
  gap: 5px;
  width: 100%;
  min-height: 82px;
  margin: 0;
  padding: 15px 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  text-align: left;
  font: inherit;
}

.hint-member-link-master button:hover,
.hint-member-link-master button:focus-visible {
  background: rgba(239, 22, 101, 0.04);
  box-shadow: none;
  transform: none;
}

.hint-member-link-master button.is-active {
  background: linear-gradient(90deg, rgba(239, 22, 101, 0.09), rgba(239, 22, 101, 0.025));
  color: var(--accent-deep);
}

.hint-member-link-master button.is-active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
}

.hint-member-link-master button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.hint-member-link-master button > span {
  font-weight: 800;
}

.hint-member-link-master button > small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hint-member-link-detail-pane {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
}

.hint-member-link-detail {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 26px 30px 32px;
}

.hint-member-link-detail-head {
  display: grid;
  gap: 7px;
}

.hint-member-link-detail-head > * {
  margin: 0;
}

.hint-member-link-detail-head h3 {
  font-size: 1.45rem;
}

.hint-member-link-detail-head > p:last-child {
  color: var(--muted);
}

.hint-member-link-search {
  margin: 0;
}

.create-lead-event-results {
  grid-template-columns: 1fr;
  gap: 10px;
  max-height: 260px;
  margin-top: 10px;
}

.create-lead-event-item {
  border: 1px solid rgba(255, 187, 209, 0.9);
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.12), rgba(255, 190, 27, 0.18));
  color: #6f5260;
  box-shadow: 0 10px 24px rgba(116, 16, 59, 0.08);
}

.create-lead-event-item .lead-modal-head strong {
  color: #24161d;
}

.create-lead-event-item .lead-modal-meta {
  color: #6f5260;
}

.create-lead-event-item:hover,
.create-lead-event-item:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(116, 16, 59, 0.12);
}

.create-lead-event-item.is-selected {
  border-color: rgba(255, 187, 209, 0.9);
  background: linear-gradient(135deg, #ef1665, #ffbe1b);
  color: #fff;
  box-shadow: 0 16px 32px rgba(239, 22, 101, 0.22);
}

.create-lead-event-item.is-selected .lead-modal-head strong,
.create-lead-event-item.is-selected .lead-modal-meta {
  color: #fff;
}

.create-lead-event-empty {
  cursor: default;
}

.hint-member-link-list {
  display: grid;
  gap: 12px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.hint-member-link-item small:last-child {
  text-align: right;
}

.hint-member-link-item.is-selected {
  border-color: rgba(239, 22, 101, 0.32);
  background: linear-gradient(90deg, rgba(239, 22, 101, 0.08), rgba(255, 248, 228, 0.34));
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.08);
}

.hint-member-link-item.is-selected .lead-modal-head > small {
  color: var(--accent-deep);
  font-weight: 800;
}

.hint-member-link-membership-section {
  margin-top: 2px;
}

.hint-member-link-selected {
  cursor: default;
}

.hint-member-link-selected:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(17, 17, 17, 0.08);
}

.hint-member-link-form {
  gap: 18px;
}

.hint-member-link-steps {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hint-member-link-step {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(70, 43, 56, 0.08);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.hint-member-link-step.is-active {
  background: rgba(239, 22, 101, 0.14);
  color: var(--accent-deep);
}

.hint-member-link-step.is-complete {
  background: rgba(37, 164, 92, 0.14);
  color: #1f7e4f;
}

.hint-member-link-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 250, 246, 0.88);
}

.hint-member-link-section-ecw {
  min-height: 0;
}

.hint-member-link-section-muted {
  background: rgba(255, 244, 247, 0.7);
}

.hint-member-link-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.hint-member-link-section-head h3 {
  margin: 0;
}

.hint-member-link-ecw-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: 16px;
  align-items: center;
}

.hint-member-link-ecw-button {
  min-height: 128px;
  align-self: stretch;
  justify-content: center;
  padding: 14px 12px;
  text-align: center;
  text-decoration: none;
}

.hint-member-link-ecw-button:hover,
.hint-member-link-ecw-button:focus-visible {
  transform: translateY(-2px);
}

.hint-member-link-ecw-content {
  justify-content: center;
  gap: 8px;
  flex-direction: column;
}

.hint-member-link-ecw-logo {
  order: 1;
  width: 88px;
  max-width: none;
  height: 88px;
  border-radius: 20px;
}

.hint-member-link-ecw-label {
  order: 2;
  justify-content: center;
  text-align: center;
  font-size: 0.95rem;
}

.hint-member-link-section-ecw .hint-member-link-checklist {
  min-width: 0;
}

@media (max-width: 900px) {
  .hint-member-link-ecw-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .hint-member-link-ecw-button {
    min-height: 116px;
  }
}

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

.hint-member-link-grid-span-2 {
  grid-column: 1 / -1;
}

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

.hint-member-link-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  text-align: left;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

.hint-member-link-choice strong,
.hint-member-link-choice span {
  width: auto;
}

.hint-member-link-choice strong,
.hint-member-link-choice span {
  grid-column: 1;
}

.hint-member-link-choice span {
  color: var(--muted);
  font-weight: 500;
}

.hint-member-link-choice.is-active {
  border-color: rgba(239, 22, 101, 0.24);
  background: linear-gradient(135deg, rgba(255, 244, 247, 0.96), rgba(255, 249, 242, 0.96));
  color: var(--accent-deep);
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.08);
}

.hint-member-link-choice > b {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  min-width: 88px;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.055);
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
}

.hint-member-link-choice.is-active > b {
  background: rgba(239, 22, 101, 0.1);
  color: var(--accent-deep);
}

.hint-member-link-checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
}

.hint-member-link-checkbox input {
  width: 20px;
  min-width: 20px;
  max-width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 4px;
  padding: 0;
}

.hint-member-link-checkbox span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.hint-member-link-checklist {
  display: grid;
  gap: 12px;
}

.hint-member-link-handoff-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.hint-member-link-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.hint-member-link-actions .secondary-button,
.hint-member-link-actions button[type="submit"] {
  flex: 1 1 0;
  margin-top: 0;
}

.hint-member-link-master-actions {
  position: relative;
  bottom: auto;
  z-index: 4;
  align-items: center;
  min-height: 92px;
  margin: 0;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: none;
}

.hint-member-link-master-actions > p {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hint-member-link-master-actions > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) minmax(260px, 1.28fr);
  gap: 12px;
  width: min(560px, 62%);
}

.hint-member-link-master-actions button {
  width: 100%;
  margin: 0;
}

@media (max-width: 760px) {
  .hint-member-link-master-detail-form {
    height: 100%;
    min-height: 0;
  }

  .hint-member-link-master-detail {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .hint-member-link-master {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hint-member-link-master button {
    min-height: 64px;
    padding: 10px 14px;
  }

  .hint-member-link-detail {
    padding: 22px 18px 28px;
  }

  .hint-member-link-choice-grid,
  .hint-member-link-ecw-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .hint-member-link-master-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hint-member-link-master-actions > p,
  .hint-member-link-master-actions > div {
    width: 100%;
  }

  .hint-member-link-master-actions > div {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  }
}

@media (max-height: 760px) {
  .widget-modal {
    max-height: calc(calc(100 * var(--dvh)) - 24px);
    margin-block: 12px;
  }

  .hint-member-link-modal {
    height: calc(calc(100 * var(--dvh)) - 24px);
    max-height: calc(calc(100 * var(--dvh)) - 24px);
  }

  .hint-member-link-modal > .widget-modal-head {
    padding: 16px 20px;
  }

  .hint-member-link-master-actions {
    min-height: 72px;
    padding: 12px 20px;
  }
}

.create-lead-modal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.create-lead-modal-grid-span-2 {
  grid-column: span 2;
}

.chip,
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(239, 22, 101, 0.08);
  color: var(--ink);
  font-size: 0.86rem;
}

.user-badge {
  margin-top: 12px;
  background: rgba(255, 190, 27, 0.18);
}

.sidebar input,
.sidebar select,
.sidebar textarea,
.sidebar button {
  background: rgba(255, 255, 255, 0.96);
}

.warning {
  color: var(--warning);
  background: rgba(255, 190, 27, 0.16);
}

.stack {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.94rem;
}

input,
select,
textarea,
button {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 12px 14px;
  background: #fffdf9;
}

button {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff8f4;
  border: none;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease;
}

.secondary-button {
  margin-top: 12px;
  background: rgba(255, 190, 27, 0.14);
  color: var(--ink);
  border: 1px solid var(--line);
}

button:hover {
  transform: translateY(-1px);
  opacity: 0.96;
}

.status-box {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(91, 77, 84, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  min-height: 48px;
}

.messaging-hero {
  align-items: center;
}

.messaging-hero-status {
  display: grid;
  justify-items: end;
  gap: 10px;
  min-width: 220px;
}

.messaging-status-chip {
  justify-content: space-between;
  min-width: 180px;
}

.messaging-status-chip strong {
  font-size: 0.92rem;
}

.messaging-banner-compact {
  padding-top: 16px;
  padding-bottom: 16px;
}

.cerebro-event-notification {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, calc(calc(100 * var(--vw)) - 32px));
  z-index: 1500;
  padding: 14px 18px 16px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.34)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 233, 242, 0.16) 60%, rgba(255, 241, 214, 0.18));
  box-shadow: 0 20px 40px rgba(122, 133, 153, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(22px) saturate(1.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
}

.cerebro-event-notification.hidden {
  display: none;
}

.cerebro-event-notification__eyebrow {
  margin-bottom: 8px;
  color: rgba(111, 28, 74, 0.78);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cerebro-event-notification__content {
  display: block;
}

.cerebro-event-notification__copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.cerebro-event-notification__copy strong {
  color: rgba(24, 21, 28, 0.94);
  font-size: 1.15rem;
}

.cerebro-event-notification__copy span {
  color: rgba(86, 76, 90, 0.86);
  font-size: 0.98rem;
}

.cerebro-event-notification__dismiss {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  color: rgba(44, 36, 48, 0.92);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.cerebro-event-notification__dismiss:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(122, 133, 153, 0.18);
  background: rgba(255, 255, 255, 0.36);
}

@media (max-width: 640px) {
  .cerebro-event-notification {
    top: 12px;
    width: calc(calc(100 * var(--vw)) - 20px);
    padding: 12px 14px 14px;
  }
  .cerebro-event-notification__dismiss {
    top: 10px;
    right: 10px;
  }
}

.messaging-single-shell {
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  height: calc(calc(100 * var(--dvh)) - 20px);
  min-height: calc(calc(100 * var(--dvh)) - 20px);
  overflow: hidden;
}

.team-messaging-page .messaging-single-shell {
  grid-template-columns: minmax(250px, 295px) minmax(0, 1fr);
  height: calc(calc(100 * var(--dvh)) - 122px);
  min-height: calc(calc(100 * var(--dvh)) - 122px);
  max-height: calc(calc(100 * var(--dvh)) - 122px);
}

.messaging-page .messaging-single-shell {
  grid-template-columns: minmax(150px, 185px) minmax(330px, 400px) minmax(0, 1fr);
  flex: 1 1 0;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  gap: 0;
  overflow: hidden;
}

.messaging-page .messaging-single-shell.is-bulk-mode {
  grid-template-columns: minmax(150px, 185px) minmax(0, 1fr);
}

.messaging-page .messaging-inboxes-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-right: 1px solid rgba(91, 77, 84, 0.16);
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  backdrop-filter: none;
  overflow: hidden;
}

.messaging-inboxes-header {
  padding: 20px 16px 14px;
  border-bottom: 1px solid rgba(91, 77, 84, 0.16);
  background: #ffffff;
}

.messaging-inboxes-header .eyebrow {
  margin: 0 0 8px;
}

.messaging-inboxes-header h2 {
  margin: 0;
  font-size: clamp(1.15rem, calc(1.25 * var(--vw)), 1.35rem);
  line-height: 1.05;
}

.messaging-inboxes-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.messaging-inbox-create-button {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(224, 73, 130, 0.24);
  border-radius: 999px;
  background: rgba(255, 238, 245, 0.9);
  color: var(--accent-deep);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
}

.messaging-custom-inbox-list {
  display: grid;
  gap: 0;
}

.messaging-custom-inbox-status {
  margin: 0;
  padding: 14px 10px 7px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.messaging-custom-inbox-status {
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.messaging-inbox-modal {
  width: min(520px, calc(calc(100 * var(--vw)) - 32px));
}

.messaging-inbox-list {
  display: grid;
  align-content: start;
  gap: 0;
  min-height: 0;
  padding: 0;
  overflow: auto;
}

.messaging-inbox-group {
  display: grid;
  min-width: 0;
  border-bottom: 1px solid rgba(228, 206, 217, 0.46);
  background: transparent;
  transition: background 160ms ease;
}

.messaging-inbox-group:hover {
  background: rgba(239, 22, 101, 0.045);
}

.messaging-inbox-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 64px;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, padding-left 160ms ease;
}

.messaging-inbox-item.active {
  background: transparent;
}

.messaging-inbox-group.is-active {
  background: transparent;
}

.messaging-inbox-group.is-active > .messaging-inbox-item {
  padding-left: 18px;
  background: linear-gradient(90deg, rgba(239, 22, 101, 0.09), rgba(239, 22, 101, 0.015));
  box-shadow: inset 4px 0 0 var(--accent);
  color: var(--accent-deep);
}

.messaging-inbox-item:focus-visible {
  outline: 2px solid rgba(224, 73, 130, 0.46);
  outline-offset: 1px;
}

.messaging-inbox-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.messaging-inbox-copy strong,
.messaging-inbox-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messaging-inbox-copy strong {
  font-size: 0.86rem;
  line-height: 1.05;
}

.messaging-inbox-copy small {
  font-size: 0.72rem;
  color: var(--muted);
}

.messaging-inbox-count {
  min-width: 26px;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(255, 238, 245, 0.9);
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.messaging-inbox-subsections {
  display: grid;
  gap: 0;
  padding: 0 14px;
  background: transparent;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 180ms ease, opacity 150ms ease, padding 180ms ease;
}

.messaging-inbox-group.is-expanded .messaging-inbox-subsections {
  max-height: 120px;
  padding-bottom: 10px;
  opacity: 1;
}

.messaging-inbox-subitem {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  padding: 5px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: rgba(111, 28, 74, 0.72);
  box-shadow: none;
  text-align: left;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.messaging-inbox-subitem-count {
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255, 238, 245, 0.9);
  color: var(--accent-deep);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.1;
  text-align: center;
}

.messaging-inbox-subitem:hover {
  background: rgba(239, 22, 101, 0.06);
  color: var(--accent-deep);
  transform: none;
}

.messaging-inbox-subitem.is-active {
  width: calc(100% - 8px);
  margin: 4px 8px 0 0;
  border-radius: 12px;
  color: var(--accent-deep);
  background: rgba(239, 22, 101, 0.1);
}

/* "Waiting on us" sits under Campaigns: campaign replies nobody has texted back yet. */
.messaging-inbox-subitem.messaging-inbox-subitem-nested {
  padding-left: 22px;
  font-weight: 700;
}

.messaging-inbox-subitem.messaging-inbox-subitem-nested.is-waiting .messaging-inbox-subitem-count {
  background: #d92d20;
  color: #fff;
}

.messaging-page .messaging-list-view {
  gap: 0;
  padding: 0;
  border: 0;
  border-right: 1px solid rgba(91, 77, 84, 0.16);
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  backdrop-filter: none;
}

.bulk-message-history-view {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.bulk-message-history-view.hidden {
  display: none;
}

.bulk-message-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 20px;
  border-bottom: 1px solid rgba(228, 206, 217, 0.58);
  background: rgba(255, 252, 253, 0.9);
}

.bulk-message-history-header h2,
.bulk-message-history-header p {
  margin: 0;
}

.bulk-message-history-header h2 {
  margin-top: 5px;
  font-size: clamp(1.45rem, calc(2 * var(--vw)), 2rem);
}

.bulk-message-create-button {
  width: auto;
  min-width: 220px;
}

.bulk-message-history-list {
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px 28px;
}

.bulk-message-history-empty {
  min-height: min(420px, calc(60 * var(--vh)));
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.bulk-message-history-empty strong {
  color: var(--ink);
  font-size: 1.2rem;
}

.bulk-message-history-empty p {
  max-width: 480px;
  margin: 0;
  line-height: 1.5;
}

.bulk-message-history-empty-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #f31665, #c70b50);
  box-shadow: 0 14px 30px rgba(220, 54, 103, 0.2);
}

.bulk-message-history-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(228, 206, 217, 0.62);
}

.bulk-message-history-card > div {
  display: grid;
  gap: 4px;
}

.bulk-message-history-card-meta {
  text-align: right;
  color: var(--muted);
}

.bulk-campaign-header-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.bulk-campaign-header-actions > button { width: auto; margin: 0; }
.bulk-campaign-phase-notice { margin: 0 24px 16px; color: var(--muted); }
.bulk-campaign-state { font-weight: 800; color: var(--accent-deep); }
.bulk-campaign-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.bulk-campaign-settings > label { display: grid; gap: 6px; min-width: 0; }
.bulk-campaign-settings input:not([type="checkbox"]) { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); font: inherit; box-sizing: border-box; }
.bulk-campaign-full { grid-column: 1 / -1; }
.bulk-campaign-weekdays { display: flex; flex-wrap: wrap; gap: 12px; border: 0; padding: 0; margin: 0; }
.bulk-campaign-weekdays label { display: flex; align-items: center; gap: 5px; }
.bulk-campaign-weekdays input { width: 16px; height: 16px; accent-color: var(--accent); }
.bulk-campaign-preview { display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 18px; padding: 20px; background: white; overflow-wrap: anywhere; }
.bulk-campaign-preview-body { white-space: pre-wrap; border-left: 3px solid var(--accent); padding-left: 12px; }
.is-campaign-planning .bulk-message-modal-actions { flex-direction: column; align-items: stretch; }
.is-campaign-planning .bulk-message-modal-actions .team-group-modal-action-buttons { width: 100%; grid-template-columns: minmax(80px, .6fr) minmax(120px, 1fr) minmax(150px, 1.4fr); }
.bulk-campaign-preview button:disabled { opacity: .6; cursor: not-allowed; }
@media (max-width: 560px) {
  .bulk-campaign-settings { grid-template-columns: minmax(0, 1fr); }
  .is-campaign-planning .bulk-message-modal-actions .team-group-modal-action-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .is-campaign-planning #bulkMessageContinueButton { grid-column: 1 / -1; }
  .bulk-message-history-card { flex-wrap: wrap; }
}

.bulk-message-modal {
  display: flex;
  flex-direction: column;
  width: min(1080px, calc(calc(100 * var(--vw)) - 32px));
  height: min(800px, calc(calc(100 * var(--dvh)) - 48px));
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.bulk-message-modal > .widget-modal-head {
  position: static;
  flex: 0 0 auto;
  margin: 0;
  padding: 20px 24px;
}

.bulk-message-modal > .widget-modal-content {
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  gap: 0;
  overflow: hidden;
}

.bulk-message-workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 0;
  border-block: 1px solid var(--line);
}

.bulk-message-master {
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(255, 249, 251, 0.72);
}

.bulk-message-master > button {
  width: 100%;
  min-height: 78px;
  margin: 0;
  padding: 18px 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 5px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-weight: 800;
  box-shadow: none;
  transform: none;
}

.bulk-message-master > button.is-active {
  border-left-color: var(--accent);
  color: var(--accent-deep);
  background: linear-gradient(90deg, rgba(239,22,101,.09), rgba(239,22,101,.025));
}

.bulk-message-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  min-height: 0;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.bulk-message-detail > * { flex-shrink: 0; }
.bulk-message-modal .hidden { display: none; }
.bulk-message-detail p, .bulk-message-detail h4 { margin: 0; }
.bulk-message-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bulk-message-recipient-count { padding: 8px 14px; border-radius: 999px; background: #fff0f5; color: var(--accent-deep); white-space: nowrap; }
.bulk-message-people-picker, .bulk-message-people-picker > label { display: grid; gap: 12px; }
.bulk-message-selected { display: flex; flex-wrap: wrap; gap: 8px; }
.bulk-message-selected > button { width: auto; margin: 0; padding: 7px 12px; border-radius: 999px; background: #fff0f5; color: var(--accent-deep); box-shadow: none; }
.bulk-message-people-results { display: grid; gap: 8px; max-height: 280px; overflow-y: auto; }
.bulk-message-person { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: white; color: var(--ink); text-align: left; box-shadow: none; }
.bulk-message-person > span { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.bulk-message-person small { color: var(--muted); }
.bulk-message-person.is-selected { background: #fff0f5; border-color: var(--accent); }
.bulk-message-person > b { color: var(--accent-deep); }

.bulk-message-modal .bulk-message-modal-actions {
  position: static;
  align-items: center;
  margin: 0;
  padding: 16px 24px;
  background: white;
}

.bulk-message-modal-actions .team-group-modal-action-buttons {
  display: grid;
  grid-template-columns: minmax(100px, .7fr) minmax(150px, 1.3fr);
  gap: 12px;
  width: min(460px, 100%);
  flex-shrink: 0;
}
.bulk-message-modal-actions .team-group-modal-action-buttons > button { width: 100%; margin: 0; }

@media (max-width: 760px) {
  .bulk-message-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .bulk-message-master { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-right: 0; }
  .bulk-message-master > button { min-height: 64px; padding: 10px 6px; font-size: .85rem; }
  .bulk-message-detail { padding: 16px; }
  .bulk-message-modal .bulk-message-modal-actions { align-items: stretch; padding: 12px 16px; gap: 8px; }
  .bulk-message-modal-actions .team-group-modal-action-buttons { width: 100%; }
  .bulk-message-detail-heading { flex-wrap: wrap; }
}

.bulk-message-quantity-field,
.bulk-message-body-field,
.bulk-message-audience-fieldset {
  display: grid;
  gap: 10px;
}

.bulk-message-quantity-field > span,
.bulk-message-body-field > span,
.bulk-message-audience-fieldset legend {
  color: var(--muted);
  font-weight: 800;
}

.bulk-message-quantity-field input {
  width: 100%;
  min-height: 52px;
  padding: 10px 16px;
  border: 1px solid rgba(111, 28, 74, 0.16);
  border-radius: 16px;
  background: #fffdfa;
  color: var(--ink);
  font: inherit;
}

.bulk-message-body-field {
  display: grid;
  gap: 10px;
}

.bulk-message-body-field textarea {
  width: 100%;
  min-height: 118px;
  resize: vertical;
  padding: 14px 16px;
  border: 1px solid rgba(111, 28, 74, 0.16);
  border-radius: 18px;
  background: #fffdfa;
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
}

.bulk-message-body-field textarea:focus,
.bulk-message-quantity-field input:focus {
  outline: 2px solid rgba(239, 22, 101, 0.2);
  border-color: rgba(239, 22, 101, 0.45);
}

.bulk-message-audience-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.bulk-message-audience-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 15px 16px;
  border: 1px solid rgba(111, 28, 74, 0.12);
  border-radius: 18px;
  background: rgba(255, 253, 250, 0.92);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.bulk-message-audience-option:hover {
  transform: translateY(-1px);
  border-color: rgba(239, 22, 101, 0.26);
}

.bulk-message-audience-option:has(input:checked) {
  border-color: rgba(239, 22, 101, 0.34);
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.09), rgba(255, 190, 27, 0.12));
}

.bulk-message-audience-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.bulk-message-audience-option span {
  display: grid;
  gap: 3px;
}

.bulk-message-audience-option small {
  color: var(--muted);
  line-height: 1.35;
}

.bulk-message-modal-actions {
  align-items: flex-end;
}

.bulk-message-modal-actions #bulkMessageStatus {
  max-width: 360px;
  line-height: 1.4;
}

.bulk-message-modal-actions .error-text {
  color: #b3114c;
}

.bulk-message-modal-actions .success-text {
  color: #177a4f;
}

@media (max-width: 760px) {
  .bulk-message-history-header,
  .bulk-message-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .bulk-message-create-button {
    width: 100%;
    min-width: 0;
  }
}

.messaging-page .messaging-detail-view {
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  backdrop-filter: none;
}

.messaging-page .main-content {
  padding: 0;
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.messaging-page .main-content > .account-topbar {
  flex: 0 0 auto;
}

/* Override the collapsed-sidebar inset without shifting the inbox pane outside its grid cell. */
body.sidebar-collapsed.messaging-page .main-content {
  padding-left: 0;
}

.messaging-page .page-content {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.team-messaging-page .messaging-list-view {
  gap: 6px;
  padding: 10px 16px 12px;
}

.team-messaging-page .messaging-detail-view {
  gap: 14px;
  padding: 16px 18px;
}

.messaging-list-view,
.messaging-detail-view {
  min-height: 0;
  height: 100%;
}

.messaging-list-view {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 8px;
  padding: 12px 18px 14px;
  overflow: hidden;
}

.messaging-list-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.messaging-new-thread {
  padding: 16px 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 250, 252, 0.98), rgba(255, 243, 247, 0.96));
  box-shadow: none;
}

.messaging-new-thread-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.messaging-inline-cancel {
  width: auto;
  margin-top: 0;
  padding: 10px 14px;
}

.messaging-detail-view {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: 20px;
  overflow: hidden;
}

.messaging-page .messaging-list-view {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.messaging-page .messaging-detail-view {
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
}

.messaging-page .messaging-detail-view > .messaging-pane-header-detail {
  grid-row: 1;
}

.messaging-page .messaging-detail-view > .message-send-progress-host {
  grid-row: 2;
}

.messaging-page .messaging-detail-view > .messaging-conversation {
  grid-row: 3;
}

.messaging-page .messaging-detail-view > .messaging-window-notice {
  grid-row: 4;
}

.messaging-page .messaging-detail-view > .messaging-composer {
  grid-row: 5;
}

.messaging-page .messaging-pane-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.messaging-page .messaging-pane-header-list {
  padding: 22px 22px 18px;
  border-bottom: 1px solid rgba(91, 77, 84, 0.16);
  background: #ffffff;
}

.messaging-page .messaging-pane-header-detail {
  padding: 16px 26px 14px;
  border-bottom: 1px solid rgba(91, 77, 84, 0.16);
  background: #ffffff;
}

.messaging-page .messaging-pane-title-block,
.messaging-page .messaging-thread-heading-copy {
  display: grid;
  gap: 0;
  min-width: 0;
}

.messaging-page .messaging-pane-title-block h2,
.messaging-page .messaging-thread-heading-copy h3,
.messaging-page .messaging-thread-title-button {
  margin: 0;
  font-size: clamp(1.45rem, calc(1.85 * var(--vw)), 1.85rem);
  line-height: 1.02;
}

.messaging-page .messaging-thread-title-button {
  width: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  font-family: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.messaging-page .messaging-thread-title-button:not(:disabled):hover,
.messaging-page .messaging-thread-title-button:not(:disabled):focus-visible {
  color: var(--berry);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.messaging-page .messaging-thread-title-button:focus-visible {
  outline: 2px solid rgba(220, 54, 103, 0.34);
  outline-offset: 4px;
}

.messaging-page .messaging-thread-title-button:disabled {
  opacity: 1;
  cursor: default;
}

.messaging-page .messaging-pane-subtitle,
.messaging-page .messaging-thread-meta {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.35;
}

.messaging-page .messaging-thread-eyebrow {
  margin: 0;
  display: none;
}

.messaging-page .messaging-list-toolbar {
  display: grid;
  gap: 12px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid rgba(91, 77, 84, 0.16);
  background: #ffffff;
}

.messaging-page .messaging-inline-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(111, 28, 74, 0.72);
}

.messaging-ios-shell {
  display: grid;
  grid-template-columns: minmax(330px, 390px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.messaging-sidebar-panel,
.messaging-main-panel {
  min-height: calc(72 * var(--vh));
}

.messaging-sidebar-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.messaging-sidebar-top,
.messaging-thread-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.messaging-top-refresh {
  width: auto;
  margin-top: 0;
  padding: 7px 13px;
}

.messaging-search {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin-top: 0;
  padding: 5px 12px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(62, 10, 32, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.messaging-search:focus-within {
  border-color: rgba(239, 22, 101, 0.3);
  box-shadow: 0 12px 28px rgba(62, 10, 32, 0.08), 0 0 0 3px rgba(239, 22, 101, 0.08);
}

.messaging-search-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 1.5px solid rgba(102, 85, 95, 0.68);
  border-radius: 999px;
}

.messaging-search-icon::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -1px;
  width: 6px;
  height: 1.5px;
  border-radius: 999px;
  background: rgba(102, 85, 95, 0.68);
  transform: rotate(45deg);
}

.messaging-search span,
.messaging-section-label span {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.messaging-search input {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font-size: 0.84rem;
}

.messaging-search input:focus {
  border: 0;
  outline: 0;
  box-shadow: none;
}

.messaging-search input::placeholder {
  color: rgba(102, 85, 95, 0.78);
}

.messaging-thread-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: -2px;
}

.messaging-page .messaging-thread-controls {
  margin-top: 0;
  align-items: center;
}

.messaging-thread-controls-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.messaging-inline-label-inline {
  margin: 0;
}

.messaging-thread-filter-button {
  width: auto;
  min-width: 72px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(111, 28, 74, 0.12);
  background: rgba(255, 252, 253, 0.9);
  color: var(--muted);
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}

.messaging-thread-filter-button:hover {
  background: rgba(239, 22, 101, 0.05);
  color: var(--ink);
}

.messaging-thread-sort-button {
  min-width: 104px;
}

.messaging-thread-sort-button.is-active {
  background: rgba(255, 252, 253, 0.9);
  color: var(--muted);
  border-color: rgba(111, 28, 74, 0.12);
}

.messaging-thread-filter-button.is-active {
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.12), rgba(255, 190, 27, 0.18));
  border-color: rgba(239, 22, 101, 0.14);
  color: var(--accent-deep);
}

.messaging-thread-pagination-summary {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.messaging-pinned-section,
.messaging-thread-section {
  display: grid;
  gap: 4px;
  min-height: 0;
}

.messaging-page .messaging-thread-section-main {
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 6px 14px 12px 18px;
  overflow: hidden;
}

.messaging-pinned-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 12px;
}

.messaging-pinned-item {
  width: 100%;
  padding: 8px 6px;
  border-radius: 0;
  background: transparent;
  border: none;
  color: var(--ink);
  display: grid;
  justify-items: center;
  gap: 6px;
}

.messaging-pinned-item.active {
  color: var(--accent-deep);
}

.messaging-pinned-item strong,
.messaging-pinned-item small {
  line-height: 1.1;
  text-align: center;
}

.messaging-pinned-item strong {
  font-size: 0.92rem;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messaging-pinned-item small {
  color: var(--muted);
}

.message-channel-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.message-channel-chip.whatsapp {
  background: rgba(37, 211, 102, 0.14);
  color: #148a45;
}

.message-channel-chip.sms {
  background: #ef1665;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(239, 22, 101, 0.18);
}

.messaging-channel-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(244, 246, 250, 0.94);
  border: 1px solid rgba(17, 17, 17, 0.06);
}

.message-channel-toggle-button {
  width: auto;
  min-width: 78px;
  padding: 8px 12px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  border: none;
  box-shadow: none;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.message-channel-toggle-button.active.whatsapp {
  background: rgba(37, 211, 102, 0.14);
  color: #148a45;
}

.message-channel-toggle-button.active.sms {
  background: rgba(64, 153, 242, 0.14);
  color: #2167c7;
}

.messaging-pinned-item .message-avatar {
  width: 84px;
  height: 84px;
  font-size: 1.45rem;
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.12);
}

.messaging-thread-list {
  display: grid;
  gap: 6px;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding-right: 4px;
}

.messaging-page .messaging-thread-list {
  gap: 0;
  padding-right: 6px;
}

.messaging-thread-pagination {
  margin-top: 10px;
}

.messaging-thread-item {
  position: relative;
  width: 100%;
  background: transparent;
  color: var(--ink);
  border: none;
  padding: 8px 10px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  box-shadow: inset 0 -1px 0 rgba(17, 17, 17, 0.06);
  text-align: left;
}

.messaging-page .messaging-thread-item {
  padding: 14px 12px;
  border-radius: 20px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  box-shadow: none;
}

.message-unread-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef1665, #c70f7e);
  box-shadow: 0 0 0 3px rgba(255, 249, 252, 0.94), 0 6px 14px rgba(161, 18, 86, 0.22);
}

.messaging-thread-item:hover {
  background: rgba(239, 22, 101, 0.05);
}

.messaging-thread-item.active {
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.08), rgba(255, 190, 27, 0.18));
  box-shadow: none;
}

.messaging-page .messaging-thread-item + .messaging-thread-item {
  border-top: 1px solid rgba(228, 206, 217, 0.24);
}

.messaging-page .messaging-thread-item:hover {
  background: rgba(239, 22, 101, 0.045);
}

.messaging-page .messaging-thread-item.active {
  background:
    linear-gradient(135deg, rgba(239, 22, 101, 0.08), rgba(255, 190, 27, 0.18)),
    rgba(255, 250, 252, 0.95);
}

.messaging-thread-copy {
  min-width: 0;
}

.messaging-thread-title-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.messaging-thread-channel {
  flex: 0 0 auto;
  margin-left: auto;
}

.messaging-thread-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 1px;
}

.messaging-thread-head strong,
.messaging-thread-head span,
.messaging-thread-subhead,
.messaging-thread-item p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messaging-thread-head strong {
  font-size: 0.9rem;
}

.messaging-thread-head span,
.messaging-thread-subhead,
.messaging-thread-item p {
  color: var(--muted);
}

.messaging-thread-subhead {
  font-size: 0.78rem;
  margin-bottom: 1px;
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.messaging-thread-next-event {
  margin-bottom: 4px;
  font-size: 0.82rem;
  color: var(--accent-deep);
  font-weight: 700;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.message-event-link,
.messaging-event-button {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 190, 27, 0.16);
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.12);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.messaging-thread-item p {
  margin: 0;
  font-size: 0.84rem;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.14), rgba(255, 190, 27, 0.28));
  color: var(--accent-deep);
  font-weight: 700;
  font-size: 0.82rem;
  border: 1px solid rgba(239, 22, 101, 0.12);
}

.messaging-page .message-avatar {
  width: 44px;
  height: 44px;
  font-size: 0.96rem;
}

#sidebarMessagesList .messaging-thread-item.sidebar-message-item {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 12px;
  border-radius: 20px;
}

.sidebar-message-load-status {
  display: block;
  width: 100%;
  padding: 4px 0 2px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.message-avatar-large {
  width: 68px;
  height: 68px;
  font-size: 1.24rem;
}

.message-unread-pill {
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}

.messaging-main-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 20px;
}

.messaging-thread-header-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.messaging-page .messaging-thread-header-main {
  gap: 14px;
  min-width: 0;
}

.messaging-thread-header-side {
  display: grid;
  justify-items: end;
  gap: 0;
}

.messaging-page .messaging-thread-header-side {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.messaging-triage-button {
  border: 1px solid rgba(224, 73, 130, 0.25);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent-deep);
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: none;
}

.messaging-triage-button:hover:not(:disabled) {
  border-color: rgba(224, 73, 130, 0.5);
  background: rgba(255, 243, 248, 0.96);
}

.messaging-triage-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.messaging-thread-header-main.is-clickable {
  cursor: pointer;
  border-radius: 22px;
  padding: 6px 8px;
  margin: -6px -8px;
  transition: background 180ms ease, transform 180ms ease;
}

.messaging-thread-header-main.is-clickable:hover {
  background: rgba(255, 246, 249, 0.95);
}

.messaging-thread-header-main.is-clickable:active {
  transform: scale(0.995);
}

.messaging-pin-button {
  width: auto;
  margin-top: 0;
  border-radius: 999px;
  padding: 10px 16px;
}

.messaging-thread-header-main h3 {
  margin-bottom: 6px;
}

.messaging-page .messaging-thread-header-main h3 {
  margin-bottom: 0;
}

.messaging-thread-meta {
  max-width: 560px;
}

.messaging-thread-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
}

.messaging-thread-phone-inline {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 8px 14px;
  font-size: 0.95rem;
  line-height: 1;
}

.messaging-page .messaging-thread-meta {
  display: none;
}

.messaging-page .messaging-thread-meta.has-identity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
}

.messaging-thread-via {
  color: var(--muted);
}

.contact-identity-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  background: rgba(239, 22, 101, 0.12);
  color: var(--accent-deep);
}

.contact-identity-chip.is-lead {
  background: rgba(239, 22, 101, 0.12);
  color: var(--accent-deep);
}

.contact-identity-chip.is-member {
  background: rgba(25, 135, 84, 0.14);
  color: var(--success);
}

.contact-identity-chip.is-member-cancelled {
  background: rgba(102, 85, 95, 0.14);
  color: var(--muted);
}

.call-panel-identity {
  margin: 4px 0 0;
}

.messaging-conversation {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 220px;
  max-height: calc(calc(100 * var(--dvh)) - 360px);
  overflow: auto;
  padding: 8px 4px 8px 0;
  background-color: #fffdfa;
}

.messaging-page .messaging-conversation {
  min-height: 0;
  max-height: none;
  padding: 18px 22px 18px 26px;
  gap: 16px;
  background-color: #ffffff;
}

.messaging-conversation.is-drop-target {
  position: relative;
  outline: 2px dashed rgba(227, 25, 114, 0.32);
  outline-offset: -12px;
}

.messaging-conversation.is-drop-target::after {
  content: "Drop a file here to attach it";
  position: sticky;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 auto 12px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 247, 250, 0.96);
  color: var(--accent-deep);
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 14px 26px rgba(217, 14, 87, 0.12);
  z-index: 2;
}

.message-send-progress {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 6px 0 2px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0));
}

.message-send-progress-host {
  min-height: 0;
  background: #ffffff;
}

.message-send-progress-host:empty {
  display: none;
}

.messaging-page .message-send-progress {
  position: relative;
  top: auto;
  z-index: 30;
  margin: 0;
  padding: 0;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(91, 77, 84, 0.08);
}

.message-send-progress-track {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(217, 14, 87, 0.12);
  box-shadow: inset 0 0 0 1px rgba(217, 14, 87, 0.06);
}

.message-send-progress-bar {
  width: 36%;
  height: 100%;
  transform: translate3d(-110%, 0, 0);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 75, 147, 0.24), #ff4b93, #ffb347, rgba(255, 179, 71, 0.24));
  box-shadow: 0 0 10px rgba(255, 75, 147, 0.26);
}

.message-send-progress.is-sending .message-send-progress-bar {
  animation: message-send-progress-fill 1800ms linear infinite;
  animation-delay: var(--message-send-progress-delay, 0ms);
}

.message-send-progress.is-complete {
  animation: message-send-progress-fade 0.38s ease forwards;
}

.message-send-progress.is-complete .message-send-progress-bar {
  width: 100%;
  transform: translate3d(0, 0, 0);
}

@keyframes message-send-progress-fill {
  0% {
    transform: translate3d(-110%, 0, 0);
  }

  100% {
    transform: translate3d(290%, 0, 0);
  }
}

@keyframes message-send-progress-fade {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes message-bubble-slide-in {
  0% {
    opacity: 0;
    transform: translate3d(20px, 8px, 0) scale(0.98);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.message-bubble {
  max-width: 70%;
  padding: 12px 14px;
  border-radius: 22px;
  display: grid;
  gap: 4px;
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.08);
}

.message-bubble.inbound {
  justify-self: start;
  background: #f0f2f5;
  color: #111b21;
  border-top-left-radius: 8px;
  box-shadow: 0 1px 2px rgba(17, 27, 33, 0.12);
}

.message-bubble.outbound {
  justify-self: end;
  background: #d9fdd3;
  color: #111b21;
  border-top-right-radius: 8px;
  box-shadow: 0 1px 2px rgba(17, 27, 33, 0.14);
}

.message-bubble a {
  color: #0b5cad;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.message-bulk-label {
  justify-self: start;
  width: fit-content;
  margin-bottom: 2px;
  color: #667781;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.3;
}

.message-call-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 260px;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
}

.message-call-icon {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: #3b4a54;
}

.message-call-card.is-missed .message-call-icon {
  color: #c62828;
}

.message-call-main {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.message-call-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.message-call-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.message-call-card.is-missed .message-call-title {
  color: #b71c1c;
}

.message-call-detail {
  color: #667781;
  font-size: 0.8rem;
  line-height: 1.3;
}

.message-call-action,
.message-call-transcript-toggle,
.message-call-open {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.message-call-action {
  flex: 0 0 auto;
  color: #0b5cad;
  font-size: 0.8rem;
  font-weight: 700;
}

.message-call-action:hover,
.message-call-transcript-toggle:hover,
.message-call-open:hover {
  text-decoration: underline;
}

.message-call-action:focus-visible,
.message-call-transcript-toggle:focus-visible,
.message-call-open:focus-visible {
  outline: 2px solid #0b5cad;
  outline-offset: 2px;
  border-radius: 4px;
}

.message-call-player {
  width: 100%;
  min-width: 200px;
  height: 36px;
  margin-top: 4px;
}

.message-call-error {
  color: #b71c1c;
  font-size: 0.78rem;
}

.message-call-error:empty {
  display: none;
}

.message-call-transcript-toggle {
  justify-self: start;
  color: #0b5cad;
  font-size: 0.8rem;
  font-weight: 600;
}

.message-call-transcript-toggle .is-hide,
.message-call-transcript-toggle[aria-expanded="true"] .is-show {
  display: none;
}

.message-call-transcript-toggle[aria-expanded="true"] .is-hide {
  display: inline;
}

.message-call-transcript {
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-call-transcript[hidden] {
  display: none;
}

.message-call-open {
  justify-self: start;
  color: #4a5a64;
  font-size: 0.74rem;
  font-weight: 600;
}

.message-bubble-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message-bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}

.message-bubble-shell.outbound .message-bubble-row {
  justify-content: flex-end;
}

.message-sender-label {
  color: #667781;
  font-size: 0.72rem;
  line-height: 1;
  margin: 2px 40px -2px 0;
}

.message-sender-avatar {
  width: 28px;
  min-width: 28px;
  height: 28px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff547f, #ff9a4a);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 800;
}

.message-sender-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-bubble-shell.inbound {
  align-items: flex-start;
}

.message-bubble-shell.outbound {
  align-items: flex-end;
}

.message-tagged-banner {
  color: #dc3667;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 2px;
}

.message-bubble-shell.inbound .message-tagged-banner {
  text-align: left;
}

.message-bubble-shell.outbound .message-tagged-banner {
  text-align: right;
}

.message-internal-notes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(100%, 420px);
}

.message-bubble-shell.inbound .message-internal-notes {
  align-items: flex-start;
  padding-right: 44px;
  margin-right: -44px;
}

.message-bubble-shell.outbound .message-internal-notes {
  align-items: flex-end;
  padding-left: 44px;
  margin-left: -44px;
}

.message-internal-note-card {
  position: relative;
  overflow: visible;
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(225, 190, 74, 0.38);
  background: linear-gradient(135deg, #fff9df, #fff2bd);
  box-shadow: 0 10px 22px rgba(145, 112, 26, 0.09);
  color: #514219;
}

/* Keep the note hovered while the pointer crosses to its offset delete button. */
.message-internal-note-card::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  z-index: 2;
}

.message-bubble-shell.inbound .message-internal-note-card::after,
.message-thread-internal-note-card::after {
  left: 100%;
}

.message-bubble-shell.outbound .message-internal-note-card::after {
  right: 100%;
}

.message-internal-note-delete {
  position: absolute;
  top: 50%;
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(111, 28, 74, 0.12);
  background: rgba(255, 255, 255, 0.96);
  color: var(--muted);
  box-shadow: 0 8px 20px rgba(116, 16, 59, 0.08);
  opacity: 0;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transform: translateY(-50%) scale(0.96);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease, color 180ms ease;
}

.message-bubble-shell.inbound .message-internal-note-delete {
  left: calc(100% + 10px);
}

.message-bubble-shell.outbound .message-internal-note-delete {
  right: calc(100% + 10px);
}

.message-internal-note-card:hover .message-internal-note-delete,
.message-internal-note-delete:hover,
.message-internal-note-delete:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.message-internal-note-delete:hover,
.message-internal-note-delete:focus-visible {
  background: rgba(255, 247, 250, 0.98);
  color: var(--ink);
}

.message-internal-note-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message-internal-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.message-internal-note-author {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.message-internal-note-author-name {
  max-width: 150px;
  overflow: hidden;
  color: rgba(81, 66, 25, 0.78);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-internal-note-author-avatar {
  width: 30px;
  min-width: 30px;
  height: 30px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: linear-gradient(135deg, #ff547f, #ff9a4a);
  box-shadow: 0 5px 12px rgba(145, 112, 26, 0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  font-weight: 800;
}

.message-internal-note-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-internal-note-body {
  margin-top: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.message-internal-note-meta {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(81, 66, 25, 0.68);
  text-align: right;
}

.message-bubble.is-fresh {
  animation: message-bubble-slide-in 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.message-bubble {
  position: relative;
}

/* Preserve hover while crossing from the message bubble to its offset menu button. */
.message-bubble::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  z-index: 3;
}

.message-bubble.inbound::after {
  left: 100%;
}

.message-bubble.outbound::after {
  right: 100%;
}

.message-bubble-action-toggle {
  position: absolute;
  top: 50%;
  width: 34px;
  min-width: 34px;
  height: 34px;
  margin-top: 0;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(111, 28, 74, 0.1);
  background: rgba(255, 255, 255, 0.96);
  color: var(--muted);
  box-shadow: 0 8px 20px rgba(116, 16, 59, 0.08);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
  transform: translateY(-50%) scale(0.96);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease, color 180ms ease;
}

.message-bubble-action-toggle span {
  letter-spacing: 1px;
  font-size: 0.9rem;
  line-height: 1;
  transform: translateY(-1px);
}

.message-bubble-action-toggle:hover,
.message-bubble-action-toggle:focus-visible {
  background: rgba(255, 247, 250, 0.98);
  color: var(--ink);
}

.message-bubble.inbound .message-bubble-action-toggle {
  left: calc(100% + 10px);
}

.message-bubble.outbound .message-bubble-action-toggle {
  right: calc(100% + 10px);
}

.message-bubble-actions {
  position: absolute;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 156px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(111, 28, 74, 0.12);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 40px rgba(49, 8, 26, 0.18);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transform: translateY(-50%) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

.message-bubble.inbound .message-bubble-actions {
  left: calc(100% + 54px);
}

.message-bubble.outbound .message-bubble-actions {
  right: calc(100% + 54px);
}

.message-bubble:hover .message-bubble-action-toggle,
.message-bubble-action-toggle:hover,
.message-bubble-shell.is-actions-open .message-bubble-action-toggle {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.message-bubble-shell.is-actions-open .message-bubble-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.message-bubble-action-button {
  width: 100%;
  min-width: 0;
  margin-top: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(111, 28, 74, 0.12);
  background: rgba(255, 255, 255, 0.96);
  color: var(--muted);
  box-shadow: none;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-align: left;
}

.message-bubble-action-button:hover,
.message-bubble-action-button:focus-visible {
  background: rgba(255, 247, 250, 0.98);
  color: var(--ink);
}

.message-internal-note-input {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  padding: 16px 18px;
  border-radius: 24px;
  border: 1px solid rgba(111, 28, 74, 0.12);
  background: #fffdf9;
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
}

.message-internal-note-input:focus {
  outline: none;
  border-color: rgba(220, 54, 103, 0.35);
  box-shadow: 0 0 0 3px rgba(220, 54, 103, 0.12);
}

:is(#messageInternalNoteOverlay, #sharedSidebarMessageInternalNoteOverlay) .team-group-modal-actions {
  width: 100%;
}

:is(#messageInternalNoteOverlay, #sharedSidebarMessageInternalNoteOverlay) .team-group-modal-actions > .muted {
  flex: 1 1 auto;
  min-width: 0;
}

:is(#messageInternalNoteOverlay, #sharedSidebarMessageInternalNoteOverlay) .team-group-modal-action-buttons {
  display: grid;
  flex: 0 1 420px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 420px);
  gap: 10px;
}

:is(#messageInternalNoteOverlay, #sharedSidebarMessageInternalNoteOverlay) .team-group-modal-action-buttons > button {
  width: 100%;
  min-width: 0;
  margin: 0;
}

@media (max-width: 620px) {
  :is(#messageInternalNoteOverlay, #sharedSidebarMessageInternalNoteOverlay) .team-group-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  :is(#messageInternalNoteOverlay, #sharedSidebarMessageInternalNoteOverlay) .team-group-modal-action-buttons {
    flex-basis: auto;
  }
}

.message-bubble.is-highlighted {
  background: #ffd320;
  color: #522333;
  box-shadow: 0 12px 28px rgba(255, 211, 32, 0.28);
}

.message-bubble.is-highlighted .message-bubble-content time {
  color: rgba(82, 35, 51, 0.82);
  opacity: 1;
}

.message-day-divider {
  display: flex;
  justify-content: center;
  padding: 4px 0;
}

.message-day-divider span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(46, 31, 36, 0.12);
  color: rgba(46, 31, 36, 0.78);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.message-bubble-content {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.message-bubble-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.message-bubble-content time {
  flex: 0 0 auto;
  font-size: 0.75rem;
  line-height: 1;
  white-space: nowrap;
  color: #667781;
}

.message-history-loader {
  text-align: center;
  font-size: 0.8rem;
  padding: 4px 0 8px;
}

.message-history-loader.is-loading,
.message-thread-loading-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  margin: 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  box-shadow: 0 10px 24px rgba(116, 16, 59, 0.08);
}

.message-thread-loading-state {
  align-self: center;
  justify-self: center;
  margin-top: 24px;
}

.message-thread-list-loading-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  margin: 18px auto 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  box-shadow: 0 10px 24px rgba(116, 16, 59, 0.08);
}

.message-thread-loading-spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(220, 54, 103, 0.18);
  border-top-color: #dc3667;
  animation: message-thread-spinner 700ms linear infinite;
}

@keyframes message-thread-spinner {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.messaging-window-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 244, 248, 0.94);
  border: 1px solid rgba(239, 22, 101, 0.12);
}

.messaging-page .messaging-window-notice {
  margin: 0 22px 0 26px;
}

.messaging-window-notice-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.messaging-window-notice-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
  flex: 1 1 auto;
}

.messaging-window-notice-copy strong {
  font-size: 1rem;
  color: var(--accent-deep);
  line-height: 1.15;
}

.messaging-window-notice-copy span {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.35;
  max-width: 48ch;
}

.messaging-window-call-button {
  flex: 0 0 auto;
  width: 56px;
  min-width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 1.35rem;
  line-height: 1;
  background: linear-gradient(135deg, #ff4b93, #d90e57);
  box-shadow: 0 16px 28px rgba(217, 14, 87, 0.18);
  border: none;
}

.messaging-window-sms-button {
  width: auto;
  min-width: 0;
  margin-top: 0;
}

.messaging-window-sms-button {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(64, 153, 242, 0.14);
  color: #2167c7;
  border: 1px solid rgba(64, 153, 242, 0.18);
}

.messaging-window-call-button img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.message-bubble p {
  margin: 0;
  flex: 1 1 auto;
  line-height: 1.4;
  font-size: 0.96rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message-bubble small {
  opacity: 0.8;
}

@media (hover: none), (pointer: coarse) {
  .message-bubble-action-toggle {
    display: inline-flex;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
  }

  .message-bubble-actions {
    display: none;
  }

  .message-bubble-shell.is-actions-open .message-bubble-actions {
    display: flex;
  }
}

.team-message-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.team-message-row.inbound {
  justify-content: flex-start;
}

.team-message-row.outbound {
  justify-content: flex-end;
}

.team-message-sender-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #ffe1ef, #ffeec7);
  color: var(--accent-deep);
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(116, 16, 59, 0.08);
}

.message-bubble-sender {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  opacity: 0.92;
}

.team-message-attachment-card {
  display: grid;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.team-message-attachment-card.image img {
  display: block;
  width: min(260px, 100%);
  max-width: 100%;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(116, 16, 59, 0.12);
}

.team-message-attachment-card.file {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.22);
}

.message-bubble.inbound .team-message-attachment-card.file {
  background: rgba(255, 255, 255, 0.82);
}

.team-message-attachment-file-icon,
.team-message-attachment-preview-file-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.28);
  font-weight: 800;
}

.message-bubble.inbound .team-message-attachment-file-icon {
  background: rgba(255, 255, 255, 0.92);
}

.team-message-attachment-file-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.team-message-attachment-file-copy strong,
.team-message-attachment-file-copy span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.team-message-attachment-file-copy span {
  font-size: 0.78rem;
  opacity: 0.84;
}

.team-message-loading-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 0 4px;
}

.team-message-loading-bubble {
  position: relative;
  overflow: hidden;
  height: 74px;
  max-width: 68%;
  border-radius: 28px;
  background: rgba(233, 236, 245, 0.95);
  box-shadow: 0 10px 28px rgba(210, 170, 190, 0.12);
}

.team-message-loading-bubble::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.68) 50%, transparent 100%);
  animation: team-message-loading-shimmer 1.05s ease-in-out infinite;
}

.team-message-loading-bubble.inbound {
  align-self: flex-start;
}

.team-message-loading-bubble.outbound {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(245, 36, 128, 0.9), rgba(217, 16, 100, 0.92));
}

.team-message-loading-bubble.short {
  width: 34%;
}

.team-message-loading-bubble.medium {
  width: 48%;
}

.team-message-loading-bubble.long {
  width: 58%;
}

.team-message-inline-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 247, 250, 0.95);
  color: #7b6b77;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(214, 182, 196, 0.12);
}

.team-message-inline-loading-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #e31972;
  animation: team-message-loading-pulse 0.9s ease-in-out infinite;
}

@keyframes team-message-loading-shimmer {
  100% {
    transform: translateX(100%);
  }
}

@keyframes team-message-loading-pulse {
  0%, 100% {
    opacity: 0.45;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.messaging-composer {
  background: rgba(255, 247, 250, 0.92);
  border: 1px solid rgba(239, 22, 101, 0.08);
  border-radius: 24px;
  padding: 14px;
}

.messaging-page .messaging-composer {
  min-height: 62px;
  margin: 0;
  padding: 0 22px 18px 26px;
  gap: 6px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.messaging-page .messaging-composer > .status-box {
  margin: 6px 0 0;
}

.team-messaging-page .messaging-composer {
  padding: 10px 12px;
}

.messaging-composer-label {
  gap: 8px;
}

.messaging-page .messaging-composer-label {
  gap: 4px;
}

.messaging-page .messaging-composer-label-compact {
  gap: 0;
}

.team-messaging-page .messaging-composer-label {
  gap: 0;
}

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

.messaging-page .messaging-composer-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.messaging-opted-out-label {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #c2145c;
  border-radius: 999px;
  background: #c2145c;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.messaging-opted-out-label.hidden,
.messaging-composer textarea[hidden],
.messaging-composer .messaging-send-button[hidden] {
  display: none;
}

.messaging-composer.is-opted-out {
  opacity: 1;
}

.messaging-composer-note-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(220, 54, 103, 0.26);
  background: rgba(255, 255, 255, 0.96);
  color: #c2145c;
  box-shadow: 0 8px 18px rgba(179, 15, 82, 0.1);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.messaging-composer-note-button:hover,
.messaging-composer-note-button:focus-visible {
  border-color: rgba(220, 54, 103, 0.58);
  background: rgba(255, 242, 247, 0.98);
}

.messaging-composer-note-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.message-thread-internal-notes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(100%, 420px);
  margin: 12px auto 0;
}

.message-thread-internal-note-card .message-internal-note-delete {
  left: calc(100% + 10px);
}

.message-thread-internal-note-card:hover .message-internal-note-delete,
.message-thread-internal-note-delete:hover,
.message-thread-internal-note-delete:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.team-message-composer-inputs {
  display: grid;
  gap: 10px;
}

.messaging-composer textarea {
  border-radius: 20px;
  min-height: 72px;
  resize: vertical;
  line-height: 1.35;
}

.messaging-page .messaging-composer textarea {
  min-height: 44px;
  max-height: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  resize: none;
  overflow-y: hidden;
}

.team-message-composer-field {
  position: relative;
}

.team-message-attachment-button {
  position: absolute;
  left: 14px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(239, 22, 101, 0.96), rgba(179, 15, 82, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 24px rgba(179, 15, 82, 0.2);
  z-index: 1;
}

.team-message-attachment-button:hover,
.team-message-attachment-button:focus-visible {
  background: linear-gradient(180deg, rgba(239, 22, 101, 1), rgba(179, 15, 82, 1));
}

.team-message-attachment-button img {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.team-message-composer-field textarea {
  padding-left: 58px;
}

.team-message-attachment-preview {
  display: block;
}

.team-message-attachment-preview-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(239, 22, 101, 0.08);
}

.team-message-attachment-preview-image {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
}

.team-message-attachment-preview-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.team-message-attachment-preview-copy strong,
.team-message-attachment-preview-copy span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.team-message-attachment-preview-copy span {
  font-size: 0.8rem;
  color: var(--muted);
}

.team-message-attachment-remove {
  align-self: start;
}

.team-message-composer-status {
  min-height: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.35;
  padding: 2px 4px 0;
}

.team-messaging-page .team-message-composer-status:empty {
  display: none;
}

.team-messaging-page .team-message-composer-status:not(:empty) {
  min-height: 0;
  padding-top: 4px;
}

.messaging-page .status-box {
  margin: 0 22px 18px 26px;
  min-height: 0;
  padding: 10px 14px;
  border-radius: 18px;
}

.messaging-page .status-box.hidden {
  display: none;
}

.messaging-send-button {
  width: 56px;
  min-width: 56px;
  height: 56px;
  border-radius: 999px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  line-height: 1;
  background: #ef1665;
  border: 1px solid rgba(239, 22, 101, 0.12);
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
}

.messaging-send-button:hover,
.messaging-send-button:focus-visible {
  background: #ef1665;
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
}

.messaging-send-button img {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.messaging-page .messaging-send-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  box-shadow: 0 12px 20px rgba(217, 14, 87, 0.16);
}

.messaging-page .messaging-send-button img {
  width: 20px;
  height: 20px;
}

.messaging-page .messaging-thread-pagination {
  margin-top: 12px;
  padding-right: 6px;
}

.disabled-panel {
  opacity: 0.65;
}

.calendar-shell {
  display: grid;
  gap: 18px;
  padding: 0;
}

.widget-shape-loader {
  display: none;
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.calendar-widgets-loading .widget-shape-loader {
  display: block;
}

.calendar-widgets-loading.calendar-page .calendar-view,
.calendar-widgets-loading.tasks-page .task-section-meta,
.calendar-widgets-loading.tasks-page .calendar-task-board-layout {
  display: none !important;
}

.widget-shape-loader::after {
  content: "";
  position: absolute;
  z-index: 5;
  inset: 0;
  pointer-events: none;
  transform: translateX(-110%);
  background: linear-gradient(100deg, transparent 18%, rgba(255, 255, 255, 0.72) 46%, transparent 74%);
  animation: cerebro-widget-shimmer 1.45s ease-in-out infinite;
}

@keyframes cerebro-widget-shimmer {
  100% {
    transform: translateX(110%);
  }
}

.calendar-widget-shape-loader {
  min-height: 1536px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 252, 0.94));
}

.calendar-skeleton-timeline {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  min-height: 1536px;
}

.calendar-skeleton-axis {
  display: grid;
  grid-template-rows: repeat(8, 192px);
  padding-top: 6px;
  border-right: 1px solid rgba(17, 17, 17, 0.06);
}

.calendar-skeleton-axis span {
  width: 48px;
  height: 12px;
  margin-left: 16px;
  border-radius: 999px;
  background: rgba(91, 77, 84, 0.11);
}

.calendar-skeleton-surface {
  position: relative;
  background:
    repeating-linear-gradient(to bottom, rgba(91, 77, 84, 0.065) 0 1px, transparent 1px 24px),
    repeating-linear-gradient(to bottom, rgba(239, 22, 101, 0.035) 0 24px, transparent 24px 96px);
}

.calendar-skeleton-event {
  position: absolute;
  left: 4%;
  width: 56%;
  min-height: 76px;
  border-radius: 16px;
  border-left: 4px solid rgba(239, 22, 101, 0.2);
  background: rgba(239, 22, 101, 0.09);
}

.calendar-skeleton-event::before,
.calendar-skeleton-event::after {
  content: "";
  position: absolute;
  left: 16px;
  height: 11px;
  border-radius: 999px;
  background: rgba(91, 77, 84, 0.12);
}

.calendar-skeleton-event::before {
  top: 18px;
  width: 46%;
}

.calendar-skeleton-event::after {
  top: 42px;
  width: 28%;
}

.calendar-skeleton-event-one { top: 9%; }
.calendar-skeleton-event-two { top: 27%; left: 18%; width: 48%; border-left-color: rgba(255, 190, 27, 0.34); background: rgba(255, 190, 27, 0.11); }
.calendar-skeleton-event-three { top: 51%; left: 8%; width: 68%; border-left-color: rgba(59, 130, 246, 0.25); background: rgba(59, 130, 246, 0.08); }
.calendar-skeleton-event-four { top: 72%; left: 28%; width: 44%; }

@media (prefers-reduced-motion: reduce) {
  .widget-shape-loader::after {
    animation: none;
    transform: none;
    opacity: 0.35;
  }
}

.calendar-top-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.calendar-mode-toggle {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 3px;
  padding: 3px;
  border-radius: 14px;
  background: rgba(43, 37, 48, 0.08);
  border: 1px solid rgba(43, 37, 48, 0.1);
  max-width: 100%;
  justify-content: start;
  align-self: flex-start;
}

.mode-toggle {
  width: auto;
  min-width: 112px;
  min-height: 28px;
  padding: 0 18px;
  border-radius: 10px;
  background: transparent;
  color: rgba(43, 37, 48, 0.68);
  border: 0;
  box-shadow: none;
  font-weight: 700;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.mode-toggle-with-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.mode-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(43, 37, 48, 0.08);
  color: rgba(43, 37, 48, 0.68);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.mode-toggle.active .mode-count-badge {
  background: rgba(43, 37, 48, 0.08);
  color: rgba(24, 21, 28, 0.94);
}

.mode-toggle.active {
  background: rgba(255, 255, 255, 0.98);
  color: var(--surface-ink);
  box-shadow: 0 8px 18px rgba(43, 37, 48, 0.08);
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.calendar-background-refresh-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(239, 22, 101, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(91, 77, 84, 0.08);
}

.calendar-background-refresh-status.is-refreshing::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid rgba(239, 22, 101, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: patient-card-loading-spin 0.85s linear infinite;
}

.calendar-background-refresh-status.is-error {
  color: var(--accent-deep);
  background: rgba(255, 244, 248, 0.96);
}

.tasks-page .calendar-background-refresh-status {
  margin-bottom: 10px;
}

.calendar-toolbar-head-copy {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  min-width: 0;
}

.calendar-toolbar-nav {
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.calendar-toolbar-nav-button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  font-size: 1.05rem;
}

.calendar-toolbar-date-input {
  width: 176px;
  font-size: 1.05rem;
  font-weight: 700;
}

.calendar-view-toggle {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 3px;
  padding: 3px;
  border-radius: 14px;
  background: rgba(43, 37, 48, 0.08);
  border: 1px solid rgba(43, 37, 48, 0.1);
  max-width: 100%;
  justify-content: start;
}

.view-toggle {
  width: auto;
  min-width: 78px;
  min-height: 28px;
  padding: 0 18px;
  border-radius: 10px;
  background: transparent;
  color: rgba(43, 37, 48, 0.68);
  border: 0;
  box-shadow: none;
  font-weight: 700;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.view-toggle.active {
  background: rgba(255, 255, 255, 0.98);
  color: var(--surface-ink);
  box-shadow: 0 8px 18px rgba(43, 37, 48, 0.08);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-left: auto;
  color: var(--muted);
  font-size: 0.92rem;
}

.calendar-debug-box {
  border-radius: 18px;
  border: 1px solid rgba(239, 22, 101, 0.16);
  background: rgba(255, 248, 251, 0.92);
  padding: 16px 18px;
  display: grid;
  gap: 12px;
}

.calendar-debug-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calendar-debug-content {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.patient-dot,
.patient-event {
  background: rgba(239, 22, 101, 0.14);
  border-left: 4px solid var(--accent);
}

.team-dot,
.task-event {
  background: rgba(255, 190, 27, 0.16);
  border-left: 4px solid var(--gold);
}

.event-dot,
.company-event {
  background: rgba(44, 117, 255, 0.12);
  border-left: 4px solid #3b82f6;
}

.history-dot,
.history-event {
  background: rgba(120, 126, 145, 0.14);
  border-left: 4px solid #8b95a7;
}

.day-view-grid {
  display: grid;
  gap: 12px;
}

.day-view-header {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.day-view-body {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 248, 252, 0.95));
  border: 1px solid rgba(17, 17, 17, 0.06);
}

.day-time-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  min-height: 82px;
}

.day-view-timeline {
  position: relative;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  min-height: 1536px;
}

.day-time-axis {
  display: grid;
  grid-template-rows: repeat(16, 96px);
}

.day-time-label {
  padding: 6px 16px 0 16px;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 1px solid rgba(17, 17, 17, 0.06);
}

.day-time-surface {
  position: relative;
  border-left: 1px solid rgba(17, 17, 17, 0.06);
  border-top: 1px solid rgba(17, 17, 17, 0.06);
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(17, 17, 17, 0.055) 0,
      rgba(17, 17, 17, 0.055) 1px,
      transparent 1px,
      transparent 24px
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(239, 22, 101, 0.04) 0,
      rgba(239, 22, 101, 0.04) 24px,
      transparent 24px,
      transparent 96px
    );
}

.day-slot-grid {
  display: grid;
  grid-template-rows: repeat(64, 24px);
}

.day-slot {
  padding: 0;
  margin-top: 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(17, 17, 17, 0.04);
  background: transparent;
  box-shadow: none;
  width: 100%;
  min-width: 0;
}

.empty-slot {
  cursor: pointer;
  transition: background 140ms ease;
}

.empty-slot:hover {
  background: rgba(239, 22, 101, 0.04);
}

.day-events-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.day-events-layer .calendar-event-card {
  position: absolute;
  min-width: 0;
  margin: 0;
  pointer-events: auto;
  overflow: hidden;
  box-sizing: border-box;
}

.calendar-event-card,
.mini-event,
.month-event {
  padding: 10px 12px;
  border-radius: 14px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.calendar-setup-card {
  background: linear-gradient(180deg, rgba(118, 118, 128, 0.18), rgba(118, 118, 128, 0.1));
  border: 1px dashed rgba(82, 82, 91, 0.36);
  box-shadow: 0 10px 20px rgba(82, 82, 91, 0.08);
}

.calendar-setup-card .calendar-entry-title-text,
.calendar-setup-card small {
  color: #52525b;
}

.calendar-setup-connector {
  position: absolute;
  width: 2px;
  min-height: 0;
  border-radius: 999px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(115, 115, 125, 0.55) 0 8px,
    transparent 8px 14px
  );
  pointer-events: none;
  opacity: 0.9;
}

.calendar-setup-connector-focus {
  background: repeating-linear-gradient(
    to bottom,
    rgba(239, 22, 101, 0.4) 0 8px,
    transparent 8px 14px
  );
}

.calendar-entry-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.calendar-entry-copy {
  min-width: 0;
  flex: 1;
}

.calendar-event-card strong,
.mini-event strong {
  display: block;
  margin-bottom: 4px;
}

.calendar-entry-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.calendar-entry-title-text {
  min-width: 0;
  flex: 1;
}

.calendar-invitee-chip {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  flex-shrink: 0;
  min-width: 0;
}

.calendar-invitee-avatar,
.calendar-invitee-chip-count {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(116, 16, 59, 0.18);
}

.calendar-invitee-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: -6px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
}

.calendar-invitee-avatar:first-child {
  margin-left: 0;
}

.calendar-invitee-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: -6px;
  background: linear-gradient(135deg, rgba(255, 79, 146, 0.96), rgba(255, 187, 41, 0.96));
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.calendar-owner-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 2px 0 6px;
}

.calendar-owner-row-inline {
  margin: 0;
  flex: 0 1 auto;
  max-width: 100%;
}

.calendar-owner-row-compact {
  margin: 2px 0 4px;
}

.calendar-owner-avatar {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(116, 16, 59, 0.14);
}

.calendar-owner-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-deep);
}

.month-event-title {
  display: block;
  font-weight: 700;
}

.calendar-linked-patient {
  display: block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  width: auto;
  min-width: 0;
  text-align: left;
}

.calendar-appointment-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.1;
  border: 1px solid rgba(17, 17, 17, 0.06);
}

.calendar-appointment-status-compact {
  margin-top: 4px;
  margin-bottom: 0;
  width: fit-content;
  max-width: 100%;
}

.status-scheduled {
  color: #8f0f4b;
  background: rgba(239, 22, 101, 0.12);
}

.status-confirmed {
  color: #0b7285;
  background: rgba(21, 170, 191, 0.14);
}

.status-completed {
  color: #157347;
  background: rgba(32, 201, 151, 0.16);
}

.status-no-show {
  color: #9a6700;
  background: rgba(255, 190, 27, 0.18);
}

.status-canceled {
  color: #9b1c1c;
  background: rgba(239, 68, 68, 0.14);
}

.status-rescheduled {
  color: #b45309;
  background: rgba(251, 146, 60, 0.16);
}

.calendar-event-card small,
.mini-event small {
  color: var(--muted);
}

.calendar-event-focus {
  box-shadow: 0 0 0 3px rgba(239, 22, 101, 0.2), 0 14px 28px rgba(116, 16, 59, 0.16);
  border-color: rgba(239, 22, 101, 0.3);
}

.day-time-marker {
  position: absolute;
  left: 88px;
  right: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

.day-time-dot {
  position: absolute;
  left: -7px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(239, 22, 101, 0.16);
  transform: translateY(-50%);
}

.day-time-line {
  display: block;
  width: 100%;
  border-top: 3px solid var(--accent);
  box-shadow: 0 0 18px rgba(239, 22, 101, 0.26);
}

.week-view-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background: rgba(255, 255, 255, 0.88);
}

.week-day-card {
  padding: 16px;
  border-radius: 0;
  border: none;
  border-right: 1px solid rgba(17, 17, 17, 0.06);
  background: transparent;
  min-height: 260px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease;
  min-width: 0;
  overflow: hidden;
}

.week-day-card:last-child {
  border-right: none;
}

.week-day-card:hover,
.month-cell:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.08);
}

.week-day-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.06);
}

.week-day-events {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.month-view-grid {
  display: grid;
  gap: 12px;
}

.month-weekdays,
.month-cells {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.month-weekdays span {
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.month-cell {
  min-height: 138px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background: rgba(255, 255, 255, 0.88);
  display: grid;
  align-content: start;
  gap: 10px;
  cursor: pointer;
}

.month-cell-muted {
  opacity: 0.55;
}

.month-cell-date {
  font-weight: 700;
}

.month-cell-events {
  display: grid;
  gap: 8px;
}

.month-event {
  width: 100%;
  text-align: left;
  color: var(--ink);
  border: none;
}

@media (min-width: 901px) {
  body.calendar-page {
    height: calc(100 * var(--vh));
    height: calc(100 * var(--dvh));
    min-height: 0;
    overflow: hidden;
  }

  body.calendar-page .app-shell {
    height: calc(100 * var(--vh));
    height: calc(100 * var(--dvh));
    min-height: 0;
    overflow: hidden;
  }

  body.calendar-page .sidebar,
  body.calendar-page .right-sidebar {
    height: calc(100 * var(--vh));
    height: calc(100 * var(--dvh));
    min-height: 0;
  }

  body.calendar-page .sidebar {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body.calendar-page .main-content {
    height: calc(100 * var(--vh));
    height: calc(100 * var(--dvh));
    min-height: 0;
    overflow: hidden;
  }

  body.calendar-page .main-content > .account-topbar,
  body.calendar-page .calendar-toolbar,
  body.calendar-page .calendar-debug-box:not(.hidden) {
    flex: 0 0 auto;
  }

  body.calendar-page .calendar-shell {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
  }

  body.calendar-page .calendar-view:not(.hidden) {
    flex: 1 1 auto;
    min-height: 0;
    padding-right: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  body.calendar-page .calendar-widget-shape-loader {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }
}

.calendar-task-check {
  margin-top: 2px;
  flex-shrink: 0;
}

.calendar-composer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1660;
  overflow: hidden;
  overscroll-behavior: contain;
  padding: 20px 0;
}

.calendar-composer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(35, 8, 20, 0.44);
  backdrop-filter: blur(4px);
}

.calendar-composer-modal {
  position: relative;
  width: min(620px, calc(calc(100 * var(--vw)) - 40px));
  max-height: calc(calc(100 * var(--vh)) - 40px);
  margin: min(42px, calc(5 * var(--vh))) auto;
  padding: 24px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 28px 70px rgba(49, 8, 26, 0.22);
  overflow-y: auto;
}

.task-list-editor-modal {
  width: min(520px, calc(calc(100 * var(--vw)) - 40px));
  margin-top: min(120px, calc(12 * var(--vh)));
}

.task-list-editor-modal h2 {
  margin-bottom: 0;
}

.task-list-editor-actions {
  margin-top: 6px;
}

.task-list-editor-actions .sidebar-task-header-button {
  width: 100%;
}

.calendar-composer-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.calendar-composer-close {
  width: auto;
  min-width: 90px;
}

.calendar-composer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: center;
}

#composerTaskScheduleToggleRow {
  grid-template-columns: minmax(0, 1fr);
}

.calendar-composer-actions > button {
  width: 100%;
}

.calendar-composer-modal .calendar-delete-button.secondary-button {
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.14);
  box-shadow: 0 10px 22px rgba(116, 16, 59, 0.08);
}

.calendar-composer-overlay.is-task-creating .calendar-delete-button,
.calendar-composer-overlay.is-task-editing #sidebarCalendarComposerCancelButton,
.calendar-composer-overlay.is-task-editing #composerDiscardButton {
  display: none;
}

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

.composer-grid.composer-grid-triple,
#composerTimeRow.composer-grid-events-time {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#composerAppointmentStatusRow,
#composerInviteRow,
#sidebarCalendarComposerStatusRow,
#sidebarCalendarComposerInviteRow {
  grid-template-columns: minmax(0, 1fr);
}

#composerPatientRow {
  display: grid;
  gap: 12px;
}

#composerAppointmentStatusRow > label,
#composerInviteRow > label,
#sidebarCalendarComposerStatusRow > label,
#sidebarCalendarComposerInviteRow > label {
  width: 100%;
}

#sidebarTaskMetaRow {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.sidebar-task-meta-cell {
  width: 100%;
}

#sidebarTaskScheduleToggleRow {
  display: block;
}

#sidebarTaskScheduleToggleRow > button {
  width: 100%;
}

.composer-status-help {
  display: flex;
  align-items: center;
  min-height: 100%;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 248, 252, 0.9);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.calendar-inline-feedback {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 187, 209, 0.45);
  background: rgba(255, 244, 248, 0.96);
  color: #b11b59;
  font-weight: 700;
}

.calendar-inline-feedback.is-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  border-color: rgba(22, 83, 165, 0.18);
  background: rgba(240, 247, 255, 0.98);
  color: #1653a5;
}

.calendar-inline-feedback.is-loading::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 2px solid rgba(22, 83, 165, 0.18);
  border-top-color: #1653a5;
  animation: patient-card-loading-spin 0.85s linear infinite;
}

.calendar-composer-overlay.is-saving .calendar-composer-backdrop {
  cursor: progress;
}

.calendar-sync-loading-shell {
  position: fixed;
  inset: 0;
  z-index: 1465;
}

.calendar-composer-overlay.is-saving .calendar-composer-close,
.calendar-composer-overlay.is-saving .secondary-button,
.calendar-composer-overlay.is-saving .composer-tag-add-button,
.calendar-composer-overlay.is-saving .composer-tag-summary,
.calendar-composer-overlay.is-saving .composer-invite-picker-close,
.calendar-composer-overlay.is-saving .calendar-status-pill {
  pointer-events: none;
}

.calendar-detail-status-shell {
  display: grid;
  gap: 12px;
}

.calendar-detail-status-label {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.calendar-detail-status-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.calendar-status-pill-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.calendar-status-pill,
.calendar-detail-status-pill {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(239, 22, 101, 0.16);
  background: rgba(255, 239, 245, 0.8);
  color: #7d6480;
  font-weight: 700;
  box-shadow: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.calendar-status-pill {
  width: 100%;
  min-height: 48px;
  line-height: 1.1;
}

.calendar-detail-status-pill:hover,
.calendar-detail-status-pill:focus-visible,
.calendar-status-pill:hover,
.calendar-status-pill:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(239, 22, 101, 0.28);
  color: var(--accent-deep);
}

.calendar-detail-status-pill.is-active,
.calendar-status-pill.is-active {
  border-color: rgba(239, 22, 101, 0.28);
  color: #fff9fd;
  box-shadow: 0 12px 24px rgba(116, 16, 59, 0.18);
}

.calendar-status-pill.status-scheduled.is-active,
.calendar-detail-status-pill.status-scheduled.is-active {
  background: linear-gradient(135deg, #f43f8f, #be185d);
}

.calendar-status-pill.status-confirmed.is-active,
.calendar-detail-status-pill.status-confirmed.is-active {
  background: linear-gradient(135deg, #38bdf8, #0f766e);
  border-color: rgba(21, 170, 191, 0.34);
}

.calendar-status-pill.status-completed.is-active,
.calendar-detail-status-pill.status-completed.is-active {
  background: linear-gradient(135deg, #34d399, #157347);
  border-color: rgba(32, 201, 151, 0.34);
}

.calendar-status-pill.status-no-show.is-active,
.calendar-detail-status-pill.status-no-show.is-active {
  background: linear-gradient(135deg, #fbbf24, #b45309);
  border-color: rgba(255, 190, 27, 0.34);
}

.calendar-status-pill.status-canceled.is-active,
.calendar-detail-status-pill.status-canceled.is-active {
  background: linear-gradient(135deg, #f87171, #b91c1c);
  border-color: rgba(239, 68, 68, 0.34);
}

.calendar-status-pill.status-rescheduled.is-active,
.calendar-detail-status-pill.status-rescheduled.is-active {
  background: linear-gradient(135deg, #fb923c, #c2410c);
  border-color: rgba(251, 146, 60, 0.34);
}

.calendar-status-pill.status-active.is-active,
.calendar-detail-status-pill.status-active.is-active {
  background: linear-gradient(135deg, #34d399, #157347);
  border-color: rgba(32, 201, 151, 0.34);
}

.calendar-status-pill.status-cancelled.is-active,
.calendar-detail-status-pill.status-cancelled.is-active {
  background: linear-gradient(135deg, #f87171, #b91c1c);
  border-color: rgba(239, 68, 68, 0.34);
}

.calendar-status-pill-group-composer {
  margin-top: 10px;
}

.calendar-status-pill-group-composer-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: center;
  width: 100%;
}

.calendar-status-pill-composer-split {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.calendar-status-editor {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.composer-recurring-shell {
  display: flex;
}

.composer-recurring-button {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(255, 187, 209, 0.9);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.12), rgba(255, 190, 27, 0.18));
  color: #6f5260;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(116, 16, 59, 0.08);
}

.composer-recurring-button:hover,
.composer-recurring-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(116, 16, 59, 0.12);
}

.composer-recurring-button.is-active {
  background: linear-gradient(135deg, #ef1665, #ffbe1b);
  color: #fff;
  box-shadow: 0 16px 32px rgba(239, 22, 101, 0.22);
}

.composer-custom-recurrence {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(239, 22, 101, 0.12);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 248, 251, 0.98), rgba(255, 251, 241, 0.96));
}

.composer-custom-recurrence-label {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a04b72;
}

.composer-custom-recurrence-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.composer-custom-recurrence-day {
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.9);
  color: #3b3138;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 8px 18px rgba(17, 17, 17, 0.04);
}

.composer-custom-recurrence-day:hover,
.composer-custom-recurrence-day:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(239, 22, 101, 0.22);
}

.composer-custom-recurrence-day.is-active {
  border-color: rgba(255, 187, 209, 0.9);
  background: linear-gradient(135deg, #ef1665, #ffbe1b);
  color: #fff;
  box-shadow: 0 14px 26px rgba(239, 22, 101, 0.18);
}

.composer-patient-search-shell {
  position: relative;
}

.composer-tag-shell {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.composer-tags-row {
  min-width: 0;
}

.composer-tag-add-button {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border: 0;
  border-radius: 999px;
  background: #ef1665;
  color: #fff;
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.composer-tag-add-button:hover,
.composer-tag-add-button:focus-visible {
  transform: translateY(-1px);
  background: #ef1665;
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
}

.composer-tag-add-button.composer-tag-add-button-compact {
  width: auto;
  height: 42px;
  flex: 0 0 auto;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border: 1px solid rgba(239, 22, 101, 0.24);
  background: rgba(255, 255, 255, 0.96);
  color: var(--accent);
  box-shadow: none;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.composer-tag-add-button.composer-tag-add-button-compact:hover,
.composer-tag-add-button.composer-tag-add-button-compact:focus-visible {
  border-color: rgba(239, 22, 101, 0.28);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 10px 22px rgba(116, 16, 59, 0.08);
  transform: none;
}

.composer-tag-add-button-compact .composer-tag-add-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1;
}

.composer-tag-add-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.composer-tag-add-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.composer-tag-summary {
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: none;
  text-align: left;
}

.composer-tag-summary:hover,
.composer-tag-summary:focus-visible {
  border-color: rgba(239, 22, 101, 0.18);
  background: rgba(255, 248, 252, 0.98);
}

.composer-tag-summary.composer-tag-chip-list {
  display: flex;
  flex: 1 1 360px;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: auto;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.composer-tag-summary.composer-tag-chip-list:empty {
  display: none;
}

.composer-tag-chip-list .team-group-member-chip {
  margin: 0;
}

.composer-invite-placeholder {
  color: var(--muted);
  font-weight: 600;
}

.composer-invite-picker {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(44, 14, 24, 0.22);
  backdrop-filter: blur(8px);
}

.composer-invite-picker-card {
  width: min(100%, 420px);
  max-height: min(calc(70 * var(--vh)), 560px);
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 26px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: linear-gradient(180deg, rgba(255, 252, 253, 0.98), rgba(255, 246, 249, 0.96));
  box-shadow: 0 28px 60px rgba(49, 8, 26, 0.2);
}

.composer-invite-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.composer-invite-picker-head strong {
  font-size: 1.05rem;
}

.composer-invite-picker-close {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(239, 22, 101, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  box-shadow: none;
  font-size: 1.3rem;
  line-height: 1;
}

.composer-invite-picker input {
  margin: 0;
}

.composer-invite-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.composer-invite-summary-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.composer-invite-summary-copy strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-invite-summary-role {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.composer-invite-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  letter-spacing: 0;
}

.composer-invite-avatar-initials {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #fff !important;
  font: inherit;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  padding-bottom: 0;
  margin: 0;
}

.composer-patient-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 5;
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 44px rgba(49, 8, 26, 0.16);
}

.composer-patient-suggestion {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  text-align: left;
  background: rgba(255, 247, 250, 0.9);
  color: var(--ink);
  border: 1px solid rgba(239, 22, 101, 0.08);
  box-shadow: none;
}

.composer-patient-suggestion strong,
.composer-patient-suggestion span {
  display: block;
}

.composer-patient-suggestion strong {
  font-size: 0.98rem;
}

.composer-patient-suggestion span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.composer-patient-suggestion.is-active {
  border-color: rgba(239, 22, 101, 0.18);
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.1), rgba(255, 190, 27, 0.12));
}

.composer-invite-suggestions {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  max-height: min(calc(42 * var(--vh)), 320px);
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.composer-invite-suggestion {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.composer-invite-suggestion-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.composer-invite-suggestion-copy strong,
.composer-invite-suggestion-copy span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-invite-summary-stack {
  display: flex;
  align-items: center;
}

.composer-invite-summary-stack .composer-invite-avatar + .composer-invite-avatar {
  margin-left: -10px;
  border: 2px solid rgba(255, 255, 255, 0.92);
}

.task-hub {
  display: grid;
  gap: 18px;
}

.tasks-widget-shape-loader {
  min-height: 470px;
}

.task-skeleton-meta,
.task-skeleton-line,
.task-skeleton-option,
.task-skeleton-column-head span,
.task-skeleton-column-head i,
.task-skeleton-column > b,
.task-skeleton-card {
  display: block;
  border-radius: 999px;
  background: rgba(91, 77, 84, 0.11);
}

.task-skeleton-meta {
  width: 270px;
  max-width: 62%;
  height: 14px;
  margin-bottom: 18px;
}

.task-skeleton-board {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.task-skeleton-sidebar,
.task-skeleton-column {
  border: 1px solid rgba(91, 77, 84, 0.12);
  background: rgba(247, 247, 249, 0.88);
}

.task-skeleton-sidebar {
  display: grid;
  gap: 14px;
  min-height: 330px;
  padding: 16px;
  border-radius: 22px;
}

.task-skeleton-line-short { width: 44px; height: 9px; }
.task-skeleton-line-title { width: 112px; height: 17px; }
.task-skeleton-line-action { width: 128px; height: 14px; margin-top: 8px; }

.task-skeleton-option {
  width: 100%;
  height: 38px;
  border-radius: 12px;
}

.task-skeleton-columns {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 1fr);
  gap: 18px;
  min-width: 0;
  overflow: hidden;
}

.task-skeleton-column {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 430px;
  padding: 14px;
  border-radius: 24px;
}

.task-skeleton-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
}

.task-skeleton-column-head span { width: 46%; height: 17px; }
.task-skeleton-column-head i { width: 42px; height: 42px; }
.task-skeleton-column > b { width: 92px; height: 13px; margin: 5px 8px 10px; }

.task-skeleton-card {
  height: 124px;
  border-radius: 20px;
  border: 1px solid rgba(91, 77, 84, 0.08);
  background:
    linear-gradient(rgba(91, 77, 84, 0.11), rgba(91, 77, 84, 0.11)) 56px 24px / 54% 14px no-repeat,
    linear-gradient(rgba(91, 77, 84, 0.08), rgba(91, 77, 84, 0.08)) 56px 50px / 38% 11px no-repeat,
    radial-gradient(circle, rgba(239, 22, 101, 0.12) 0 13px, transparent 14px) 16px 16px / 28px 28px no-repeat,
    rgba(255, 255, 255, 0.96);
}

.task-skeleton-card-short {
  height: 96px;
}

@media (max-width: 760px) {
  .task-skeleton-board {
    grid-template-columns: 1fr;
  }

  .task-skeleton-columns {
    grid-auto-columns: minmax(280px, calc(calc(100 * var(--vw)) - 72px));
  }
}

.tasks-page .task-hub {
  padding: 20px;
}

body.tasks-page .task-section-meta {
  display: none;
}

@media (min-width: 901px) {
  body.tasks-page {
    height: calc(100 * var(--vh));
    height: calc(100 * var(--dvh));
    min-height: 0;
    overflow: hidden;
  }

  body.tasks-page .app-shell {
    height: calc(100 * var(--vh));
    height: calc(100 * var(--dvh));
    min-height: 0;
    overflow: hidden;
  }

  body.tasks-page .sidebar,
  body.tasks-page .right-sidebar {
    height: calc(100 * var(--vh));
    height: calc(100 * var(--dvh));
    min-height: 0;
  }

  body.tasks-page .sidebar {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body.tasks-page .main-content {
    height: calc(100 * var(--vh));
    height: calc(100 * var(--dvh));
    min-height: 0;
    overflow: hidden;
  }

  body.tasks-page .main-content > .account-topbar {
    flex: 0 0 auto;
  }

  body.tasks-page .task-hub {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
    overflow: hidden;
  }

  body.tasks-page .tasks-widget-shape-loader {
    flex: 1 1 auto;
    min-height: 0;
  }

  body.tasks-page .task-section-meta,
  body.tasks-page .calendar-background-refresh-status {
    flex: 0 0 auto;
  }

  body.tasks-page .calendar-task-board-layout {
    flex: 1 1 auto;
    min-height: 0;
    align-items: stretch;
    overflow: hidden;
  }

  body.tasks-page .calendar-task-list-sidebar {
    position: static;
    align-self: start;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 360px;
    min-height: 360px;
    max-height: 360px;
    overflow: hidden;
  }

  body.tasks-page .calendar-task-list-selector {
    min-height: 0;
    align-content: start;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  body.tasks-page .calendar-task-list-create-link {
    align-self: end;
  }

  body.tasks-page #calendarTaskList {
    height: 100%;
    min-height: 0;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
  }

  body.tasks-page .calendar-task-list-column {
    height: 100%;
    min-height: 0;
  }

  body.tasks-page .calendar-task-list-column.has-no-add-action {
    grid-template-rows: auto minmax(0, 1fr);
  }

  body.tasks-page .calendar-task-list-column-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
}

.task-hub-head {
  align-items: end;
}

.task-hub-head-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

.task-hub-mode-toggle {
  padding: 4px;
  gap: 8px;
}

.task-hub-mode-toggle .mode-toggle {
  min-width: 102px;
  padding: 8px 16px;
}

.task-hub-add-button {
  width: auto;
  min-width: 132px;
  padding: 10px 18px;
  white-space: nowrap;
}

.task-quick-add {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: center;
}

.task-section-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.task-stack {
  display: grid;
  gap: 0;
}

.calendar-task-board-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  min-width: 0;
}

.calendar-task-list-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(91, 77, 84, 0.12);
  border-radius: 22px;
  background: rgba(248, 249, 251, 0.9);
}

.calendar-task-list-sidebar-head {
  display: grid;
  gap: 3px;
}

.calendar-task-list-sidebar-head strong {
  font-size: 1.08rem;
}

.calendar-task-list-selector {
  display: grid;
  gap: 4px;
}

.calendar-task-list-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 12px;
  cursor: pointer;
}

.calendar-task-list-option:has(input:checked) {
  background: rgba(53, 137, 221, 0.12);
}

.calendar-task-list-option input {
  width: 18px;
  height: 18px;
  accent-color: #2578d4;
}

.calendar-task-list-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-task-list-option small {
  color: var(--muted);
}

.calendar-task-list-create-link,
.calendar-task-list-add {
  width: 100%;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #1769c2;
  font-weight: 800;
  text-align: left;
}

.calendar-task-list-create-link {
  padding: 10px;
  border-top: 1px solid rgba(91, 77, 84, 0.1);
  border-radius: 0;
}

.calendar-task-list-add {
  padding: 4px 8px 10px;
}

.calendar-task-list-create-link:hover,
.calendar-task-list-create-link:focus-visible,
.calendar-task-list-add:hover,
.calendar-task-list-add:focus-visible {
  background: rgba(37, 120, 212, 0.08);
  color: #1259a5;
}

#calendarTaskList {
  min-width: 0;
  grid-auto-columns: minmax(320px, 380px);
  grid-auto-flow: column;
  align-items: start;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 20px;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
}

.calendar-task-no-lists-selected {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 30px;
  border: 1px dashed rgba(37, 120, 212, 0.24);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
}

.calendar-task-list-column {
  display: grid;
  grid-template-rows: auto auto minmax(210px, 1fr);
  gap: 12px;
  min-height: 430px;
  padding: 14px;
  border: 1px solid rgba(91, 77, 84, 0.14);
  border-radius: 24px;
  background: rgba(247, 247, 249, 0.88);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.calendar-task-list-column.has-no-add-action {
  grid-template-rows: auto minmax(210px, 1fr);
}

.calendar-task-list-column.is-drag-over {
  border-color: rgba(239, 22, 101, 0.42);
  background: rgba(255, 240, 246, 0.92);
  box-shadow: inset 0 0 0 2px rgba(239, 22, 101, 0.08);
}

.calendar-task-list-column-head,
.calendar-task-list-column-tools {
  display: flex;
  align-items: center;
}

.calendar-task-list-column-head {
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
}

.calendar-task-list-column-head h4 {
  margin: 0;
  overflow: hidden;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-task-list-column-tools {
  gap: 6px;
}

.calendar-task-list-count {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.1);
  color: var(--accent-deep);
  font-weight: 800;
}

.calendar-task-list-column-body {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.calendar-task-list-pagination-status {
  padding: 8px 10px 2px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.calendar-task-list-tag-row {
  display: flex;
  flex-wrap: wrap;
}

.calendar-task-list-name-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  min-height: 29px;
  max-width: 100%;
  padding: 3px 8px 3px 4px;
  border: 1px solid color-mix(in srgb, #2578d4 50%, #fff);
  border-radius: 999px;
  background: color-mix(in srgb, #2578d4 12%, #fff);
  color: #1769c2;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.calendar-task-list-name-tag-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border-radius: 999px;
  background: #2578d4;
  color: #fff;
}

.calendar-task-list-name-tag-icon svg {
  width: 11px;
  height: 11px;
}

.calendar-task-list-empty {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 20px;
  border: 1px dashed rgba(239, 22, 101, 0.24);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

.task-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 244, 248, 0.92));
}

.calendar-task-workspace-row {
  position: relative;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 18px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.calendar-task-list-column .calendar-task-workspace-row {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  padding: 16px;
  border: 1px solid rgba(91, 77, 84, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 26px rgba(79, 46, 62, 0.06);
  cursor: grab;
}

.calendar-task-list-column .calendar-task-workspace-row.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.calendar-task-list-column .calendar-task-workspace-row + .calendar-task-workspace-row {
  border-top: 1px solid rgba(91, 77, 84, 0.12);
}

.calendar-task-list-column .calendar-task-workspace-row .calendar-task-action-menu {
  top: 8px;
  right: 8px;
}

.calendar-task-list-column .calendar-task-workspace-content {
  padding-right: 34px;
}

@media (max-width: 760px) {
  .calendar-task-board-layout {
    grid-template-columns: 1fr;
  }

  .calendar-task-list-sidebar {
    position: static;
  }

  #calendarTaskList {
    grid-auto-columns: minmax(280px, calc(calc(100 * var(--vw)) - 72px));
  }
}

.calendar-task-workspace-row + .calendar-task-workspace-row {
  border-top: 1px solid rgba(228, 206, 217, 0.34);
}

.calendar-task-workspace-row:has(.pipeline-lead-action-popover:not(.hidden)) {
  position: relative;
  z-index: 20;
}

.calendar-task-workspace-content {
  gap: 8px;
  min-width: 0;
  padding-right: 44px;
  cursor: pointer;
}

.calendar-task-workspace-content:focus-visible {
  outline: 2px solid rgba(239, 22, 101, 0.34);
  outline-offset: 4px;
  border-radius: 8px;
}

.calendar-task-workspace-row .calendar-task-action-menu {
  position: absolute;
  top: 10px;
  right: 0;
  z-index: 8;
}

.calendar-task-action-popover {
  transition: width 140ms ease;
}

.calendar-task-action-popover.has-patient-list {
  width: min(240px, calc(calc(100 * var(--vw)) - 40px));
}

.calendar-task-patients-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calendar-task-patient-options {
  display: grid;
  gap: 2px;
  margin: 2px 0 5px;
  padding: 5px 0;
  border-top: 1px solid rgba(17, 17, 17, 0.07);
  border-bottom: 1px solid rgba(17, 17, 17, 0.07);
}

.calendar-task-patient-options button {
  overflow: hidden;
  color: var(--accent-deep);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-task-action-menu .pipeline-lead-action-popover button:disabled,
.calendar-task-action-menu .pipeline-lead-action-popover button:disabled:hover,
.calendar-task-action-menu .pipeline-lead-action-popover button:disabled:focus-visible {
  background: transparent;
  color: rgba(91, 77, 84, 0.38);
  cursor: not-allowed;
}

.calendar-task-tag-list {
  margin-top: 1px;
}

.task-row-complete {
  opacity: 0.7;
}

.calendar-task-workspace-row.task-row-complete .task-row-title-group strong,
.calendar-task-workspace-row.task-row-complete .task-row-body > small {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.task-check {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 999px;
  padding: 0;
  border: 2px solid rgba(239, 22, 101, 0.38);
  background: transparent;
  box-shadow: none;
  opacity: 1;
  transform: none;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.task-check::after {
  content: "";
  width: 7px;
  height: 12px;
  margin-top: -2px;
  border-right: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  opacity: 0;
  transform: rotate(45deg) scale(0.72);
  transform-origin: center;
  transition: opacity 120ms ease, transform 140ms ease;
}

.task-check:not(.checked):hover,
.task-check:not(.checked):focus-visible {
  border-color: var(--accent);
  background: transparent;
  box-shadow: none;
  opacity: 1;
  transform: none;
}

.task-check:not(.checked):hover::after,
.task-check:not(.checked):focus-visible::after {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.task-check.checked {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 6px 14px rgba(239, 22, 101, 0.22);
  opacity: 1;
  transform: none;
}

.task-check.checked::after {
  border-color: #fff;
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

.task-check.checked:hover,
.task-check.checked:focus-visible {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 6px 14px rgba(239, 22, 101, 0.22);
  opacity: 1;
  transform: none;
}

.task-row-body {
  display: grid;
  gap: 6px;
}

.task-row-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.task-row-title-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.task-row-top strong {
  font-size: 1rem;
  min-width: 0;
}

.task-row-body p {
  margin: 0;
  color: var(--muted);
}

.task-row-body small {
  color: var(--muted);
}

.task-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 190, 27, 0.18);
  color: #8d5b00;
  font-size: 0.8rem;
  font-weight: 700;
}

.task-complete-card {
  opacity: 0.68;
}

.lead-page-grid {
  align-items: start;
}

.lead-list-helper {
  margin: 0;
}

.feed,
.calendar-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.feed-item,
.calendar-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.feed-item strong,
.calendar-item strong {
  display: block;
  margin-bottom: 4px;
}

.reports-duplicate-summary,
.reports-duplicate-match-list,
.reports-duplicate-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reports-duplicate-summary {
  margin-top: 12px;
}

.reports-duplicate-item {
  display: grid;
  gap: 14px;
}

.reports-duplicate-head,
.reports-duplicate-record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.reports-duplicate-head small {
  display: block;
  margin-top: 4px;
}

.reports-duplicate-records {
  display: grid;
  gap: 10px;
}

.reports-duplicate-record {
  gap: 8px;
}

.lead-pipeline-item {
  display: grid;
  gap: 10px;
}

.lead-pipeline-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.lead-pipeline-head strong {
  margin-bottom: 0;
}

.lead-pipeline-mini-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.lead-pipeline-mini-step {
  height: 8px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.08);
}

.lead-pipeline-mini-step.complete {
  background: linear-gradient(90deg, #8fa2ad, #f4cb00);
}

.lead-pipeline-mini-step.active {
  background: #4099f2;
}

.sales-history-item {
  display: grid;
  gap: 10px;
}

.reports-widget-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.reports-widget-column {
  display: contents;
}

.reports-widget-grid .reports-widget-card {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.reports-three-column-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

/* Keep every desktop report card inside its own grid track when the shared
   right sidebar is open. The cards use true fluid dimensions; their internal
   spacing and type compact without widening the grid items. */
@media (min-width: 1181px) {
  body.reports-page:not(.right-sidebar-collapsed) .reports-widget-grid,
  body.reports-page:not(.right-sidebar-collapsed) .reports-three-column-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  body.reports-page:not(.right-sidebar-collapsed) .reports-widget-grid .reports-widget-card,
  body.reports-page:not(.right-sidebar-collapsed) .reports-three-column-grid > .panel,
  body.reports-page:not(.right-sidebar-collapsed) .reports-three-column-grid > .calls-summary-column {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    zoom: 1;
  }

  body.reports-page:not(.right-sidebar-collapsed) .reports-widget-grid .panel,
  body.reports-page:not(.right-sidebar-collapsed) .reports-three-column-grid > .panel {
    padding: 14px;
  }

  body.reports-page:not(.right-sidebar-collapsed) .reports-widget-card,
  body.reports-page:not(.right-sidebar-collapsed) .reports-widget-side,
  body.reports-page:not(.right-sidebar-collapsed) .reports-widget-main,
  body.reports-page:not(.right-sidebar-collapsed) .calls-dashboard-panel,
  body.reports-page:not(.right-sidebar-collapsed) .calls-summary-column {
    min-width: 0;
    gap: 8px;
  }

  body.reports-page:not(.right-sidebar-collapsed) .reports-widget-side h3,
  body.reports-page:not(.right-sidebar-collapsed) .calls-dashboard-panel h3 {
    font-size: 0.82rem;
  }

  body.reports-page:not(.right-sidebar-collapsed) .reports-widget-grid .eyebrow,
  body.reports-page:not(.right-sidebar-collapsed) .reports-three-column-grid .eyebrow {
    font-size: 0.68rem;
  }

  body.reports-page:not(.right-sidebar-collapsed) .reports-widget-grid .chip,
  body.reports-page:not(.right-sidebar-collapsed) .reports-widget-grid .goal-mode-button,
  body.reports-page:not(.right-sidebar-collapsed) .reports-three-column-grid .chip,
  body.reports-page:not(.right-sidebar-collapsed) .reports-three-column-grid .goal-mode-button,
  body.reports-page:not(.right-sidebar-collapsed) .reports-three-column-grid .calls-activity-range-button {
    padding: 6px 9px;
    font-size: 0.72rem;
  }

  body.reports-page:not(.right-sidebar-collapsed) .reports-funnel-controls,
  body.reports-page:not(.right-sidebar-collapsed) .goal-mode-switcher,
  body.reports-page:not(.right-sidebar-collapsed) .calls-activity-range-toggle,
  body.reports-page:not(.right-sidebar-collapsed) .calls-activity-head-actions {
    gap: 6px;
  }

  body.reports-page:not(.right-sidebar-collapsed) .reports-funnel-chart,
  body.reports-page:not(.right-sidebar-collapsed) .reports-sales-bars-chart,
  body.reports-page:not(.right-sidebar-collapsed) .reports-conversion-trend-chart,
  body.reports-page:not(.right-sidebar-collapsed) .calls-activity-chart,
  body.reports-page:not(.right-sidebar-collapsed) .calls-outcome-chart,
  body.reports-page:not(.right-sidebar-collapsed) .calls-rep-chart,
  body.reports-page:not(.right-sidebar-collapsed) .calls-timing-chart {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    gap: 8px;
    overflow: hidden;
  }

  body.reports-page:not(.right-sidebar-collapsed) .reports-sales-horizontal-item {
    grid-template-columns: minmax(84px, 110px) minmax(0, 1fr);
    gap: 7px;
    padding: 6px 8px;
  }

  body.reports-page:not(.right-sidebar-collapsed) .reports-conversion-trend-shell,
  body.reports-page:not(.right-sidebar-collapsed) .calls-activity-line-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  body.reports-page:not(.right-sidebar-collapsed) .reports-conversion-trend-svg,
  body.reports-page:not(.right-sidebar-collapsed) .calls-activity-line-chart {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  body.reports-page:not(.right-sidebar-collapsed) .reports-conversion-trend-svg {
    min-width: 0;
  }

  body.reports-page:not(.right-sidebar-collapsed) .calls-kpi-grid .metric-card {
    min-width: 0;
    min-height: 118px;
    padding: 10px;
  }

  body.reports-page:not(.right-sidebar-collapsed) .calls-kpi-grid .metric-card strong {
    font-size: clamp(1.25rem, calc(1.65 * var(--vw)), 2rem);
  }
}

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

.reports-subsection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.reports-subsection-filter-toolbar {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 42px;
  margin: 0 0 10px;
}

.reports-subsection-filter-toolbar .reports-chart-action-menu {
  position: relative;
}

.reports-subsection-filter-toolbar .pipeline-lead-action-trigger {
  position: relative;
  inset: auto;
}

body.reports-page .reports-chart-action-menu,
body.reports-page .reports-chart-filter-chips,
body.reports-page [data-pipeline-menu-host] {
  display: none !important;
}

.reports-change-scope-button {
  min-height: 46px;
  padding: 7px 18px 7px 8px;
  font-size: 0.94rem;
}

.reports-change-scope-button .pipeline-board-tag-filter-plus {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  font-size: 1.25rem;
}

.reports-section-scope-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  max-width: min(620px, calc(56 * var(--vw)));
  padding-block: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.reports-section-scope-summary:empty {
  display: none;
}

.reports-section-scope-tag {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 6px 13px 6px 7px;
  font-size: 0.88rem;
}

.reports-section-scope-tag .pipeline-board-selected-tag-icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}

.reports-section-scope-tag .pipeline-board-selected-tag-icon svg {
  width: 15px;
  height: 15px;
}

#reportsScopePicker,
#qaAnalyzerScopePicker,
#callsMissedScopePicker {
  z-index: 1710;
}

#reportsScopePicker .reports-scope-modal,
#qaAnalyzerScopePicker .reports-scope-modal,
#callsMissedScopePicker .reports-scope-modal {
  width: min(1040px, calc(calc(100 * var(--vw)) - 32px));
}

#reportsScopePicker [data-reports-scope-tab].hidden {
  display: none !important;
}

:is(#reportsScopePicker, #qaAnalyzerScopePicker, #callsMissedScopePicker) .team-group-modal-actions {
  width: 100%;
}

:is(#reportsScopePicker, #qaAnalyzerScopePicker, #callsMissedScopePicker) .team-group-modal-actions > .muted {
  flex: 1 1 auto;
  min-width: 0;
}

:is(#reportsScopePicker, #qaAnalyzerScopePicker, #callsMissedScopePicker) .team-group-modal-action-buttons {
  display: grid;
  flex: 0 1 420px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 420px);
  gap: 10px;
}

:is(#reportsScopePicker, #qaAnalyzerScopePicker, #callsMissedScopePicker) .team-group-modal-action-buttons > button {
  width: 100%;
  min-width: 0;
  margin: 0;
}

@media (max-width: 620px) {
  :is(#reportsScopePicker, #qaAnalyzerScopePicker, #callsMissedScopePicker) .team-group-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  :is(#reportsScopePicker, #qaAnalyzerScopePicker, #callsMissedScopePicker) .team-group-modal-action-buttons {
    flex-basis: auto;
  }
}

.reports-scope-browser {
  min-height: 380px;
}

.reports-scope-browser.is-timeframe {
  grid-template-columns: 210px minmax(0, 1fr);
}

.reports-scope-results {
  max-height: 380px;
  padding: 18px 24px 18px;
}

.reports-scope-timeframe-options {
  display: grid;
  gap: 12px;
}

.reports-scope-timeframe-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-height: 68px;
  padding: 14px 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font: inherit;
  text-align: left;
  box-shadow: none;
}

.reports-scope-timeframe-option > span:first-child {
  display: grid;
  gap: 3px;
}

.reports-scope-timeframe-option small {
  color: var(--muted);
  font-size: 0.82rem;
}

.reports-scope-timeframe-option:hover,
.reports-scope-timeframe-option:focus-visible,
.reports-scope-timeframe-option.is-selected {
  border-color: rgba(239, 22, 101, 0.24);
  background: linear-gradient(135deg, rgba(255, 241, 246, 0.98), rgba(255, 247, 228, 0.95));
}

.reports-scope-timeframe-check {
  min-width: 76px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.06);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.reports-scope-timeframe-option.is-selected .reports-scope-timeframe-check {
  background: rgba(239, 22, 101, 0.14);
  color: var(--accent-deep);
}

.reports-scope-custom-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(239, 22, 101, 0.16);
  border-radius: 18px;
  background: rgba(255, 249, 251, 0.82);
}

.reports-scope-custom-range label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.reports-scope-custom-range input {
  width: 100%;
}

.reports-scope-selected {
  min-height: 46px;
  padding-block: 8px;
}

.reports-scope-error {
  margin: 0 0 12px;
  color: #b80f53;
  font-size: 0.86rem;
  font-weight: 800;
}

@media (max-width: 720px) {
  .reports-subsection-filter-toolbar {
    align-items: flex-end;
    flex-direction: column-reverse;
  }

  .reports-section-scope-summary {
    max-width: 100%;
    justify-content: flex-start;
  }

  .reports-scope-browser,
  .reports-scope-browser.has-team-hierarchy,
  .reports-scope-browser.is-timeframe {
    grid-template-columns: 1fr;
  }

  .reports-scope-browser .unified-entity-tag-targets {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .reports-scope-browser .unified-entity-tag-groups {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .reports-scope-custom-range {
    grid-template-columns: 1fr;
  }
}

.reports-master-detail-shell {
  display: grid;
  grid-template-columns: clamp(130px, calc(10.67 * var(--vw)), 167px) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  min-height: calc(calc(100 * var(--vh)) - 48px);
}

.reports-master-pane {
  position: sticky;
  top: 18px;
  align-self: start;
  min-height: calc(calc(100 * var(--vh)) - 48px);
  padding: 24px 0 0;
  border: 0;
  border-right: 1px solid rgba(91, 77, 84, 0.16);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.reports-master-list {
  display: grid;
  gap: 0;
}

.reports-master-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 72px;
  margin: 0;
  padding: 0 16px 0 22px;
  border: 0;
  border-bottom: 1px solid rgba(242, 15, 98, 0.12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.reports-master-item::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transition: opacity 150ms ease;
}

.reports-master-item strong {
  font-size: 1rem;
  font-weight: 900;
}

.reports-master-item:hover,
.reports-master-item:focus-visible {
  background: rgba(242, 15, 98, 0.05);
  color: var(--accent-deep);
}

.reports-master-item.is-active {
  background: linear-gradient(90deg, rgba(242, 15, 98, 0.11), rgba(242, 15, 98, 0.025));
  color: var(--accent-deep);
}

.reports-master-item.is-active::before {
  opacity: 1;
}

.reports-detail-pane {
  min-width: 0;
  padding-left: clamp(22px, calc(2.5 * var(--vw)), 42px);
}

body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="usage"] .reports-detail-pane,
body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="audit"] .reports-detail-pane {
  padding-left: 0;
}

body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="usage"] .reports-widget-grid,
body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="audit"] .reports-widget-grid {
  display: none;
}

.reports-audit-workspace,
.reports-usage-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
  min-height: calc(calc(100 * var(--dvh)) - 160px);
}

.reports-usage-workspace > .reports-subsection-filter-toolbar {
  margin-bottom: 0;
  padding: 16px clamp(16px, calc(2 * var(--vw)), 30px) 0;
}

.reports-audit-workspace.has-directory {
  grid-template-columns: minmax(0, 1fr);
}

.reports-audit-categories,
.reports-audit-directory {
  min-width: 0;
  padding-top: 24px;
  border-right: 1px solid rgba(91, 77, 84, 0.16);
}

.reports-audit-directory {
  display: flex;
  flex-direction: column;
  max-height: calc(calc(100 * var(--dvh)) - 160px);
  background: rgba(255, 250, 252, 0.4);
}

.reports-audit-search {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  padding: 0 14px 18px;
}

.reports-audit-search label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.reports-audit-search input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: #fff;
}

.reports-audit-directory-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
}

.reports-audit-entity {
  gap: 12px;
  padding: 16px;
}

.reports-audit-directory .reports-audit-entity {
  width: 100%;
  min-width: 0;
}

.reports-audit-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef1665, #ff974a);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}

.reports-audit-entity-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.reports-audit-entity-copy small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.reports-audit-directory-message {
  margin: 0;
  padding: 18px;
  font-size: 0.88rem;
}

.reports-audit-detail,
.reports-usage-detail {
  min-width: 0;
  padding: 24px clamp(16px, calc(2 * var(--vw)), 30px);
}

.reports-user-activity-dashboard {
  display: grid;
  gap: 18px;
}

.reports-user-activity-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.reports-user-activity-card h3 {
  margin: 4px 0 5px;
}

.reports-user-activity-card small {
  margin: 0;
  color: var(--muted);
}

.reports-user-activity-status {
  display: none;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid rgba(242, 15, 98, 0.16);
  border-radius: 14px;
  background: rgba(242, 15, 98, 0.035);
}

.reports-user-activity-status:not(:empty) {
  display: block;
}

.reports-user-activity-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.reports-user-activity-kpi,
.reports-user-activity-card {
  min-width: 0;
  border: 1px solid rgba(91, 77, 84, 0.15);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
}

.reports-user-activity-kpi {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 17px 18px;
}

.reports-user-activity-kpi strong {
  font-size: clamp(1.45rem, calc(2 * var(--vw)), 2rem);
  line-height: 1;
}

.reports-user-activity-kpi > span:not(.reports-user-activity-live-dot) {
  font-weight: 800;
}

.reports-user-activity-kpi small {
  color: var(--muted);
  line-height: 1.35;
}

.reports-user-activity-live-dot {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2bb673;
  box-shadow: 0 0 0 5px rgba(43, 182, 115, 0.12);
}

.reports-user-activity-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.reports-user-activity-card {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 20px;
  overflow: hidden;
}

.reports-user-activity-chart {
  min-height: 240px;
}

.reports-user-activity-chart svg {
  display: block;
  width: 100%;
  min-width: 560px;
  height: auto;
  overflow: visible;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
}

.reports-user-activity-chart-scroll,
.reports-user-activity-heatmap-scroll {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.reports-user-activity-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.reports-user-activity-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.reports-user-activity-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.reports-user-activity-heatmap-grid {
  display: grid;
  grid-template-columns: 38px repeat(24, minmax(18px, 1fr));
  gap: 4px;
  min-width: 640px;
  align-items: center;
}

.reports-user-activity-heatmap-hour,
.reports-user-activity-heatmap-day {
  color: var(--muted);
  font-size: 0.68rem;
}

.reports-user-activity-heatmap-hour {
  text-align: center;
}

.reports-user-activity-heatmap-day {
  padding-right: 4px;
  font-weight: 700;
}

.reports-user-activity-heatmap-cell {
  aspect-ratio: 1;
  min-height: 18px;
  border-radius: 5px;
  background: rgba(242, 15, 98, var(--heat-opacity, 0.06));
}

.reports-user-presence-list,
.reports-user-activity-leaders {
  display: grid;
  align-content: start;
}

.reports-user-presence-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid rgba(91, 77, 84, 0.11);
}

.reports-user-presence-item:last-child,
.reports-user-activity-leader:last-child {
  border-bottom: 0;
}

.reports-user-presence-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef1665, #ff974a);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.reports-user-presence-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.reports-user-presence-copy strong,
.reports-user-presence-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-user-activity-leader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(91, 77, 84, 0.11);
}

.reports-user-activity-leader-copy {
  min-width: 0;
}

.reports-user-activity-leader-copy strong,
.reports-user-activity-leader-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reports-user-activity-leader > strong {
  color: var(--accent-deep);
}

.reports-user-activity-leader-bar {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 999px;
  background: rgba(242, 15, 98, 0.08);
  overflow: hidden;
}

.reports-user-activity-leader-bar span {
  display: block;
  width: var(--leader-width, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f20f62, #ff8a29);
}

.reports-user-activity-empty {
  margin: 0;
  padding: 22px 0;
  color: var(--muted);
  text-align: center;
}

/* Keep the complete Usage dashboard inside the desktop viewport. The charts
   scale with their cards, while long presence and leaderboard lists scroll
   inside their own panels instead of extending the page. */
@media (min-width: 1041px) {
  body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="usage"] .main-content.reports-dashboard-fit {
    height: calc(100 * var(--dvh));
    min-height: 0;
    gap: 12px;
    overflow: hidden;
  }

  body[data-active-reports-subsection="usage"] .reports-dashboard-fit > .account-topbar {
    flex: 0 0 auto;
  }

  body[data-active-reports-subsection="usage"] .reports-dashboard-fit .reports-master-detail-shell {
    flex: 1 1 0;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
  }

  body[data-active-reports-subsection="usage"] .reports-dashboard-fit .reports-master-pane {
    position: static;
    align-self: stretch;
    min-height: 0;
    padding-top: 0;
    overflow-y: auto;
  }

  body[data-active-reports-subsection="usage"] .reports-dashboard-fit .reports-detail-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .reports-dashboard-fit .reports-usage-workspace {
    flex: 1 1 0;
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  .reports-dashboard-fit .reports-usage-workspace > .reports-subsection-filter-toolbar {
    min-height: 0;
    padding: clamp(5px, calc(0.8 * var(--dvh)), 9px) clamp(14px, calc(1.8 * var(--vw)), 26px) 0;
  }

  .reports-dashboard-fit .reports-usage-detail {
    display: flex;
    min-height: 0;
    padding: clamp(10px, calc(1.5 * var(--dvh)), 16px) clamp(14px, calc(1.8 * var(--vw)), 26px);
    overflow: hidden;
  }

  .reports-dashboard-fit .reports-user-activity-dashboard {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    gap: clamp(8px, calc(1.2 * var(--dvh)), 12px);
    overflow: hidden;
  }

  .reports-dashboard-fit .reports-user-activity-status:not(:empty) {
    position: absolute;
    z-index: 3;
    top: 4px;
    left: 50%;
    width: min(320px, calc(100% - 24px));
    transform: translateX(-50%);
    padding: 7px 11px;
    font-size: 0.78rem;
    text-align: center;
    box-shadow: 0 8px 24px rgba(79, 58, 67, 0.12);
  }

  .reports-dashboard-fit .reports-user-activity-kpis {
    gap: 9px;
  }

  .reports-dashboard-fit .reports-user-activity-kpi {
    gap: 2px;
    min-height: 0;
    padding: clamp(8px, calc(1.25 * var(--dvh)), 12px) 14px;
  }

  .reports-dashboard-fit .reports-user-activity-kpi strong {
    font-size: clamp(1.2rem, calc(2.6 * var(--dvh)), 1.65rem);
  }

  .reports-dashboard-fit .reports-user-activity-kpi > span:not(.reports-user-activity-live-dot) {
    font-size: clamp(0.76rem, calc(1.45 * var(--dvh)), 0.9rem);
  }

  .reports-dashboard-fit .reports-user-activity-kpi small {
    font-size: clamp(0.63rem, calc(1.2 * var(--dvh)), 0.76rem);
  }

  .reports-dashboard-fit .reports-user-activity-live-dot {
    top: 12px;
    right: 14px;
    width: 8px;
    height: 8px;
  }

  .reports-dashboard-fit .reports-user-activity-grid {
    min-height: 0;
    grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: clamp(8px, calc(1.2 * var(--dvh)), 12px);
    overflow: hidden;
  }

  .reports-dashboard-fit .reports-user-activity-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: clamp(5px, calc(0.9 * var(--dvh)), 9px);
    padding: clamp(9px, calc(1.35 * var(--dvh)), 13px) clamp(11px, calc(1 * var(--vw)), 15px);
  }

  .reports-dashboard-fit .reports-user-activity-card > header {
    flex: 0 0 auto;
    gap: 8px;
  }

  .reports-dashboard-fit .reports-user-activity-card h3 {
    margin: 0 0 2px;
    font-size: clamp(0.9rem, calc(1.75 * var(--dvh)), 1.05rem);
    line-height: 1.1;
  }

  .reports-dashboard-fit .reports-user-activity-card header small {
    display: block;
    font-size: clamp(0.62rem, calc(1.15 * var(--dvh)), 0.75rem);
    line-height: 1.2;
  }

  .reports-dashboard-fit .reports-user-activity-chart,
  .reports-dashboard-fit .reports-user-activity-heatmap {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    min-height: 0;
  }

  .reports-dashboard-fit .reports-user-activity-chart-scroll,
  .reports-dashboard-fit .reports-user-activity-heatmap-scroll {
    flex: 1 1 0;
    min-height: 0;
  }

  .reports-dashboard-fit .reports-user-activity-chart-scroll {
    overflow: hidden;
  }

  .reports-dashboard-fit .reports-user-activity-chart svg {
    width: 100%;
    height: 100%;
    min-width: 0;
    max-height: 100%;
  }

  .reports-dashboard-fit .reports-user-activity-legend {
    flex: 0 0 auto;
    gap: 8px;
    margin-top: 3px;
    font-size: 0.65rem;
    line-height: 1;
  }

  .reports-dashboard-fit .reports-user-activity-heatmap-grid {
    grid-template-columns: 28px repeat(24, minmax(7px, 1fr));
    grid-template-rows: auto repeat(7, minmax(0, 1fr));
    gap: 2px;
    height: 100%;
    min-width: 0;
  }

  .reports-dashboard-fit .reports-user-activity-heatmap-cell {
    width: 100%;
    min-height: 0;
    height: 100%;
    aspect-ratio: auto;
    border-radius: 3px;
  }

  .reports-dashboard-fit .reports-user-activity-heatmap-scroll {
    overflow: hidden;
  }

  .reports-dashboard-fit .reports-user-activity-heatmap-hour,
  .reports-dashboard-fit .reports-user-activity-heatmap-day {
    font-size: clamp(0.5rem, calc(0.95 * var(--dvh)), 0.62rem);
    line-height: 1;
  }

  .reports-dashboard-fit .reports-user-activity-heatmap-day {
    align-self: center;
  }

  .reports-dashboard-fit .reports-user-presence-list,
  .reports-dashboard-fit .reports-user-activity-leaders {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-width: thin;
  }

  .reports-dashboard-fit .reports-user-presence-item,
  .reports-dashboard-fit .reports-user-activity-leader {
    padding: clamp(5px, calc(0.9 * var(--dvh)), 8px) 0;
    font-size: clamp(0.7rem, calc(1.3 * var(--dvh)), 0.82rem);
  }

  .reports-dashboard-fit .reports-user-presence-item {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
  }

  .reports-dashboard-fit .reports-user-presence-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.62rem;
  }

  .reports-dashboard-fit .reports-user-activity-leader-bar {
    height: 4px;
  }

  .reports-dashboard-fit .reports-user-activity-empty {
    padding: 10px 0;
    font-size: 0.78rem;
  }
}

.reports-audit-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.reports-audit-detail-head h3 {
  margin: 4px 0 8px;
  overflow-wrap: anywhere;
}

.reports-audit-detail-head p {
  margin: 0;
}

#reportsAuditClearSelection.hidden {
  display: none;
}

.reports-audit-detail .feed-item {
  overflow-wrap: anywhere;
}

/* The admin audit log owns its scroll viewport. Keep the app shell and report
   chrome fixed while activity rows scroll inside the remaining detail space. */
body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="audit"] {
  height: calc(100 * var(--dvh));
  min-height: 0;
  overflow: hidden;
}

body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="audit"] .app-shell,
body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="audit"] .main-content.reports-dashboard-fit {
  height: calc(100 * var(--dvh));
  min-height: 0;
  overflow: hidden;
}

body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="audit"] .main-content.reports-dashboard-fit {
  gap: 12px;
}

body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="audit"] .reports-dashboard-fit > .account-topbar {
  flex: 0 0 auto;
}

body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="audit"] .reports-dashboard-fit .reports-master-detail-shell {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  grid-template-rows: minmax(0, 1fr);
}

body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="audit"] .reports-dashboard-fit .reports-master-pane {
  position: static;
  align-self: stretch;
  min-height: 0;
  padding-top: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}

body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="audit"] .reports-dashboard-fit .reports-detail-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="audit"] .reports-audit-workspace {
  flex: 1 1 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="audit"] .reports-audit-detail {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="audit"] .reports-audit-detail-head {
  flex: 0 0 auto;
}

body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="audit"] #reportsAuditBody {
  flex: 1 1 0;
  min-height: 0;
  margin-top: 18px;
  padding-right: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="audit"] #reportsAuditBody:focus-visible {
  outline: 2px solid rgba(239, 22, 101, 0.35);
  outline-offset: 3px;
}

.reports-audit-load-more {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 24px 0;
  text-align: center;
}

.reports-audit-load-more p {
  margin: 0;
}

#reportsAuditLoadMoreArea.hidden,
#reportsAuditLoadMore.hidden {
  display: none;
}

.reports-audit-loader {
  display: none;
  width: 22px;
  height: 22px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: reports-audit-spin 0.8s linear infinite;
}

.reports-audit-load-more.is-loading .reports-audit-loader {
  display: block;
}

@keyframes reports-audit-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .reports-audit-loader { animation: none; }
}

@media (max-width: 1180px) {
  .reports-audit-workspace,
  .reports-usage-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .reports-audit-workspace.has-directory {
    grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.2fr);
  }

  .reports-audit-categories {
    grid-column: 1 / -1;
    display: flex;
    padding-top: 0;
    border-right: 0;
  }

  .reports-audit-directory {
    max-height: calc(65 * var(--dvh));
  }

  .reports-user-activity-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-user-activity-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .reports-audit-workspace.has-directory {
    grid-template-columns: minmax(0, 1fr);
  }

  .reports-audit-directory {
    max-height: 300px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .reports-audit-detail,
  .reports-usage-detail {
    padding: 20px 12px;
  }

  .reports-user-activity-kpis {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1040px) {
  body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="audit"] .reports-dashboard-fit .reports-master-detail-shell {
    grid-template-rows: auto minmax(0, 1fr);
  }

  body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="usage"] .reports-master-detail-shell,
  body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="audit"] .reports-master-detail-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="usage"] .reports-master-pane,
  body[data-reports-page-kind="admin-reports"][data-active-reports-subsection="audit"] .reports-master-pane {
    min-width: 0;
  }
}

.reports-detail-head {
  min-height: 96px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(91, 77, 84, 0.16);
}

.reports-detail-head .reports-subsection-controls {
  grid-template-columns: minmax(180px, 220px);
}

body[data-reports-page-kind="sales-reports"] .reports-detail-head,
body[data-reports-page-kind="admin-calls"] .reports-detail-head {
  min-height: 0;
  justify-content: flex-end;
  margin-bottom: 18px;
  padding: 0;
  border-bottom: 0;
}

body[data-reports-page-kind="sales-reports"][data-active-reports-subsection="sales"] .reports-detail-head {
  display: none;
}

.reports-subsection-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.reports-subsection-copy .eyebrow {
  margin: 0;
}

.reports-subsection-copy strong {
  font-size: 1.1rem;
}

.reports-subsection-copy small {
  color: var(--muted);
  line-height: 1.35;
}

.reports-subsection-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 220px));
  gap: 10px;
  align-items: end;
  flex: 0 0 auto;
}

.reports-subsection-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reports-subsection-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 40px 0 14px;
  border: 1px solid rgba(242, 15, 98, 0.22);
  border-radius: 14px;
  background-color: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
}

[data-reports-subsection][data-reports-subsection-hidden="true"] {
  display: none !important;
}

/* Divide the space below the actual top bar between dashboard rows. Keep the
   document scrollable on small/short screens instead of clipping chart content. */
@media (min-width: 1041px) and (min-height: 600px) {
  .main-content.reports-dashboard-fit {
    height: calc(100 * var(--dvh));
    min-height: 0;
    gap: 12px;
  }

  .reports-dashboard-fit > .account-topbar {
    flex: 0 0 auto;
  }

  .reports-dashboard-fit .reports-master-detail-shell {
    flex: 1 1 0;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
  }

  .reports-dashboard-fit .reports-master-pane {
    position: static;
    align-self: stretch;
    min-height: 0;
    padding-top: 0;
    overflow-y: auto;
  }

  .reports-dashboard-fit .reports-detail-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .reports-dashboard-fit .reports-widget-grid {
    display: none;
  }

  body[data-active-reports-subsection="membership"] .reports-dashboard-fit .reports-widget-grid {
    display: grid;
    flex: 1 1 0;
    min-height: 0;
    align-content: start;
    overflow-y: auto;
  }

  .reports-dashboard-fit :is(.reports-sales-workspace-reset, .reports-calls-workspace, .reports-messages-workspace, .reports-pipeline-workspace, .reports-membership-workspace) {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    margin-top: 0;
  }

  .reports-dashboard-fit :is(.reports-call-duration-grid, .reports-messages-grid, .reports-pipeline-grid) {
    flex: 1 1 0;
    min-height: 0;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .reports-dashboard-fit .reports-pipeline-workspace {
    overflow-y: auto;
  }

  .reports-dashboard-fit :is(.reports-call-kpi-grid, .reports-message-kpi-grid) {
    min-height: 0;
  }

  .reports-dashboard-fit .reports-membership-kpi-grid {
    flex: 0 0 auto;
  }

  .reports-dashboard-fit .reports-membership-report-row {
    flex: 1 1 0;
    min-height: 0;
  }

  .reports-dashboard-fit .reports-membership-chargeback-card,
  .reports-dashboard-fit .reports-membership-sold-panel,
  .reports-dashboard-fit .reports-membership-sold-list {
    min-height: 0;
  }

  .reports-dashboard-fit .reports-membership-chargeback-chart,
  .reports-dashboard-fit .reports-membership-chargeback-scroll {
    flex: 1 1 0;
    height: auto;
    min-height: 0;
  }

  .reports-dashboard-fit .reports-membership-chargeback-svg {
    height: 100%;
    max-height: 100%;
  }

  .reports-dashboard-fit .reports-sales-kpi-row {
    flex: 0 0 auto;
    margin-top: 0;
  }

  .reports-dashboard-fit .reports-sales-dashboard-grid {
    flex: 1 1 0;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    margin-top: 12px;
  }

  .reports-dashboard-fit :is(.reports-weekly-sales-widget, .reports-sales-trend-widget, .reports-call-duration-card, .reports-message-panel) {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: clamp(12px, calc(1.8 * var(--dvh)), 20px);
  }

  .reports-dashboard-fit :is(.reports-weekly-sales-head, .reports-sales-trend-head, .reports-call-duration-head, .reports-message-panel-head, .reports-chart-filter-chips) {
    flex: 0 0 auto;
    margin-bottom: 8px;
  }

  .reports-dashboard-fit :is(.reports-weekly-sales-chart, .reports-sales-trend-chart, .reports-call-duration-chart, .reports-message-volume-chart, .reports-message-aging-chart) {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    height: auto;
    min-height: 0;
  }

  .reports-dashboard-fit :is(.reports-weekly-sales-chart-scroll, .reports-sales-trend-scroll, .reports-call-duration-scroll, .reports-message-volume-scroll) {
    flex: 1 1 0;
    height: auto;
    min-height: 0;
  }

  .reports-dashboard-fit :is(.reports-weekly-sales-svg, .reports-sales-trend-svg, .reports-call-duration-svg, .reports-message-volume-svg) {
    height: 100%;
    max-height: 100%;
    min-width: 0;
  }

  .reports-dashboard-fit :is(.reports-weekly-sales-legend, .reports-call-duration-legend, .reports-message-volume-legend) {
    flex: 0 0 auto;
    margin-top: 4px;
  }

  .reports-dashboard-fit .reports-message-status-chart {
    flex: 1 1 0;
    min-height: 0;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
    gap: 14px;
    padding: 4px 0;
    container-type: size;
  }

  .reports-dashboard-fit .reports-message-donut {
    width: min(220px, 100%, 100cqh);
  }

  .reports-dashboard-fit .reports-message-donut-center strong {
    font-size: clamp(1.1rem, 13cqh, 2.55rem);
  }

  .reports-dashboard-fit .reports-message-aging-list {
    flex: 1 1 0;
    min-height: 0;
    gap: clamp(6px, calc(1.5 * var(--dvh)), 16px);
  }

  .reports-dashboard-fit .reports-message-aging-row {
    grid-template-columns: minmax(85px, 0.9fr) minmax(0, 2fr) auto;
    gap: 8px;
  }

  .reports-dashboard-fit :is(.reports-chart-shimmer, .reports-weekly-sales-empty, .reports-call-duration-empty, .reports-message-chart-empty) {
    flex: 1 1 0;
    height: auto;
    min-height: 0;
    padding: 12px;
    overflow: auto;
    overflow-wrap: anywhere;
  }

  .reports-dashboard-fit .reports-message-status-chart > .reports-message-chart-empty {
    grid-column: 1 / -1;
    align-self: stretch;
  }

  .reports-dashboard-fit :is(.reports-call-kpi-card, .reports-message-kpi-card) {
    padding: clamp(10px, calc(1.5 * var(--dvh)), 18px);
    overflow-y: auto;
  }

  .reports-dashboard-fit :is(.reports-call-kpi-value, .reports-message-kpi-value) {
    font-size: clamp(1.5rem, calc(3.6 * var(--dvh)), 2.65rem);
    margin-top: 5px;
  }

  .reports-dashboard-fit :is(.reports-sales-summary-kpi, .reports-active-payers-kpi) {
    min-height: 0;
    padding: clamp(12px, calc(1.8 * var(--dvh)), 20px);
    gap: 8px;
  }

  .reports-dashboard-fit .reports-sales-summary-value {
    font-size: clamp(1.75rem, calc(4.5 * var(--dvh)), 3rem);
    margin-top: 5px;
  }

  .reports-dashboard-fit .reports-active-payers-kpi {
    flex-wrap: wrap;
  }

  .reports-dashboard-fit .reports-active-payers-copy {
    flex: 1 1 90px;
  }
}

@media (max-width: 1040px) {
  .reports-master-detail-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .reports-master-pane {
    position: static;
    min-height: 0;
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(91, 77, 84, 0.16);
  }

  .reports-master-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .reports-master-item {
    flex: 0 0 auto;
    width: auto;
    min-width: 122px;
    min-height: 56px;
    justify-content: center;
    padding: 0 20px;
    border-right: 1px solid rgba(242, 15, 98, 0.1);
    border-bottom: 0;
  }

  .reports-master-item::before {
    inset: auto 0 0;
    width: auto;
    height: 4px;
  }

  .reports-detail-pane {
    padding-top: 14px;
    padding-left: 0;
  }

  .reports-subsection-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .reports-subsection-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
}

@media (max-width: 900px) {
  .reports-membership-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reports-membership-report-row {
    grid-template-columns: 1fr;
  }

  .reports-membership-sold-panel {
    max-height: 440px;
  }
}

@media (max-width: 560px) {
  .reports-membership-kpi-grid {
    grid-template-columns: 1fr;
  }

  .reports-membership-chargeback-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .reports-membership-sold-tab {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-inline: 10px;
  }

  .reports-membership-sold-row-end {
    gap: 5px;
  }

  .reports-membership-sold-status {
    display: none;
  }
}

@media (max-width: 720px) {
  .reports-subsection-field {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .reports-subsection-controls {
    grid-template-columns: 1fr;
    width: 100%;
  }
}

.reports-page-status {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.reports-widget-card {
  display: grid;
  grid-template-columns: minmax(120px, 145px) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 96px;
}

.reports-widget-side {
  display: grid;
  gap: 10px;
  align-content: start;
}

.reports-widget-side .eyebrow {
  margin-bottom: 8px;
}

.reports-widget-side h3 {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.08;
}

.reports-widget-main {
  display: grid;
  gap: 8px;
  align-content: start;
}

.reports-widget-card-top {
  grid-template-columns: 1fr;
  min-height: 0;
}

.reports-widget-card-top .reports-widget-side {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.reports-widget-card-top .reports-widget-main {
  width: 100%;
}

@media (min-width: 900px) {
  .reports-widget-grid .reports-widget-card:not(#reportsAuditPanel) {
    aspect-ratio: 1 / 1.12;
    min-height: 0;
    height: auto;
    grid-template-rows: auto minmax(0, 1fr);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    scrollbar-gutter: stable;
  }

  .reports-widget-grid .reports-widget-card:not(#reportsAuditPanel) .reports-widget-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: visible;
  }

  .reports-widget-grid .reports-widget-card:not(#reportsAuditPanel) .reports-funnel-chart,
  .reports-widget-grid .reports-widget-card:not(#reportsAuditPanel) .reports-goals-chart,
  .reports-widget-grid .reports-widget-card:not(#reportsAuditPanel) .reports-sales-bars-chart,
  .reports-widget-grid .reports-widget-card:not(#reportsAuditPanel) .reports-conversion-trend-chart {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    overflow: visible;
  }

  body[data-reports-page-kind="sales-reports"] .reports-three-column-grid[data-reports-subsection="calls"] > .calls-dashboard-panel {
    aspect-ratio: 1 / 1.12;
    min-height: 0;
    height: auto;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  body[data-reports-page-kind="sales-reports"] .reports-three-column-grid[data-reports-subsection="calls"] > .calls-dashboard-panel > :last-child {
    min-height: 0;
    overflow: hidden;
  }

  .reports-widget-grid .reports-widget-card.reports-sales-bars-section:not(#reportsAuditPanel) .reports-widget-main {
    overflow: hidden;
  }

  .reports-widget-grid .reports-widget-card.reports-sales-bars-section:not(#reportsAuditPanel) .reports-sales-bars-chart {
    height: 100%;
    min-height: 0;
  }

  .reports-widget-grid .reports-widget-card.reports-sales-bars-section:not(#reportsAuditPanel) .reports-sales-bars-chart {
    overflow: hidden;
  }

}

.reports-funnel-panel {
  min-height: 0;
}

.reports-funnel-controls {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.reports-funnel-meta {
  display: flex;
  justify-content: flex-start;
}

.reports-trend-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.reports-trend-menu {
  position: relative;
}

.reports-trend-menu .preview-dropdown {
  left: auto;
  right: 0;
}

.reports-trend-date-field {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

.reports-trend-date-field input {
  min-width: 0;
}

.reports-trend-date-actions {
  display: grid;
  gap: 8px;
}

.reports-funnel-chart {
  display: grid;
  justify-items: stretch;
  gap: 14px;
  width: 100%;
}

.reports-sales-bars-section {
  display: grid;
  gap: 10px;
}

.reports-revenue-forecast-section {
  display: grid;
  gap: 10px;
}

.reports-commission-forecast-section {
  display: grid;
  gap: 10px;
}

.reports-sales-bars-head {
  align-items: end;
}

.reports-sales-bars-chart {
  display: grid;
  gap: 6px;
}

.reports-sales-bars-scroll {
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 4px;
}

.reports-sales-bars-scroll:focus-visible {
  outline: 2px solid rgba(239, 22, 101, 0.28);
  outline-offset: 2px;
  border-radius: 12px;
}

.reports-sales-scroll-status {
  padding: 10px 8px 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.reports-conversion-trend-chart,
.reports-revenue-forecast-chart,
.reports-rep-forecast-chart,
.reports-commission-forecast-chart {
  display: grid;
  gap: 6px;
}

.reports-revenue-forecast-shell {
  display: grid;
  gap: 12px;
}

.reports-revenue-forecast-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reports-revenue-summary-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 250, 252, 0.98), rgba(255, 244, 229, 0.94));
  border: 1px solid rgba(239, 22, 101, 0.12);
  box-shadow: 0 6px 14px rgba(116, 16, 59, 0.08);
}

.reports-revenue-summary-card-actual {
  background: linear-gradient(135deg, rgba(255, 251, 244, 0.98), rgba(255, 242, 247, 0.94));
}

.reports-revenue-summary-card-commission {
  background: linear-gradient(135deg, rgba(255, 247, 234, 0.98), rgba(255, 241, 225, 0.94));
}

.reports-revenue-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.reports-revenue-empty-state {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 250, 252, 0.98), rgba(255, 244, 229, 0.94));
  border: 1px solid rgba(239, 22, 101, 0.12);
}

.reports-revenue-empty-state strong {
  color: var(--ink);
}

.reports-revenue-empty-state small {
  color: var(--muted);
}

.reports-revenue-summary-card strong {
  display: block;
  font-size: clamp(1.4rem, calc(2.2 * var(--vw)), 2rem);
  line-height: 1;
  color: var(--ink);
}

.reports-revenue-summary-card small {
  color: var(--muted);
}

.reports-revenue-forecast-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.reports-revenue-forecast-kicker {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reports-revenue-forecast-summary strong {
  display: block;
  font-size: clamp(1.4rem, calc(2.2 * var(--vw)), 2rem);
  line-height: 1;
  color: var(--ink);
}

.reports-revenue-forecast-summary small,
.reports-revenue-forecast-foot small,
.reports-revenue-stage-copy small,
.reports-revenue-top-item small {
  color: var(--muted);
}

.reports-revenue-forecast-confidence {
  white-space: nowrap;
}

.reports-revenue-forecast-confidence-high {
  background: rgba(27, 152, 112, 0.12);
  color: #116548;
}

.reports-revenue-forecast-confidence-medium {
  background: rgba(225, 145, 13, 0.14);
  color: #8d5a00;
}

.reports-revenue-forecast-confidence-low {
  background: rgba(215, 72, 72, 0.12);
  color: #a12828;
}

.reports-revenue-forecast-stage-list,
.reports-revenue-top-list {
  display: grid;
  gap: 8px;
}

.reports-revenue-stage-item,
.reports-revenue-top-item {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 250, 252, 0.98), rgba(255, 244, 229, 0.94));
  border: 1px solid rgba(239, 22, 101, 0.12);
  box-shadow: 0 6px 14px rgba(116, 16, 59, 0.08);
}

.reports-revenue-stage-copy strong,
.reports-revenue-top-item strong,
.reports-revenue-forecast-foot-copy strong {
  display: block;
}

.reports-revenue-stage-bar-wrap,
.reports-revenue-top-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.reports-revenue-stage-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(239, 22, 101, 0.1);
}

.reports-revenue-stage-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef1665, #ff9c59);
}

.reports-revenue-stage-bar-wrap span,
.reports-revenue-top-item span {
  font-weight: 700;
  color: var(--ink);
}

.reports-revenue-forecast-foot {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.reports-rep-forecast-list {
  display: grid;
  gap: 8px;
}

.reports-rep-forecast-item {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 250, 252, 0.98), rgba(255, 244, 229, 0.94));
  border: 1px solid rgba(239, 22, 101, 0.12);
  box-shadow: 0 6px 14px rgba(116, 16, 59, 0.08);
}

.reports-rep-forecast-copy strong {
  display: block;
}

.reports-rep-forecast-copy small {
  color: var(--muted);
}

.reports-rep-forecast-bar-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.reports-rep-forecast-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(239, 22, 101, 0.1);
}

.reports-rep-forecast-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef1665, #ff9c59);
}

.reports-commission-forecast-track {
  background: rgba(255, 156, 89, 0.16);
}

.reports-commission-forecast-fill {
  background: linear-gradient(90deg, #ff9c59, #ffd66b);
}

.reports-rep-forecast-bar-wrap span {
  font-weight: 700;
  color: var(--ink);
}

.reports-sales-bars-list {
  display: grid;
  gap: 6px;
}

.reports-sales-horizontal-item {
  display: grid;
  grid-template-columns: minmax(120px, 165px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 7px 9px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 250, 252, 0.96), rgba(255, 244, 229, 0.92));
  border: 1px solid rgba(239, 22, 101, 0.12);
}

.reports-sales-horizontal-copy {
  min-width: 0;
}

.reports-sales-horizontal-copy strong,
.reports-sales-horizontal-copy small {
  display: block;
}

.reports-sales-horizontal-copy strong {
  font-size: 0.82rem;
  line-height: 1.2;
  word-break: break-word;
}

.reports-sales-horizontal-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.reports-sales-horizontal-bar-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.reports-sales-horizontal-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 236, 244, 0.72), rgba(255, 246, 232, 0.82));
  border: 1px solid rgba(239, 22, 101, 0.12);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.reports-sales-horizontal-fill {
  display: block;
  height: 100%;
  min-width: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #b30f52 0%, #ef1665 46%, #ff8a2b 100%);
  box-shadow: 0 5px 12px rgba(239, 22, 101, 0.2);
}

.reports-sales-horizontal-count {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-deep);
  min-width: 20px;
  text-align: right;
}

.reports-conversion-trend-shell {
  overflow-x: auto;
}

.reports-conversion-trend-svg {
  width: 100%;
  min-width: 420px;
  height: auto;
}

.reports-conversion-grid-line {
  stroke: rgba(125, 40, 78, 0.14);
  stroke-width: 1;
}

.reports-conversion-axis-label {
  fill: var(--muted);
  font-size: 8px;
}

.reports-conversion-axis-label-y {
  font-variant-numeric: tabular-nums;
}

.reports-conversion-line {
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reports-conversion-line-new {
  stroke: #ff9b33;
}

.reports-conversion-line-contacted {
  stroke: #ef1665;
}

.reports-conversion-line-interested {
  stroke: #c51f7a;
}

.reports-conversion-line-sales {
  stroke: #7c1249;
}

.reports-conversion-point {
  stroke: #fff7f4;
  stroke-width: 1.5;
}

.reports-conversion-point-new {
  fill: #ff9b33;
}

.reports-conversion-point-contacted {
  fill: #ef1665;
}

.reports-conversion-point-interested {
  fill: #c51f7a;
}

.reports-conversion-point-sales {
  fill: #7c1249;
}

.reports-conversion-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.68rem;
}

.reports-conversion-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.reports-conversion-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

.reports-conversion-dot-new {
  background: #ff9b33;
}

.reports-conversion-dot-contacted {
  background: #ef1665;
}

.reports-conversion-dot-interested {
  background: #c51f7a;
}

.reports-conversion-dot-sales {
  background: #7c1249;
}

.sales-history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.sales-history-tags {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sales-history-head strong {
  margin-bottom: 0;
}

.sales-history-item-unlinked {
  border-color: rgba(210, 28, 74, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 244, 246, 0.98), rgba(255, 236, 240, 0.96));
  box-shadow: 0 14px 26px rgba(210, 28, 74, 0.1);
}

.sales-history-item-unlinked .sales-history-head strong {
  color: #b10f43;
}

.sales-history-link-status-tag {
  background: rgba(210, 28, 74, 0.12);
  border: 1px solid rgba(210, 28, 74, 0.18);
  color: #b10f43;
}

.widget-modal-content .past-sales-list {
  max-height: calc(calc(100 * var(--vh)) - 300px);
  overflow-y: auto;
  padding-right: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(239, 22, 101, 0.12);
  color: var(--accent-deep);
  font-size: 0.82rem;
}

.tag-danger {
  background: rgba(176, 42, 55, 0.14);
  color: #b02a37;
}

.tag-warning {
  background: rgba(255, 174, 38, 0.16);
  color: #9a5b00;
}

.tag-member {
  background: rgba(37, 164, 92, 0.14);
  color: #1f7e4f;
}

.tag-neutral {
  background: rgba(107, 114, 128, 0.14);
  color: #4b5563;
}

.status-box-error {
  background: rgba(239, 22, 101, 0.12);
  color: var(--accent-deep);
}

.score-pill {
  display: inline-block;
  min-width: 60px;
  text-align: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.82rem;
  color: #fffdf9;
}

.score-strong {
  background: var(--success);
}

.score-mid {
  background: var(--warning);
}

.score-low {
  background: var(--accent-deep);
}

.qa-widget-preview {
  display: grid;
  gap: 14px;
}

.qa-widget-list {
  display: grid;
  gap: 10px;
}

#qaWidget .qa-widget-list {
  width: 100%;
  gap: 0;
  align-content: start;
  grid-auto-rows: 72px;
  border-top: 1px solid rgba(242, 15, 98, 0.12);
}

#qaWidget .qa-widget-preview {
  max-height: calc(calc(100 * var(--dvh)) - 190px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.qa-widget-preview-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

#qaWidget .qa-widget-preview-item {
  position: relative;
  max-width: none;
  height: 72px;
  min-height: 72px;
  max-height: 72px;
  margin: 0;
  padding: 12px 16px 12px 22px;
  border: 0;
  border-bottom: 1px solid rgba(242, 15, 98, 0.12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: background 150ms ease, color 150ms ease;
}

#qaWidget .qa-widget-preview-item::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transition: opacity 150ms ease;
}

#qaWidget .qa-widget-preview-item.is-active {
  z-index: 1;
  background: linear-gradient(90deg, rgba(242, 15, 98, 0.11), rgba(242, 15, 98, 0.025));
  color: var(--accent-deep);
  box-shadow: none;
  transform: none;
}

#qaWidget .qa-widget-preview-item.is-active::before {
  opacity: 1;
}

#qaWidget .qa-widget-preview-item:hover,
#qaWidget .qa-widget-preview-item:focus-visible {
  background: rgba(242, 15, 98, 0.05);
  color: var(--accent-deep);
  transform: none;
  box-shadow: none;
}

#qaWidget .qa-widget-preview-item.is-active:hover,
#qaWidget .qa-widget-preview-item.is-active:focus-visible {
  background: linear-gradient(90deg, rgba(242, 15, 98, 0.11), rgba(242, 15, 98, 0.025));
}

.qa-widget-preview-copy {
  display: grid;
  gap: 3px;
  text-align: left;
}

.qa-widget-preview-copy strong {
  color: #111111;
}

#qaWidget .qa-widget-preview-item.is-active .qa-widget-preview-copy strong {
  color: var(--accent-deep);
}

.qa-widget-preview-copy small {
  color: var(--muted);
}

.qa-widget-actions {
  margin-top: 16px;
}

.qa-call-popup {
  display: grid;
  width: min(1120px, calc(calc(100 * var(--vw)) - 40px));
  height: min(820px, calc(calc(100 * var(--vh)) - 48px));
  max-height: calc(calc(100 * var(--vh)) - 48px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: #ffffff;
}

.qa-call-popup-header {
  padding-bottom: 18px;
}

.qa-call-popup-header p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.qa-call-popup-master-detail {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: 190px minmax(0, 1fr);
  border-top: 1px solid rgba(91, 77, 84, 0.14);
}

.qa-call-popup-master-pane {
  display: grid;
  min-height: 0;
  align-content: start;
  padding-top: 14px;
  border-right: 1px solid rgba(91, 77, 84, 0.14);
  overflow-y: auto;
}

.qa-call-popup-detail-pane {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: #ffffff;
}

.qa-transcript-thread {
  display: grid;
  min-height: 100%;
  align-content: start;
  gap: 18px;
  padding: clamp(22px, calc(3 * var(--vw)), 38px);
}

.qa-transcript-thread .message-bubble-shell {
  width: 100%;
}

.qa-transcript-thread .message-bubble {
  width: fit-content;
  max-width: min(72%, 680px);
  padding: 14px 18px;
}

.qa-transcript-thread .message-bubble-content p {
  font-size: 1rem;
}

.qa-transcript-turn-label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.qa-coaching-detail {
  display: grid;
  height: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  padding: clamp(24px, calc(3.4 * var(--vw)), 44px);
  overflow: hidden;
}

.qa-coaching-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.qa-coaching-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qa-coaching-layout {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  gap: 0;
}

.qa-coaching-grade-rail {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid rgba(91, 77, 84, 0.18);
  overflow: hidden;
}

.qa-coaching-grade-heading {
  margin: 0;
  padding: 0 12px 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.qa-coaching-copy {
  display: grid;
  min-width: 0;
  min-height: 0;
  align-content: start;
  gap: 14px;
  padding: 0 4px 0 18px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.qa-coaching-block {
  padding: 18px 20px;
  border: 1px solid rgba(91, 77, 84, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
}

.qa-coaching-block.is-guidance {
  border-color: rgba(239, 22, 101, 0.16);
  background: rgba(239, 22, 101, 0.055);
}

.qa-coaching-block > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.qa-coaching-block p {
  margin: 9px 0 0;
  color: var(--ink);
  line-height: 1.65;
  white-space: pre-wrap;
}

.qa-coaching-categories {
  display: grid;
  min-height: 0;
  align-content: start;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.qa-coaching-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(91, 77, 84, 0.12);
  background: transparent;
  font-size: 0.82rem;
  line-height: 1.2;
}

.qa-coaching-category strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qa-coaching-category span {
  flex: 0 0 auto;
  color: var(--accent-deep);
  font-weight: 900;
}

.qa-coaching-grades-empty {
  margin: 0;
  padding: 8px 4px 0 2px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.qa-lead-analysis {
  display: grid;
  min-width: 0;
}

.qa-lead-analysis-history {
  display: grid;
  min-width: 0;
  gap: 0;
  border-top: 1px solid rgba(91, 77, 84, 0.14);
}

.qa-lead-analysis-call {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-width: 0;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 12px 18px;
  border: 0;
  border-bottom: 1px solid rgba(91, 77, 84, 0.14);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.qa-lead-analysis-call-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.qa-lead-analysis-call-copy strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qa-lead-analysis-call-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.qa-score-pending {
  background: rgba(91, 77, 84, 0.12);
  color: var(--muted);
}

.qa-lead-analysis-open {
  min-width: 76px;
  padding: 9px 14px;
}

.qa-transcript-empty {
  padding: 36px 18px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 680px) {
  .qa-lead-analysis-call {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .qa-lead-analysis-call-copy {
    grid-column: 1 / -1;
  }

  .qa-call-popup {
    width: calc(calc(100 * var(--vw)) - 16px);
    height: calc(calc(100 * var(--dvh)) - 16px);
    max-height: calc(calc(100 * var(--dvh)) - 16px);
  }

  .qa-call-popup-master-detail {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .qa-call-popup-master-pane {
    display: flex;
    padding-top: 0;
    border-right: 0;
    border-bottom: 1px solid rgba(91, 77, 84, 0.14);
    overflow-x: auto;
    overflow-y: hidden;
  }

  .qa-call-popup-master-pane .reports-master-item {
    flex: 1 0 140px;
  }

  .qa-transcript-thread .message-bubble {
    max-width: 86%;
  }

  .qa-coaching-detail {
    height: auto;
    min-height: 100%;
    grid-template-rows: auto;
    overflow: visible;
  }

  .qa-coaching-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .qa-coaching-grade-rail {
    min-height: 190px;
    max-height: 240px;
    padding-bottom: 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(91, 77, 84, 0.18);
  }

  .qa-coaching-copy {
    padding: 18px 0 0;
    overflow: visible;
  }
}

.hidden {
  display: none;
}

.signin-shell {
  min-height: calc(100 * var(--vh));
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--accent);
}

.signin-card {
  width: min(620px, 100%);
  padding: 34px;
  border-radius: 32px;
  background: #fff;
  border: 1px solid #fff;
  box-shadow: 0 30px 80px rgba(116, 16, 59, 0.16);
  display: grid;
  gap: 24px;
  position: relative;
  z-index: 1;
  margin-block: auto;
}

.signin-brand {
  align-items: center;
  gap: 18px;
}

.signin-logo-frame {
  width: 104px;
  height: 104px;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.signin-brand-logo {
  width: 96px;
  height: auto;
  display: block;
}

.signin-brand-text {
  gap: 6px;
}

.signin-brand-text h1 {
  font-size: clamp(2.3rem, calc(4 * var(--vw)), 3.1rem);
  line-height: 0.95;
}

.signin-form-copy {
  display: grid;
  gap: 6px;
}

.signin-form-copy h2 {
  margin: 0;
  font-size: 1.4rem;
}

.signin-form-copy p {
  margin: 0;
  color: rgba(70, 43, 56, 0.76);
  line-height: 1.45;
}

.signin-card input,
.signin-card select,
.signin-card textarea {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(17, 17, 17, 0.1);
}

.signin-card input:focus,
.signin-card select:focus,
.signin-card textarea:focus {
  background: #ffffff;
}

.signin-card input:-webkit-autofill,
.signin-card input:-webkit-autofill:hover,
.signin-card input:-webkit-autofill:focus,
.signin-card input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  box-shadow: 0 0 0 1000px #ffffff inset;
  transition: background-color 9999s ease-out 0s;
}

.signin-summary {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(239, 22, 101, 0.06);
  border: 1px solid rgba(17, 17, 17, 0.06);
}

.signin-summary.hidden,
.signin-feedback.hidden,
.signin-debug.hidden {
  display: none;
}

.signin-summary strong,
.signin-summary small {
  display: block;
}

.signin-summary small {
  color: var(--muted);
}

.signin-mfa-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(239, 22, 101, 0.06);
  border: 1px solid rgba(17, 17, 17, 0.06);
}

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

.signin-mfa-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 12px;
}

.signin-code-pad {
  width: min(360px, 100%);
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.signin-code-key {
  min-width: 0;
  min-height: 56px;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(239, 22, 101, 0.14);
  border-radius: 18px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(116, 16, 59, 0.08);
  font: inherit;
  font-size: 1.24rem;
  font-weight: 800;
  line-height: 1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.signin-code-key:hover,
.signin-code-key:focus-visible,
.signin-code-key:active {
  border-color: rgba(239, 22, 101, 0.34);
  background: rgba(255, 244, 248, 0.98);
  color: var(--accent-deep);
  box-shadow: 0 10px 22px rgba(116, 16, 59, 0.12);
  transform: none;
}

.signin-code-key-action {
  color: var(--accent-deep);
  font-size: 0.86rem;
}

.signin-mfa-setup-card {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background: rgba(255, 255, 255, 0.72);
}

.signin-mfa-qr-wrap.hidden,
.signin-mfa-secret-wrap.hidden {
  display: none;
}

.signin-mfa-qr-wrap {
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(132, 24, 76, 0.1);
}

.signin-mfa-qr-image {
  width: min(220px, 100%);
  aspect-ratio: 1 / 1;
  display: block;
}

.signin-mfa-qr-image.hidden,
.signin-mfa-qr-markup.hidden {
  display: none;
}

.signin-mfa-qr-markup {
  width: min(220px, 100%);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}

.signin-mfa-qr-markup svg {
  width: 100%;
  height: 100%;
  display: block;
}

.signin-mfa-secret-wrap {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

.signin-mfa-secret-wrap span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.signin-mfa-secret-wrap strong {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(239, 22, 101, 0.06);
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  letter-spacing: 0.14em;
  word-break: break-word;
}

.signin-trust-device {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.signin-trust-device input {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  flex: none;
  accent-color: var(--accent);
}

.signin-inline-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.signin-link-button {
  width: auto;
  min-width: 0;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  font-size: 0.94rem;
  font-weight: 700;
  box-shadow: none;
}

.signin-link-button:hover,
.signin-link-button:focus-visible {
  background: transparent;
  color: var(--accent);
  transform: none;
  box-shadow: none;
}

.ghost-button {
  background: rgba(255, 248, 252, 0.96);
  color: var(--ink);
}

.ghost-button:hover {
  background: rgba(255, 240, 247, 0.98);
}

.signin-feedback {
  margin: -6px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(239, 22, 101, 0.14);
  background: rgba(239, 22, 101, 0.08);
  color: #9d144d;
  font-weight: 600;
}

.signin-feedback[data-tone="warning"] {
  border-color: rgba(180, 128, 14, 0.2);
  background: rgba(255, 208, 96, 0.12);
  color: #8a5f00;
}

.signin-debug {
  margin: -2px 0 0;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(17, 17, 17, 0.03);
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
  line-height: 1.45;
}

.mode-selector-shell {
  background:
    radial-gradient(circle at top left, rgba(255, 220, 128, 0.34), transparent 28%),
    radial-gradient(circle at bottom right, rgba(239, 22, 101, 0.2), transparent 30%),
    linear-gradient(140deg, #fff7df 0%, #ffeac7 30%, #ffd8d0 64%, #fff6eb 100%);
}

.mode-selector-card {
  width: min(760px, 100%);
}

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

.mode-selector-option {
  min-width: 0;
  margin-top: 0;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 247, 251, 0.96) 100%);
  color: var(--ink);
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 10px;
  text-align: left;
  box-shadow: 0 18px 42px rgba(116, 16, 59, 0.1);
}

.mode-selector-option:hover,
.mode-selector-option:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(239, 22, 101, 0.24);
  box-shadow: 0 24px 50px rgba(116, 16, 59, 0.16);
}

.mode-selector-option:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.mode-selector-option-label {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.1);
  color: #9d144d;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mode-selector-option strong {
  font-size: 1.18rem;
  line-height: 1.2;
}

.mode-selector-option small {
  color: rgba(70, 43, 56, 0.78);
  line-height: 1.45;
}

.mode-selector-signout {
  width: auto;
  justify-self: start;
  margin-top: 0;
}

body[data-auth-page="signin"] .brand-logo {
  display: block;
}

body[data-auth-page="mode-selector"] .brand-logo {
  display: block;
}

@media (max-width: 760px) {
  .signin-shell {
    padding: 18px;
    align-items: flex-start;
    overflow-y: auto;
  }

  .signin-card {
    padding: 24px;
    border-radius: 26px;
  }

  .signin-brand {
    grid-template-columns: 1fr;
    display: grid;
    justify-items: start;
  }

  .signin-logo-frame {
    width: 88px;
    height: 88px;
    border-radius: 24px;
  }

  .signin-brand-logo {
    width: 82px;
  }

  .mode-selector-grid {
    grid-template-columns: 1fr;
  }

  .mode-selector-option {
    padding: 18px;
  }
}

.tasks-redirect-body {
  min-height: calc(100 * var(--vh));
}

.tasks-redirect-shell {
  min-height: calc(100 * var(--vh));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.tasks-redirect-card {
  width: min(560px, 100%);
  text-align: center;
}

.tasks-redirect-card h1 {
  margin: 0 0 12px;
}

.admin-blank-body {
  min-height: calc(100 * var(--vh));
}

.admin-blank-main {
  min-height: calc(100 * var(--vh));
  padding: 10px;
}

.admin-blank-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.admin-home-grid {
  align-items: start;
}

.admin-home-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-home-grid .admin-blank-card {
  width: 100%;
  text-align: left;
}

.admin-blank-card {
  width: min(680px, 100%);
  text-align: center;
  padding: 36px;
}

.admin-blank-card h1 {
  margin: 0 0 12px;
}

.admin-page-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-urgent-actions {
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 32px;
}

.admin-home-widget {
  min-height: 100%;
}

.admin-urgent-actions .section-head h2,
.admin-urgent-section h3 {
  margin: 0;
}

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

.admin-urgent-stat {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(239, 22, 101, 0.1);
  background: linear-gradient(135deg, rgba(255, 250, 252, 0.98), rgba(255, 245, 231, 0.92));
}

.admin-urgent-stat strong {
  font-size: clamp(2rem, calc(4 * var(--vw)), 2.7rem);
  line-height: 1;
}

.admin-urgent-stat span {
  color: var(--muted);
  font-weight: 600;
}

.admin-urgent-section {
  display: grid;
  gap: 12px;
}

.admin-urgent-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-urgent-link {
  width: auto;
  min-width: 0;
  padding-inline: 18px;
}

.admin-urgent-list {
  display: grid;
  gap: 12px;
}

.admin-urgent-item {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.88);
}

.admin-urgent-item-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.admin-urgent-item-button:hover,
.admin-urgent-item-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(239, 22, 101, 0.16);
  background: linear-gradient(135deg, rgba(255, 250, 252, 0.98), rgba(255, 245, 231, 0.92));
  box-shadow: 0 14px 28px rgba(49, 8, 26, 0.08);
  outline: none;
}

.admin-urgent-item strong {
  font-size: 1.02rem;
  color: #111111;
}

.admin-urgent-item-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.admin-urgent-empty {
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px dashed rgba(239, 22, 101, 0.16);
  background: rgba(255, 251, 252, 0.86);
  color: var(--muted);
}

.admin-task-overview {
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1.28fr);
  gap: 22px;
  align-items: start;
}

.admin-task-pie-wrap {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
}

.admin-task-status-pie {
  position: relative;
  display: grid;
  width: 150px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#eee8eb 0deg 360deg);
  box-shadow: 0 16px 34px rgba(49, 8, 26, 0.08);
}

.admin-task-status-pie::after {
  content: "";
  position: absolute;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffffff;
}

.admin-task-status-pie > span {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  line-height: 1;
}

.admin-task-status-pie strong {
  color: #111111;
  font-size: 2rem;
}

.admin-task-status-pie small {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 700;
}

.admin-task-pie-legend {
  display: grid;
  width: 100%;
  gap: 10px;
}

.admin-task-pie-legend > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  color: var(--muted);
}

.admin-task-pie-legend strong {
  color: #111111;
}

.admin-task-legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.admin-task-legend-dot.is-active { background: #f6bd2a; }
.admin-task-legend-dot.is-overdue { background: #ef1665; }

@media (max-width: 720px) {
  .admin-task-overview { grid-template-columns: 1fr; }
}

.admin-overdue-modal {
  width: min(760px, calc(calc(100 * var(--vw)) - 40px));
}

.admin-overdue-modal-content {
  gap: 12px;
}

.admin-overdue-task-item {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.92);
}

.admin-overdue-task-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.admin-overdue-task-head strong {
  font-size: 1.02rem;
}

.admin-overdue-task-meta,
.admin-overdue-task-detail,
.admin-overdue-empty {
  color: var(--muted);
}

.admin-overdue-task-detail {
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .admin-home-grid.two-col {
    grid-template-columns: 1fr;
  }
}

.events-home-layout {
  display: grid;
  gap: 20px;
  align-items: start;
}

.events-home-actions-panel {
  padding: 0;
}

.events-home-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
}

.events-home-actions .leads-create-button {
  width: auto;
  flex: 0 0 auto;
}

.events-home-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.events-home-column {
  display: grid;
  gap: 20px;
  align-content: start;
}

.events-goal-widget {
  padding: 28px;
  width: 100%;
}

.events-goal-widget-speedometer-progress {
  stroke: url(#eventsGoalSpeedometerGradient);
}

.events-home-hero,
.events-home-panel {
  display: grid;
  gap: 16px;
  padding: 28px;
}

.events-home-hero {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.events-home-hero h1,
.events-home-panel-head h2 {
  margin: 0;
}

.events-home-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  flex-wrap: wrap;
}

.events-home-funnel-panel .reports-widget-main {
  display: grid;
  gap: 14px;
}

.events-home-funnel-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.events-home-list {
  display: grid;
  gap: 16px;
}

.events-home-list-horizontal {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(380px, 460px);
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  align-items: stretch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.events-home-list-horizontal .events-home-event-link {
  height: 100%;
}

.events-home-panel-wide {
  width: 100%;
}

.events-home-event-link {
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background:
    linear-gradient(135deg, rgba(255, 250, 252, 0.98), rgba(255, 245, 231, 0.94)),
    #fff;
  border: 1px solid rgba(239, 22, 101, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.events-home-event-link:hover,
.events-home-event-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(239, 22, 101, 0.2);
  box-shadow: 0 16px 32px rgba(116, 16, 59, 0.12);
}

.events-home-event-accent {
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, #ef1665 0%, #ff7a3d 55%, #ffbe1b 100%);
}

.events-home-event-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.events-home-event-meta-pill {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(239, 22, 101, 0.1);
  background: linear-gradient(135deg, rgba(255, 240, 247, 0.96), rgba(255, 248, 224, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.events-home-event-meta-pill span {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b14976;
}

.events-home-event-meta-pill strong {
  font-size: 1rem;
  color: var(--ink);
}

.events-reports-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.events-reports-shell {
  display: grid;
  gap: 18px;
  padding: 28px;
  min-height: calc(calc(100 * var(--vh)) - 120px);
}

.events-reports-shell-wide {
  width: 100%;
  min-height: 0;
  margin-bottom: 20px;
}

.events-reports-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  flex-wrap: wrap;
}

.events-reports-head h1 {
  margin: 0 0 10px;
}

.events-reports-search {
  width: min(420px, 100%);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 12px 28px rgba(62, 10, 32, 0.08);
}

.events-reports-search input {
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.events-reports-search input::placeholder {
  color: var(--muted);
}

.events-reports-list {
  display: grid;
  gap: 16px;
}

.events-reports-list-horizontal {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(520px, 680px);
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: stretch;
  padding-bottom: 8px;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.events-reports-list-horizontal .events-report-card {
  height: 100%;
}

.events-reports-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
  gap: 20px;
  align-items: start;
}

.events-analytics-stack {
  display: grid;
  gap: 20px;
}

.events-analytics-panel,
.events-analytics-chart-panel {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.events-analytics-head,
.events-analytics-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  flex-wrap: wrap;
}

.events-analytics-head h2,
.events-analytics-chart-head h3 {
  margin: 0;
}

.events-analytics-head-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.events-analytics-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.events-analytics-kpi-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(239, 22, 101, 0.12);
  background: linear-gradient(135deg, rgba(255, 250, 252, 0.98), rgba(255, 244, 229, 0.94));
  box-shadow: 0 8px 18px rgba(116, 16, 59, 0.08);
}

.events-analytics-kpi-card strong {
  font-size: clamp(1.7rem, calc(2 * var(--vw)), 2.3rem);
  line-height: 1;
  color: var(--ink);
}

.events-analytics-kpi-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.events-report-card {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.events-report-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
}

.events-report-card-empty {
  text-align: center;
}

.events-report-card-empty h3 {
  margin: 0 0 10px;
}

.events-report-card-main {
  display: grid;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.events-report-card-main h3 {
  margin: 0;
}

.events-report-card-copy {
  margin: 0;
  color: var(--muted);
}

.events-report-metric {
  min-width: 180px;
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
}

.events-report-metrics {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 24px;
  flex-wrap: nowrap;
}

.events-report-card .events-report-metric {
  min-width: 110px;
}

.events-report-funnel {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.events-report-funnel .sales-funnel-visual {
  margin-top: 0;
}

.events-report-funnel-empty {
  padding: 14px 16px;
}

.events-report-bar-chart {
  display: block;
  width: 100%;
}

.events-report-bar-plot {
  min-height: 148px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  background:
    linear-gradient(to top, rgba(17, 17, 17, 0.05) 1px, transparent 1px) 0 100% / 100% 50%,
    linear-gradient(to top, rgba(17, 17, 17, 0.05) 1px, transparent 1px) 0 0 / 100% 100%;
}

.events-report-bar-stage {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  align-items: end;
  justify-items: center;
}

.events-report-bar-value {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}

.events-report-bar-track {
  width: 100%;
  height: 108px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.events-report-bar-fill {
  width: min(100%, 44px);
  min-height: 0;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(180deg, rgba(239, 22, 101, 0.88), rgba(255, 190, 27, 0.88));
  box-shadow: 0 10px 18px rgba(116, 16, 59, 0.12);
}

.events-report-bar-fill.is-empty {
  background: linear-gradient(180deg, rgba(129, 112, 121, 0.14), rgba(129, 112, 121, 0.08));
  box-shadow: none;
}

.events-report-bar-label {
  font-size: 0.72rem;
  line-height: 1.2;
  color: var(--muted);
  text-align: center;
  word-break: break-word;
}

@media (max-width: 1180px) {
  .events-goal-widget,
  .events-home-columns,
  .events-reports-layout {
    width: 100%;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .events-home-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .events-analytics-kpis,
  .events-report-card,
  .events-report-card-top,
  .events-report-metrics {
    grid-template-columns: 1fr;
  }

  .events-report-card,
  .events-report-card-top,
  .events-report-metrics {
    display: grid;
    justify-content: stretch;
  }

  .events-report-metric {
    justify-items: start;
    text-align: left;
    min-width: 0;
  }

  .events-report-bar-chart {
    display: block;
  }

  .events-report-bar-plot {
    border-top: 1px solid rgba(17, 17, 17, 0.08);
  }
}

.events-report-metric-value {
  font-size: clamp(2rem, calc(3 * var(--vw)), 2.7rem);
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
}

.events-report-metric-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a04b72;
}

.admin-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(116, 16, 59, 0.08);
}

.admin-section-link:hover,
.admin-section-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(239, 22, 101, 0.24);
}

.admin-section-link.is-active {
  background: rgba(239, 22, 101, 0.1);
  border-color: rgba(239, 22, 101, 0.2);
  color: #9d144d;
}

.admin-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: min(980px, 100%);
}

.admin-module-link {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 247, 251, 0.96) 100%);
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 18px 42px rgba(116, 16, 59, 0.08);
}

.admin-module-link:hover,
.admin-module-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(239, 22, 101, 0.24);
  box-shadow: 0 24px 50px rgba(116, 16, 59, 0.14);
}

.admin-module-link strong {
  font-size: 1.18rem;
  line-height: 1.2;
}

.admin-module-link small {
  color: rgba(70, 43, 56, 0.78);
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .messaging-page .messaging-single-shell {
    grid-template-columns: minmax(280px, 325px) minmax(0, 1fr);
  }

  .messaging-page .messaging-inboxes-view {
    display: none;
  }
}

@media (max-width: 900px) {
  .app-shell,
  body.sidebar-collapsed .app-shell,
  body.right-sidebar-collapsed .app-shell,
  body.sidebar-collapsed.right-sidebar-collapsed .app-shell,
  html.right-sidebar-collapsed .app-shell,
  html.right-sidebar-collapsed body.sidebar-collapsed .app-shell,
  .content-grid,
  .goal-overview-grid,
  .metrics-grid,
  .supplemental-grid,
  .messaging-single-shell,
  .messaging-ios-shell,
  .two-col,
  .three-col {
    grid-template-columns: 1fr;
  }

  .app-shell,
  body.sidebar-collapsed .app-shell,
  body.right-sidebar-collapsed .app-shell,
  body.sidebar-collapsed.right-sidebar-collapsed .app-shell,
  html.right-sidebar-collapsed .app-shell,
  html.right-sidebar-collapsed body.sidebar-collapsed .app-shell {
    min-height: calc(100 * var(--vh));
    min-height: calc(100 * var(--dvh));
  }

  .main-content {
    padding: 0 0 calc(112px + env(safe-area-inset-bottom, 0px));
    gap: 10px;
  }

  .panel,
  .metric-card,
  .past-sales-widget,
  .dnc-widget,
  .goal-widget,
  .company-goal-widget,
  .sales-insights-widget,
  .leads-filter-widget-primary,
  .company-events-widget {
    padding: 14px;
  }

  .hero {
    padding: 16px;
    gap: 10px;
  }

  .section-head {
    gap: 8px;
    margin-bottom: 10px;
  }

  .hero-module-actions,
  .patient-progress-actions,
  .calls-log-actions,
  .goal-widget-head-actions {
    gap: 8px;
  }

  button,
  .module-action-button,
  .secondary-button,
  .button-secondary,
  .patient-task-button,
  .calls-log-link,
  .preview-trigger,
  .preview-menu .preview-trigger {
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 14px;
  }

  .chip,
  .tag,
  .score-pill {
    padding: 6px 10px;
  }

  .past-sales-chart-card,
  .dnc-preview-item,
  .lead-modal-form,
  .lead-modal-item,
  .qa-widget-preview-item,
  .sales-funnel-empty,
  .calls-log-notes,
  .calls-log-transcript,
  .settings-language-card,
  .settings-dnc-card,
  .patient-upcoming-card,
  .patient-task-card {
    padding: 12px;
    border-radius: 16px;
  }

  .past-sales-preview,
  .dnc-widget-preview,
  .lead-modal-results,
  .qa-widget-preview,
  .qa-widget-list {
    gap: 8px;
  }

  body.sidebar-collapsed .main-content,
  body.right-sidebar-collapsed .main-content,
  body.sidebar-collapsed.right-sidebar-collapsed .main-content {
    padding: 0 0 calc(112px + env(safe-area-inset-bottom, 0px));
  }

  .sidebar,
  body.sidebar-collapsed .sidebar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    min-height: auto;
    height: auto;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    border-right: 0;
    border-top: 1px solid rgba(17, 17, 17, 0.08);
    background:
      linear-gradient(180deg, rgba(239, 22, 105, 0.96) 0%, rgba(225, 18, 95, 0.97) 100%);
    box-shadow: 0 -18px 40px rgba(116, 16, 59, 0.18);
    z-index: 80;
  }

  .sidebar-content,
  body.sidebar-collapsed .sidebar-content {
    flex-direction: row;
    align-items: center;
    gap: 0;
    min-height: 0;
    padding-top: 0;
  }

  .brand-lockup,
  .sidebar-center-logo,
  .sidebar-copy,
  .sidebar-toggle-slot,
  .sidebar-collapse-toggle,
  .sidebar-footer-brand,
  body.sidebar-collapsed .brand-lockup,
  body.sidebar-collapsed .sidebar-center-logo,
  body.sidebar-collapsed .sidebar-copy,
  body.sidebar-collapsed .sidebar-toggle-slot,
  body.sidebar-collapsed .sidebar-footer-brand {
    display: none;
  }

  .sidebar-nav,
  body.sidebar-collapsed .sidebar-nav {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    margin-top: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .sidebar-nav::-webkit-scrollbar,
  body.sidebar-collapsed .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item,
  body.sidebar-collapsed .nav-item {
    width: 74px;
    flex: 0 0 74px;
    min-height: 68px;
    margin-inline: 0;
    padding: 8px 4px 9px;
    border-radius: 18px;
    text-indent: 0;
    overflow: visible;
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff9fc;
    font-size: 0.68rem;
    line-height: 1.1;
    text-align: center;
    box-shadow: none;
  }

  .nav-item:not(.active):not(.nav-item-panel-active),
  body.sidebar-collapsed .nav-item:not(.active):not(.nav-item-panel-active) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.14);
    color: rgba(255, 249, 252, 0.96);
  }

  .nav-item.active,
  .nav-item.nav-item-panel-active,
  body.sidebar-collapsed .nav-item.active,
  body.sidebar-collapsed .nav-item.nav-item-panel-active {
    background: rgba(255, 245, 248, 0.96);
    border-color: rgba(255, 255, 255, 0.75);
    color: var(--accent-deep);
    box-shadow: 0 12px 26px rgba(116, 16, 59, 0.14);
  }

  .nav-item::after,
  body.sidebar-collapsed .nav-item::after {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    width: 22px;
    height: 22px;
    margin: 0;
    text-indent: 0;
  }

  body.sidebar-collapsed .nav-item::before {
    content: none;
    display: none;
  }

  .nav-item-label,
  body.sidebar-collapsed .nav-item-label {
    display: block;
    min-width: 0;
    flex: 0 0 auto;
    font-size: 0.68rem;
    line-height: 1.15;
  }

  .nav-item-trailing,
  .nav-count-badge,
  .nav-item-icon,
  body.sidebar-collapsed .nav-item-trailing,
  body.sidebar-collapsed .nav-count-badge,
  body.sidebar-collapsed .nav-item-icon {
    display: none;
  }

  .leads-filter-widget {
    grid-column: auto;
  }

  .leads-filter-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-modal-layout,
  .lead-modal-toolbar,
  .lead-modal-form-grid,
  .create-lead-modal-grid {
    grid-template-columns: 1fr;
  }

  .lead-modal-form {
    position: static;
  }

  .create-lead-modal-grid-span-2 {
    grid-column: auto;
  }

  .leads-modal-list {
    max-height: none;
  }

  .wide-panel {
    grid-row: auto;
  }

  .right-sidebar {
    display: none;
  }

  body.right-sidebar-collapsed .right-sidebar {
    display: none;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .messaging-sidebar-panel,
  .messaging-main-panel,
  .messaging-list-view,
  .messaging-detail-view {
    min-height: auto;
  }

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

  .account-dropdown {
    width: min(280px, calc(calc(100 * var(--vw)) - 48px));
  }

  .account-topbar {
    gap: 12px;
  }

  .account-topbar-left,
  .account-topbar-center,
  .account-topbar-right {
    width: 100%;
  }

  .account-topbar-center {
    min-width: 0;
    order: 3;
  }

  .account-topbar-right {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .account-mode-launcher-panel {
    width: max-content;
    max-width: calc(calc(100 * var(--vw)) - 24px);
    right: -8px;
  }

  .account-mode-launcher-grid {
    grid-template-columns: repeat(2, 88px);
  }

  .topbar-lead-search {
    width: 100%;
  }

  .topbar-lead-search-field {
    padding: 10px 14px;
  }

  .photo-crop-body {
    grid-template-columns: 1fr;
  }

  .photo-crop-stage {
    min-height: 320px;
  }

  .account-profile-summary {
    grid-template-columns: 1fr;
  }

  .account-profile-overlay {
    place-items: start center;
  }

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

  .patient-card-sections {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .patient-card-section-nav {
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    padding: 16px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(17, 17, 17, 0.1);
  }

  .patient-card-section-button,
  .patient-card-section-button:hover,
  .patient-card-section-button.is-active {
    width: auto;
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid rgba(239, 22, 101, 0.16);
    border-radius: 999px;
    white-space: nowrap;
  }

  .patient-card-section-button.is-active {
    border-color: rgba(239, 22, 101, 0.3);
    box-shadow: none;
  }

  .patient-card-section-content {
    padding: 22px 0 0;
  }

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

  .patient-note-history {
    max-height: 260px;
    overflow-y: auto;
    padding-right: 0;
    padding-bottom: 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(17, 17, 17, 0.1);
  }

  .patient-notes {
    width: 100%;
    margin-left: 0;
  }

  .patient-note-detail {
    padding: 22px 0 0;
  }

  .patient-schedule-actions {
    grid-template-columns: 1fr;
  }

  .week-view-grid,
  .month-weekdays,
  .month-cells {
    grid-template-columns: 1fr;
  }

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

  .calendar-composer-actions {
    grid-template-columns: 1fr;
  }

  .task-quick-add {
    grid-template-columns: 1fr;
  }

  .messaging-new-thread-grid {
    grid-template-columns: 1fr;
  }

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

  .day-time-row {
    grid-template-columns: 84px 1fr;
  }

  .day-time-marker {
    left: 84px;
  }

  .hero-stat {
    text-align: left;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .brand-logo {
    width: 72px;
    height: 72px;
  }

  .messaging-thread-header,
  .messaging-sidebar-top,
  .messaging-composer-actions,
  .messaging-list-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .messaging-thread-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .messaging-thread-list,
  .messaging-conversation {
    max-height: none;
  }

  .message-unread-pill {
    display: none;
  }

  .message-bubble {
    max-width: 86%;
  }

  .admin-module-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .app-shell {
    grid-template-columns: 96px minmax(0, 1fr) 318px;
  }

  body.sidebar-collapsed .app-shell {
    grid-template-columns: 88px minmax(0, 1fr) 318px;
  }

  body.right-sidebar-collapsed .app-shell,
  html.right-sidebar-collapsed .app-shell {
    grid-template-columns: 96px minmax(0, 1fr) 76px;
  }

  body.sidebar-collapsed.right-sidebar-collapsed .app-shell,
  html.right-sidebar-collapsed body.sidebar-collapsed .app-shell {
    grid-template-columns: 88px minmax(0, 1fr) 76px;
  }

  .sidebar {
    padding-inline: 10px;
  }

  .sidebar-content {
    gap: 10px;
  }

  .sidebar-header {
    padding-inline: 4px;
  }

  .right-sidebar {
    padding: 22px 16px;
    gap: 14px;
  }

  .sidebar-message-list {
    margin-inline: 0;
  }

  .right-sidebar-header {
    gap: 10px;
  }

  .right-sidebar-tabs {
    gap: 6px;
  }

  .right-sidebar-tab {
    width: 42px;
    height: 42px;
    min-width: 42px;
  }

  .right-sidebar-tab::before {
    width: 19px;
    height: 19px;
  }

  .right-sidebar-toggle {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .right-sidebar-section-head {
    gap: 10px;
  }

  .right-sidebar-section-head h3 {
    font-size: 1.85rem;
  }

  .sidebar-message-item,
  .sidebar-message-composer,
  .sidebar-call-card,
  .sidebar-dialer,
  .upcoming-task-item {
    padding: 12px 16px;
    border-radius: 0;
  }

  .upcoming-task-list,
  .upcoming-tasks-list {
    margin-inline: -16px;
  }

  .sidebar-calls-list {
    margin-inline: -16px;
  }

  .sidebar-call-card-layout {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.85fr);
    gap: 12px;
  }

  .sidebar-phone-layout {
    gap: 8px;
    padding-bottom: 18px;
  }

  .sidebar-dialer {
    max-height: min(calc(38 * var(--vh)), 420px);
  }

  .sidebar-dialer-key {
    min-height: 52px;
  }

  .sidebar-calendar-hour {
    padding-inline: 12px 10px;
    font-size: 0.84rem;
  }

  .sidebar-calendar-event strong {
    font-size: 0.9rem;
  }

  .sidebar-calendar-event small,
  .sidebar-message-preview,
  .sidebar-call-card-meta,
  .upcoming-task-meta {
    font-size: 0.86rem;
  }

  .upcoming-task-inline-actions {
    gap: 8px;
  }

  .sidebar-dialer-key {
    padding: 12px 8px;
    font-size: 1rem;
  }
}

.team-manager-panel {
  display: grid;
  gap: 18px;
}

.team-manager-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
}

.team-manager-actions,
.team-filter {
  display: flex;
  gap: 10px;
  align-items: center;
}

.team-filter span,
.team-form-grid span {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.team-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.team-summary-card {
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 20px;
  background: rgba(255, 251, 252, 0.94);
  padding: 14px 16px;
}

.team-summary-card strong {
  display: block;
  font-size: 1.1rem;
  color: var(--heading);
}

.team-summary-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.team-manager-stack {
  display: grid;
  gap: 18px;
}

.team-manager-grid {
  align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-roster-panel {
  width: 100%;
}

.team-roster-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.team-roster-toolbar h4 {
  margin-bottom: 6px;
}

.team-roster-toolbar .muted {
  max-width: 760px;
}

.team-roster-toolbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.team-roster-toolbar-actions button.is-active {
  background: linear-gradient(135deg, rgba(255, 245, 228, 0.98), rgba(255, 211, 123, 0.98));
  border-color: rgba(255, 180, 54, 0.45);
  color: var(--accent-deep);
}

.team-inline-controls {
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(239, 22, 101, 0.14);
  background: linear-gradient(135deg, rgba(255, 249, 251, 0.98), rgba(255, 246, 228, 0.96));
  box-shadow: 0 16px 34px rgba(239, 22, 101, 0.08);
}

.team-inline-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.team-inline-form .team-button-row {
  grid-column: 1 / -1;
}

.soft-panel {
  background: rgba(255, 250, 252, 0.9);
}

.team-form-grid {
  display: grid;
  gap: 14px;
}

.team-form-grid label {
  display: block;
}

.team-form-grid button {
  width: auto;
  min-width: 92px;
}

.team-dropzone {
  border: 1px dashed rgba(239, 22, 101, 0.24);
  border-radius: 20px;
  background: rgba(255, 248, 252, 0.92);
  padding: 16px 18px;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.team-dropzone strong,
.team-dropzone small {
  display: block;
}

.team-dropzone small {
  margin-top: 6px;
  color: var(--muted);
}

.team-dropzone-active {
  border-color: rgba(255, 190, 27, 0.34);
  background: rgba(255, 245, 221, 0.92);
}

.team-dropzone.is-over {
  border-color: rgba(239, 22, 101, 0.52);
  background: rgba(255, 237, 245, 0.96);
  box-shadow: 0 18px 36px rgba(239, 22, 101, 0.12);
  transform: translateY(-2px);
}

.team-field-surface.team-dropzone,
.team-field-surface.team-dropzone-active,
.team-field-surface.team-dropzone.is-over {
  background:
    linear-gradient(
      180deg,
      rgba(92, 180, 92, 0.98) 0%,
      rgba(92, 180, 92, 0.98) 12.5%,
      rgba(84, 171, 84, 0.98) 12.5%,
      rgba(84, 171, 84, 0.98) 25%,
      rgba(92, 180, 92, 0.98) 25%,
      rgba(92, 180, 92, 0.98) 37.5%,
      rgba(84, 171, 84, 0.98) 37.5%,
      rgba(84, 171, 84, 0.98) 50%,
      rgba(92, 180, 92, 0.98) 50%,
      rgba(92, 180, 92, 0.98) 62.5%,
      rgba(84, 171, 84, 0.98) 62.5%,
      rgba(84, 171, 84, 0.98) 75%,
      rgba(92, 180, 92, 0.98) 75%,
      rgba(92, 180, 92, 0.98) 87.5%,
      rgba(84, 171, 84, 0.98) 87.5%,
      rgba(84, 171, 84, 0.98) 100%
    );
}

.team-field-surface.team-dropzone-active {
  border-color: rgba(255, 190, 27, 0.34);
}

.team-field-surface.team-dropzone.is-over {
  border-color: rgba(239, 22, 101, 0.52);
  box-shadow: 0 18px 36px rgba(239, 22, 101, 0.12);
}

.team-field-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.team-field-shell {
  min-width: 0;
}

.team-field-surface {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  padding: 18px 18px 20px;
  background:
    linear-gradient(
      180deg,
      rgba(92, 180, 92, 0.98) 0%,
      rgba(92, 180, 92, 0.98) 12.5%,
      rgba(84, 171, 84, 0.98) 12.5%,
      rgba(84, 171, 84, 0.98) 25%,
      rgba(92, 180, 92, 0.98) 25%,
      rgba(92, 180, 92, 0.98) 37.5%,
      rgba(84, 171, 84, 0.98) 37.5%,
      rgba(84, 171, 84, 0.98) 50%,
      rgba(92, 180, 92, 0.98) 50%,
      rgba(92, 180, 92, 0.98) 62.5%,
      rgba(84, 171, 84, 0.98) 62.5%,
      rgba(84, 171, 84, 0.98) 75%,
      rgba(92, 180, 92, 0.98) 75%,
      rgba(92, 180, 92, 0.98) 87.5%,
      rgba(84, 171, 84, 0.98) 87.5%,
      rgba(84, 171, 84, 0.98) 100%
    );
  border-radius: 28px;
}

.team-field-lines,
.team-field-lane {
  position: relative;
}

.team-field-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.team-field-lane {
  z-index: 1;
}

.team-field-lines span {
  position: absolute;
  display: block;
  border: 3px solid rgba(255, 90, 164, 0.96);
  box-sizing: border-box;
  pointer-events: none;
}

.field-outline {
  inset: 10px;
  border-radius: 22px;
}

.field-center-line {
  left: 10px;
  right: 10px;
  top: 50%;
  border-width: 3px 0 0;
}

.field-center-circle {
  width: 88px;
  height: 88px;
  top: calc(50% - 44px);
  left: calc(50% - 44px);
  border-radius: 999px;
}

.field-center-spot {
  width: 10px;
  height: 10px;
  top: calc(50% - 5px);
  left: calc(50% - 5px);
  border-radius: 999px;
  background: rgba(255, 90, 164, 0.96);
  border: 0;
}

.field-top-box,
.field-bottom-box {
  width: 34%;
  height: 15%;
  left: 33%;
}

.field-top-box {
  top: 34px;
  border-top: 0;
}

.field-bottom-box {
  bottom: 34px;
  border-bottom: 0;
}

.field-top-goal-box,
.field-bottom-goal-box {
  width: 14%;
  height: 7%;
  left: 43%;
}

.field-top-goal-box {
  top: 34px;
  border-top: 0;
}

.field-bottom-goal-box {
  bottom: 34px;
  border-bottom: 0;
}

.field-top-goal,
.field-bottom-goal {
  display: none;
}

.field-top-goal {
  top: 0;
}

.field-bottom-goal {
  bottom: 0;
}

.field-top-arc,
.field-bottom-arc {
  width: 72px;
  height: 36px;
  left: calc(50% - 36px);
  border-radius: 0 0 96px 96px;
  border-top: 0;
  border-left: 3px solid rgba(255, 90, 164, 0.96);
  border-right: 3px solid rgba(255, 90, 164, 0.96);
  border-bottom: 3px solid rgba(255, 90, 164, 0.96);
}

.field-top-arc {
  top: calc(34px + 15%);
}

.field-bottom-arc {
  bottom: calc(34px + 15%);
  transform: rotate(180deg);
}

.field-corner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
}

.field-corner-top-left {
  top: 10px;
  left: 10px;
  border-right: 0;
  border-bottom: 0;
}

.field-corner-top-right {
  top: 10px;
  right: 10px;
  border-left: 0;
  border-bottom: 0;
}

.field-corner-bottom-left {
  bottom: 10px;
  left: 10px;
  border-right: 0;
  border-top: 0;
}

.field-corner-bottom-right {
  bottom: 10px;
  right: 10px;
  border-left: 0;
  border-top: 0;
}

.team-field-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  color: rgba(255, 246, 251, 0.96);
  margin-bottom: 10px;
  padding-inline: 8px;
}

.team-field-caption strong,
.team-field-caption small {
  display: block;
}

.team-field-caption small {
  color: rgba(255, 238, 247, 0.82);
}

.team-field-lane {
  min-height: 82px;
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
}

.team-field-lane + .team-field-lane {
  margin-top: 4px;
}

.team-field-lane-top {
  min-height: 88px;
}

.team-field-lane-mid {
  min-height: 96px;
}

.team-field-lane-back,
.team-field-lane-bottom {
  min-height: 88px;
}

.team-field-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 235, 245, 0.16);
  border: 1px dashed rgba(255, 150, 198, 0.6);
  color: rgba(255, 240, 247, 0.92);
  font-weight: 600;
}

.team-field-player {
  width: min(138px, 100%);
  display: grid;
  justify-items: center;
  gap: 8px;
  cursor: grab;
}

.team-player-avatar {
  width: 58px;
  height: 58px;
  box-shadow: 0 14px 28px rgba(67, 111, 34, 0.24);
  border: 3px solid rgba(255, 232, 105, 0.92);
  font-size: 0.92rem;
}

.team-field-player-card {
  width: 100%;
  padding: 8px 10px 8px;
  border-radius: 16px;
  background: rgba(34, 84, 34, 0.42);
  backdrop-filter: blur(10px);
  color: #fff8fb;
  text-align: center;
  box-shadow: 0 12px 28px rgba(53, 105, 33, 0.22);
}

.team-field-player-card strong,
.team-field-player-card small,
.team-field-status span {
  display: block;
}

.team-field-player-card small {
  margin-top: 2px;
  color: rgba(255, 240, 247, 0.86);
}

.team-field-status {
  margin-top: 6px;
  text-align: left;
}

.team-field-status span {
  margin-bottom: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 233, 244, 0.84);
}

.team-field-status select {
  width: 100%;
  border-radius: 12px;
  background: rgba(255, 249, 241, 0.96);
  padding: 8px 10px;
}

.team-bench-shell {
  margin-top: 28px;
  padding: 16px 14px;
  background:
    linear-gradient(135deg, rgba(255, 242, 246, 0.98), rgba(255, 247, 224, 0.98));
  height: 560px;
  min-height: 560px;
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
}

.team-bench-header strong,
.team-bench-header small {
  display: block;
}

.team-bench-header small {
  margin-top: 6px;
  color: var(--muted);
}

.team-bench-lane {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: center;
  align-content: start;
  gap: 12px 10px;
  margin-top: 16px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.team-bench-player {
  width: 60px;
  height: 60px;
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: grab;
}

.team-bench-player .team-player-avatar {
  width: 60px;
  height: 60px;
}

.team-bench-hovercard {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  min-width: 170px;
  padding: 10px 12px;
  border-radius: 14px;
  z-index: 30;
  background:
    linear-gradient(135deg, rgba(239, 22, 101, 0.94), rgba(255, 102, 155, 0.9) 58%, rgba(255, 188, 53, 0.9));
  color: #fff8fb;
  box-shadow: 0 18px 34px rgba(116, 16, 59, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.team-bench-hovercard strong,
.team-bench-hovercard small {
  display: block;
}

.team-bench-hovercard small {
  margin-top: 3px;
  color: rgba(255, 245, 249, 0.9);
}

.team-bench-player:hover .team-bench-hovercard,
.team-bench-player:focus-within .team-bench-hovercard {
  opacity: 1;
  transform: translateY(-50%) translateX(4px);
}

.team-bench-player:hover,
.team-bench-player:focus-within {
  z-index: 20;
}

.team-bench-player.is-dragging,
.team-field-player.is-dragging {
  opacity: 0.5;
}

.team-roster-board {
  display: grid;
  gap: 18px;
}

.team-roster-board-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
}

.team-roster-board-header .muted {
  max-width: 760px;
}

.team-roster-board-actions {
  display: flex;
  align-items: start;
  gap: 12px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: end;
}

.team-roster-list .team-roster-board-actions {
  margin-left: 0;
  justify-content: flex-start;
}

.team-board-add-button {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
  padding-inline: 16px;
}

.team-board-secondary-button {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
}

.team-roster-rows {
  display: grid;
  gap: 16px;
}

.team-roster-workspace {
  display: grid;
  grid-template-columns: minmax(210px, 280px) minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.team-roster-list {
  display: grid;
  gap: 20px;
  padding: 0 20px 0 0;
  border: 0;
  border-right: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 0;
  background: transparent;
  position: sticky;
  top: 24px;
}

.team-roster-list-section {
  display: grid;
  gap: 9px;
}

.team-roster-list-section + .team-roster-list-section {
  padding-top: 18px;
  border-top: 1px solid rgba(239, 22, 101, 0.12);
}

.team-roster-list-label {
  margin: 0;
  color: var(--accent-deep);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.team-roster-list-group-toggle {
  width: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}

.team-roster-list-group-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.team-roster-list-group-edit {
  width: auto;
  min-width: 0;
  padding: 4px 8px;
  border: 1px solid rgba(239, 22, 101, 0.2);
  border-radius: 999px;
  background: transparent;
  color: var(--accent-deep);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}

.team-roster-list-group-edit:hover,
.team-roster-list-group-edit:focus-visible {
  border-color: var(--accent);
  background: rgba(239, 22, 101, 0.07);
}

.team-group-edit-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.team-group-edit-actions button {
  width: auto;
}

.team-roster-list-group-toggle:hover,
.team-roster-list-group-toggle:focus-visible {
  color: var(--ink);
}

.team-roster-list-group-chevron {
  color: var(--accent-deep);
  font-size: 1.1rem;
  line-height: 1;
}

.team-roster-list-items.is-collapsed {
  display: none;
}

.team-roster-list-items {
  display: grid;
  gap: 6px;
}

.team-roster-list-empty {
  margin: 0;
  padding: 8px 11px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.team-roster-board select,
.team-roster-board select option {
  font-family: var(--font-sans);
}

.team-roster-list-item {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.team-roster-list-item > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-roster-list-item small {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  color: var(--accent-deep);
  background: rgba(239, 22, 101, 0.08);
  font-size: 0.76rem;
  font-weight: 800;
}

.team-roster-list-item:hover,
.team-roster-list-item:focus-visible {
  border-color: rgba(239, 22, 101, 0.2);
  background: rgba(255, 242, 247, 0.9);
  outline: none;
}

.team-roster-list-item.is-active {
  border-color: rgba(239, 22, 101, 0.22);
  color: var(--accent-deep);
  background: linear-gradient(135deg, rgba(255, 235, 244, 0.98), rgba(255, 247, 226, 0.94));
}

.team-roster-list-item.is-active small {
  color: #fff;
  background: var(--accent-deep);
}

.team-roster-detail {
  min-width: 0;
  padding-left: 20px;
}

/* The active roster is a single, scrollable list rather than a card grid. */
.team-roster-detail .team-clinical-panel {
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.team-roster-detail .team-row-header {
  padding-bottom: 18px;
}

.team-roster-detail .team-clinical-panel .team-detail-roster-grid {
  display: block;
  max-height: 560px;
  overflow-y: auto;
  border-top: 1px solid rgba(17, 17, 17, 0.09);
  scrollbar-gutter: stable;
}

.team-roster-detail .team-clinical-panel .team-person-card,
.team-roster-detail .team-clinical-panel .team-person-card-lead {
  width: 100%;
  min-width: 0;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.09);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.team-roster-detail .team-person-card:last-child {
  border-bottom: 0;
}

.team-roster-detail .team-person-card:hover,
.team-roster-detail .team-person-card:focus-visible {
  transform: none;
  border-color: rgba(17, 17, 17, 0.09);
  background: rgba(255, 247, 250, 0.72);
  box-shadow: none;
}

.team-roster-detail .team-person-card-header {
  margin-bottom: 8px;
}

.team-roster-detail .team-person-card-controls {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 17, 17, 0.07);
}

.team-roster-detail .team-person-card-control-group {
  display: grid;
  gap: 5px;
}

.team-roster-detail .team-person-card-control-group > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.team-roster-detail .team-person-card-control-group select {
  min-width: 160px;
  padding: 6px 30px 6px 8px;
  border-radius: 9px;
  font-size: 0.78rem;
}

.team-roster-detail .team-editor-button-group {
  display: inline-flex;
  gap: 5px;
}

.team-roster-detail .team-editor-toggle-button,
.team-roster-detail .team-remove-button {
  width: auto;
  min-width: 0;
  padding: 6px 9px;
  font-size: 0.76rem;
}

.team-roster-detail .team-remove-button {
  margin-left: auto;
}

.team-organization-controls {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.team-organization-controls label {
  display: grid;
  gap: 4px;
}

.team-organization-controls label > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.team-organization-controls select {
  min-width: 120px;
  padding: 7px 30px 7px 9px;
  border-radius: 10px;
  font-size: 0.8rem;
}

@media (max-width: 760px) {
  .team-roster-detail .team-clinical-panel .team-detail-roster-grid {
    max-height: 460px;
  }
}

@media (max-width: 760px) {
  .team-roster-workspace {
    grid-template-columns: 1fr;
  }

  .team-roster-list {
    position: static;
    padding: 0 0 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(17, 17, 17, 0.12);
  }

  .team-roster-detail {
    padding: 18px 0 0;
  }
}

.team-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.team-clinical-section {
  display: grid;
  gap: 16px;
  padding-top: 6px;
  border-top: 1px solid rgba(239, 22, 101, 0.1);
}

.team-clinical-section-header h3 {
  margin-bottom: 6px;
}

.team-clinical-section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  flex-wrap: wrap;
}

.team-clinic-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.team-clinic-filter {
  width: auto;
  min-width: 0;
  border: 1px solid rgba(239, 22, 101, 0.18);
  background: rgba(255, 247, 250, 0.96);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.team-clinic-filter small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 800;
}

.team-clinic-filter:hover,
.team-clinic-filter:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(214, 126, 21, 0.32);
  box-shadow: 0 14px 26px rgba(90, 38, 56, 0.08);
  outline: none;
}

.team-clinic-filter.is-active {
  background: linear-gradient(180deg, rgba(255, 251, 252, 0.98), rgba(255, 245, 229, 0.98));
  border-color: rgba(214, 126, 21, 0.28);
  color: var(--accent-deep);
}

.team-clinical-rows {
  display: grid;
  gap: 16px;
}

.team-clinical-panel .team-detail-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 220px));
  gap: 14px;
  justify-content: start;
}

.team-home-card {
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  padding-top: 6px;
  padding-bottom: 14px;
}

.team-home-card:hover,
.team-home-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(214, 126, 21, 0.32);
  box-shadow: 0 22px 38px rgba(90, 38, 56, 0.12);
  outline: none;
}

.team-home-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  min-height: 0;
}

.team-home-card-head h3 {
  margin: 0;
  min-width: 0;
}

.team-home-card-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.team-home-card-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 247, 250, 0.96);
  border: 1px solid rgba(239, 22, 101, 0.12);
  color: var(--accent-deep);
  font-size: 0.84rem;
  font-weight: 700;
}

.team-row-panel {
  overflow: hidden;
}

.team-row-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.team-row-actions {
  display: flex;
  align-items: start;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: end;
  margin-left: auto;
}

.team-row-meta h3 {
  margin-bottom: 6px;
}

.team-row-statline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.team-row-statline span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 247, 250, 0.96);
  border: 1px solid rgba(239, 22, 101, 0.12);
  color: var(--accent-deep);
  font-size: 0.84rem;
  font-weight: 700;
}

.team-row-edit-button {
  align-self: start;
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
  padding-inline: 14px;
}

.team-row-lineup {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  min-width: 0;
}

.team-row-lead-slot {
  min-width: 0;
}

.team-row-members-summary {
  display: flex;
  align-items: center;
  min-height: 140px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px dashed rgba(239, 22, 101, 0.2);
  background: rgba(255, 248, 251, 0.82);
}

.team-row-members-empty,
.team-row-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  border-radius: 20px;
  border: 1px dashed rgba(239, 22, 101, 0.2);
  background: rgba(255, 248, 251, 0.9);
  color: var(--muted);
  padding: 18px;
  text-align: center;
}

.team-row-empty {
  flex-direction: column;
  gap: 6px;
}

.team-person-card {
  width: 220px;
  min-width: 220px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 251, 252, 0.98), rgba(255, 245, 229, 0.98));
  border: 1px solid rgba(239, 22, 101, 0.12);
  box-shadow: 0 18px 34px rgba(90, 38, 56, 0.08);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.team-person-card:hover,
.team-person-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(214, 126, 21, 0.32);
  box-shadow: 0 22px 38px rgba(90, 38, 56, 0.12);
  outline: none;
}

.team-person-card-lead {
  background: linear-gradient(180deg, rgba(255, 245, 228, 0.98), rgba(255, 233, 187, 0.96));
  border-color: rgba(255, 180, 54, 0.28);
  box-shadow: 0 20px 36px rgba(168, 116, 17, 0.12);
}

.team-person-card-placeholder {
  display: grid;
  align-content: start;
  gap: 8px;
}

.team-person-card-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.team-person-role-pill,
.team-person-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.team-person-role-pill {
  background: rgba(255, 255, 255, 0.75);
  color: var(--accent-deep);
}

.team-person-status {
  background: rgba(17, 17, 17, 0.06);
  color: var(--muted);
}

.team-person-status.active {
  background: rgba(96, 181, 110, 0.16);
  color: #21683a;
}

.team-person-status.inactive {
  background: rgba(187, 70, 70, 0.14);
  color: #9f2f2f;
}

.team-person-card-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.team-person-card-body strong,
.team-person-card-body small {
  display: block;
}

.team-person-card-body small {
  margin-top: 4px;
  color: var(--muted);
}

.team-person-status-control {
  display: block;
  margin-top: 14px;
}

.team-person-status-control span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.team-person-status-control select {
  width: 100%;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  padding: 8px 10px;
}

.team-unassigned-modal-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.team-unassigned-modal-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 252, 253, 0.92);
}

.team-unassigned-modal-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.team-unassigned-modal-main strong,
.team-unassigned-modal-main small {
  display: block;
}

.team-unassigned-modal-main small {
  margin-top: 4px;
  color: var(--muted);
}

.team-unassigned-modal-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.employee-card-hero {
  background: linear-gradient(135deg, rgba(255, 244, 247, 0.96), rgba(255, 249, 242, 0.96));
  border-color: rgba(239, 22, 101, 0.16);
}

.employee-card-hero-main {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  min-height: 148px;
}

.employee-card-hero-copy h3 {
  margin: 10px 0 6px;
}

.employee-card-hero-copy {
  display: grid;
  gap: 10px;
  align-content: start;
}

.employee-card-avatar {
  width: 148px;
  height: 148px;
  min-width: 148px;
  border-radius: 24px;
  align-self: stretch;
  box-shadow: 0 16px 36px rgba(116, 16, 59, 0.14);
  font-size: 2.2rem;
}

.employee-card-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.employee-card-meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(154, 90, 17, 0.12);
  color: #8c520e;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.employee-card-grid {
  align-items: start;
}

.employee-card-inline-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, max-content));
  justify-content: start;
  gap: 10px 32px;
  margin-top: 2px;
}

.employee-card-inline-details div {
  min-width: 0;
}

.employee-card-inline-details strong {
  word-break: break-word;
}

.employee-card-top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.employee-card-secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.employee-card-details-widget {
  min-width: 0;
}

.employee-card-profile-hero {
  margin-bottom: 0;
  padding: 20px 0 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.employee-card-profile-main {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.employee-card-profile-avatar {
  width: 118px;
  height: 118px;
  min-width: 118px;
  border-radius: 24px;
  box-shadow: 0 16px 36px rgba(116, 16, 59, 0.14);
  font-size: 1.85rem;
}

.employee-card-profile-copy {
  min-width: 0;
}

.employee-card-profile-copy h3 {
  margin: 12px 0 4px;
  font-size: clamp(1.55rem, calc(3 * var(--vw)), 2.15rem);
}

.employee-card-profile-copy > p {
  margin: 0;
}

.employee-card-team-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.employee-card-team-tag {
  width: fit-content;
  max-width: 100%;
}

.employee-card-sections {
  min-height: 500px;
}

.employee-card-section-content {
  min-height: 0;
}

.employee-card-contact-panel,
.employee-card-security-panel,
.employee-card-section-content .patient-schedule-panel,
.employee-card-section-content .patient-history-panel {
  min-height: 430px;
}

.employee-card-contact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}

.employee-card-security-panel {
  align-content: start;
}

.employee-card-security-head {
  align-items: center;
}

.employee-card-security-head h3,
.employee-card-security-action h4,
.employee-card-security-confirmation h4 {
  margin: 4px 0 0;
}

.employee-card-security-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.employee-card-security-summary > div {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 18px;
  background: rgba(255, 250, 252, 0.78);
}

.employee-card-security-summary span,
.employee-card-security-summary strong {
  display: block;
}

.employee-card-security-summary span {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.employee-card-security-summary strong {
  overflow-wrap: anywhere;
}

.employee-card-security-action {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(191, 42, 65, 0.18);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 246, 249, 0.96), rgba(255, 250, 242, 0.94));
}

.employee-card-security-action p,
.employee-card-security-action small,
.employee-card-security-confirmation p {
  margin: 7px 0 0;
  color: var(--muted);
}

.employee-card-signout-all-button {
  width: fit-content;
  min-width: 230px;
}

.employee-card-security-confirmation {
  display: grid;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid rgba(191, 42, 65, 0.14);
}

.employee-card-security-confirmation label,
.employee-card-security-confirmation label > span {
  display: grid;
  gap: 7px;
}

.employee-card-security-confirmation label > span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.employee-card-security-confirmation input,
.employee-card-security-confirmation textarea {
  width: 100%;
  border: 1px solid rgba(239, 22, 101, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  padding: 13px 15px;
  color: var(--ink);
  font: inherit;
}

.employee-card-security-confirmation textarea {
  resize: vertical;
}

.employee-card-security-confirmation-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.employee-card-schedule-list {
  display: grid;
  align-content: start;
}

.employee-card-schedule-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-width: 0;
  padding: 17px 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.1);
  color: inherit;
  text-decoration: none;
  transition: color 150ms ease, padding-left 150ms ease, background-color 150ms ease;
}

.employee-card-schedule-item:first-child {
  border-top: 1px solid rgba(17, 17, 17, 0.1);
}

.employee-card-schedule-item:hover,
.employee-card-schedule-item:focus-visible {
  padding-left: 10px;
  background: linear-gradient(90deg, rgba(239, 22, 101, 0.055), transparent 70%);
  color: var(--accent-deep);
  outline: none;
}

.employee-card-schedule-copy,
.employee-card-schedule-meta {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.employee-card-schedule-copy strong,
.employee-card-schedule-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-card-schedule-copy small,
.employee-card-schedule-meta small,
.employee-card-history-item small {
  color: var(--muted);
}

.employee-card-schedule-meta {
  justify-items: end;
  text-align: right;
}

.employee-card-relation-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.1);
  color: var(--accent-deep);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.employee-card-empty-state {
  padding: 28px 20px;
  border: 1px dashed rgba(239, 22, 101, 0.2);
  border-radius: 18px;
  background: rgba(255, 249, 251, 0.72);
  color: var(--muted);
  text-align: center;
}

.employee-card-empty-state.is-error {
  border-color: rgba(178, 30, 48, 0.24);
  color: #9c2435;
}

.employee-card-history-item .patient-history-head > div {
  min-width: 0;
}

.employee-card-history-item .patient-history-head > small {
  flex: 0 0 auto;
}

.employee-card-top-grid .employee-card-details-widget {
  height: 100%;
}

.employee-card-sales-insights-grid {
  display: contents;
}

.employee-card-sales-widget {
  min-width: 0;
  border-color: rgba(239, 22, 101, 0.14);
}

.employee-card-insight-head {
  gap: 12px;
}

.employee-card-insight-head h3 {
  margin: 4px 0 0;
}

.employee-card-insight-period {
  margin: 0;
  text-align: center;
}

.employee-card-sales-widget .goal-widget-speedometer-center strong {
  font-size: clamp(2.9rem, calc(6 * var(--vw)), 4.6rem);
}

.employee-card-sales-widget .goal-widget-progress-copy strong {
  font-size: clamp(1.7rem, calc(4 * var(--vw)), 2.5rem);
}

.employee-card-sales-widget .goal-widget-progress-copy span {
  font-size: 0.98rem;
}

.employee-card-sales-widget .goal-widget-progress-copy small {
  font-size: 0.95rem;
}

.employee-card-debug-panel {
  margin-top: 16px;
  grid-column: 1 / -1;
  border-color: rgba(17, 17, 17, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 246, 247, 0.96));
}

.employee-card-debug-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--muted);
}

.employee-goals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.employee-goal-stat {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(214, 126, 21, 0.14);
}

.employee-goal-stat span,
.employee-goal-stat strong {
  display: block;
}

.employee-goal-stat span {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.employee-goal-stat strong {
  font-size: 1.45rem;
}

@media (max-width: 980px) {
  .employee-card-top-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .employee-card-secondary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .employee-card-sales-insights-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .employee-card-hero-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .employee-card-avatar {
    width: 100%;
    max-width: 220px;
    height: 220px;
  }

  .employee-card-inline-details {
    grid-template-columns: minmax(0, 1fr);
  }

  .employee-card-profile-main {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
  }

  .employee-card-profile-avatar {
    width: 82px;
    height: 82px;
    min-width: 82px;
    border-radius: 20px;
  }

  .employee-card-contact-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .employee-card-security-summary,
  .employee-card-security-confirmation-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .employee-card-schedule-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .employee-card-schedule-meta {
    justify-items: start;
    text-align: left;
  }
}

.team-unassigned-card strong,
.team-unassigned-card small {
  display: block;
}

.team-unassigned-card small {
  margin-top: 4px;
  color: var(--muted);
}

.team-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  overscroll-behavior: contain;
}

.team-editor-overlay.hidden {
  display: none;
}

.team-editor-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 16, 19, 0.42);
  backdrop-filter: blur(4px);
}

.team-editor-modal {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(calc(80 * var(--vh)), 860px);
  overflow: auto;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 252, 253, 0.99), rgba(255, 247, 235, 0.98));
  box-shadow: 0 28px 64px rgba(55, 23, 35, 0.28);
}

.team-detail-modal {
  width: min(1240px, 100%);
}

.team-detail-body {
  margin-top: 16px;
}

.team-detail-panel {
  overflow: visible;
}

.team-detail-roster-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.team-detail-roster-grid .team-person-card {
  width: 100%;
  min-width: 0;
}

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

.team-editor-close {
  width: auto;
  min-width: 92px;
  flex: 0 0 auto;
  align-self: start;
  margin-left: auto;
  padding: 8px 12px;
  border-radius: 14px;
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff8f4;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

/* Keep every modal dismiss control compact and visually consistent. */
.widget-modal-close,
.calendar-composer-close,
.team-editor-close,
.patient-card-close,
.account-profile-close,
.photo-crop-close,
.patient-history-close-button,
.composer-invite-picker-close {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  font-size: 0;
  line-height: 1;
}

.widget-modal-close::before,
.calendar-composer-close::before,
.team-editor-close::before,
.patient-card-close::before,
.account-profile-close::before,
.photo-crop-close::before,
.patient-history-close-button::before,
.composer-invite-picker-close::before {
  content: "×";
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1;
}

.widget-modal-close,
.calendar-composer-close,
.team-editor-close {
  background: rgba(255, 247, 250, 0.94);
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.18);
  box-shadow: none;
}

.patient-card-close {
  background: rgba(255, 247, 250, 0.94);
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.18);
  box-shadow: none;
}

.widget-modal-close:hover,
.widget-modal-close:focus-visible,
.calendar-composer-close:hover,
.calendar-composer-close:focus-visible,
.team-editor-close:hover,
.team-editor-close:focus-visible,
.patient-card-close:hover,
.patient-card-close:focus-visible,
.account-profile-close:hover,
.account-profile-close:focus-visible,
.photo-crop-close:hover,
.photo-crop-close:focus-visible,
.patient-history-close-button:hover,
.patient-history-close-button:focus-visible,
.composer-invite-picker-close:hover,
.composer-invite-picker-close:focus-visible {
  background: rgba(255, 232, 242, 0.98);
  border-color: rgba(239, 22, 101, 0.3);
  color: var(--accent-deep);
  box-shadow: 0 8px 18px rgba(116, 16, 59, 0.1);
  outline: none;
}

.team-editor-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.team-editor-list-secondary {
  margin-top: 12px;
}

.team-editor-toolbar {
  display: flex;
  justify-content: end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.team-move-group-modal {
  width: min(620px, 100%);
}

.team-move-group-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.team-move-group-option {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(224, 73, 130, 0.22);
  border-radius: 18px;
  background: rgba(255, 252, 253, 0.94);
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.team-move-group-option:hover,
.team-move-group-option:focus-visible {
  border-color: rgba(224, 73, 130, 0.48);
  background: linear-gradient(135deg, rgba(255, 239, 246, 0.98), rgba(255, 247, 220, 0.98));
}

.team-move-group-option.is-current {
  cursor: default;
  opacity: 1;
  border-color: rgba(224, 73, 130, 0.28);
  background: rgba(255, 234, 243, 0.7);
}

.team-move-group-option strong,
.team-move-group-option small {
  display: block;
}

.team-move-group-option small {
  margin-top: 4px;
  color: var(--muted);
}

.team-move-group-action {
  flex: 0 0 auto;
  color: var(--accent-deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.team-editor-section + .team-editor-section {
  margin-top: 22px;
}

.team-editor-section-head h4 {
  margin: 8px 0 0;
}

.team-create-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.team-create-form label {
  display: block;
}

.team-create-form label > span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.team-create-actions {
  display: flex;
  justify-content: end;
}

.team-create-actions button {
  width: auto;
  min-width: 0;
}

.team-settings-modal {
  width: min(620px, 100%);
  background: #fff;
}

.team-settings-form {
  gap: 18px;
}

.team-settings-impact {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid rgba(239, 22, 101, 0.13);
  border-radius: 18px;
  background: rgba(255, 244, 248, 0.72);
  color: var(--ink);
}

.team-settings-impact strong,
.team-settings-impact span {
  display: block;
}

.team-settings-impact span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.team-settings-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.team-settings-actions button {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.team-settings-delete-button {
  color: #a31545;
  border-color: rgba(163, 21, 69, 0.2);
  background: rgba(255, 247, 250, 0.98);
}

.team-settings-delete-button:hover,
.team-settings-delete-button:focus-visible {
  color: #861139;
  border-color: rgba(163, 21, 69, 0.32);
  background: rgba(255, 237, 244, 0.98);
}

.team-unassigned-assignment-modal {
  width: min(1040px, calc(calc(100 * var(--vw)) - 32px));
  max-height: min(calc(88 * var(--vh)), 860px);
  padding-bottom: 0;
  overflow: hidden;
  background: #ffffff;
}

.team-unassigned-assignment-modal .team-editor-head {
  margin-bottom: 18px;
}

.team-unassigned-assignment-status {
  margin-bottom: 14px;
}

.team-unassigned-assignment-browser {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 430px;
  max-height: min(570px, calc(62 * var(--vh)));
  margin: 0 -24px;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.team-unassigned-assignment-groups {
  min-width: 0;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(255, 249, 251, 0.72);
}

.team-unassigned-assignment-column-title {
  margin: 0;
  padding: 18px 24px 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.team-unassigned-assignment-group {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 76px;
  margin: 0;
  padding: 15px 24px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  text-align: left;
}

.team-unassigned-assignment-group:hover,
.team-unassigned-assignment-group:focus-visible {
  background: rgba(239, 22, 101, 0.035);
  box-shadow: none;
  transform: none;
}

.team-unassigned-assignment-group.is-active {
  background: linear-gradient(90deg, rgba(239, 22, 101, 0.09), rgba(239, 22, 101, 0.025));
  color: var(--accent-deep);
}

.team-unassigned-assignment-group.is-active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
}

.team-unassigned-assignment-group > span {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-unassigned-assignment-group > small {
  display: grid;
  min-width: 32px;
  min-height: 32px;
  place-items: center;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.08);
  color: var(--accent-deep);
  font-weight: 800;
}

.team-unassigned-assignment-teams {
  min-width: 0;
  padding: 28px 30px;
  overflow-y: auto;
}

.team-unassigned-assignment-teams > .eyebrow {
  margin: 0 0 8px;
}

.team-unassigned-assignment-teams > h4 {
  margin: 0 0 22px;
  font-size: 1.45rem;
}

.team-unassigned-assignment-team-list {
  display: grid;
  gap: 10px;
}

.team-unassigned-assignment-team {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 13px 16px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: none;
  text-align: left;
}

.team-unassigned-assignment-team:hover,
.team-unassigned-assignment-team:focus-visible {
  border-color: rgba(239, 22, 101, 0.3);
  background: linear-gradient(90deg, rgba(239, 22, 101, 0.06), rgba(255, 248, 228, 0.28));
  box-shadow: none;
  transform: none;
}

.team-unassigned-assignment-team > span:nth-child(2) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.team-unassigned-assignment-team strong,
.team-unassigned-assignment-team small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-unassigned-assignment-team small {
  color: var(--muted);
}

.team-unassigned-assignment-team > b {
  min-width: 92px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.1);
  color: var(--accent-deep);
  text-align: center;
  font-size: 0.82rem;
}

.team-unassigned-assignment-team:disabled {
  opacity: 0.62;
  cursor: wait;
}

.team-unassigned-assignment-empty {
  display: grid;
  gap: 6px;
  padding: 22px;
  border-radius: 18px;
  background: rgba(255, 249, 251, 0.82);
  color: var(--muted);
}

.team-unassigned-assignment-empty strong {
  color: var(--ink);
}

@media (max-width: 560px) {
  .team-settings-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .team-unassigned-assignment-browser {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .team-unassigned-assignment-groups {
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .team-unassigned-assignment-column-title {
    display: none;
  }

  .team-unassigned-assignment-groups > div {
    display: flex;
    min-width: max-content;
  }

  .team-unassigned-assignment-group {
    width: auto;
    min-width: 150px;
    min-height: 64px;
    padding: 11px 16px;
    border-right: 1px solid var(--line);
  }

  .team-unassigned-assignment-group.is-active::before {
    inset: auto 0 0;
    width: auto;
    height: 4px;
  }

  .team-unassigned-assignment-teams {
    padding: 22px 18px;
  }
}

.team-create-master-detail-modal {
  width: min(1040px, calc(calc(100 * var(--vw)) - 32px));
  max-height: min(calc(88 * var(--vh)), 900px);
  overflow: hidden;
  background: #ffffff;
}

.team-create-master-detail-modal .team-editor-head {
  margin-bottom: 18px;
}

.team-create-master-detail-modal .team-create-form {
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 0;
  min-height: 0;
  margin: 0 -24px -24px;
  overflow: hidden;
}

.team-create-browser {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 430px;
  max-height: min(570px, calc(62 * var(--vh)));
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.team-create-master {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px 0;
  border-right: 1px solid var(--line);
  background: rgba(255, 249, 251, 0.72);
}

.team-create-master button {
  position: relative;
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 82px;
  margin: 0;
  padding: 16px 24px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.team-create-master button > span {
  font-weight: 800;
}

.team-create-master button > small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-create-master button:hover,
.team-create-master button:focus-visible {
  background: rgba(239, 22, 101, 0.035);
  box-shadow: none;
  transform: none;
}

.team-create-master button.is-active {
  background: linear-gradient(90deg, rgba(239, 22, 101, 0.08), rgba(239, 22, 101, 0.025));
  color: var(--accent-deep);
}

.team-create-master button.is-active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
}

.team-create-details {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.team-create-detail {
  height: 100%;
  min-height: 0;
  padding: 28px 30px;
  overflow-y: auto;
}

.team-create-detail > .eyebrow {
  margin: 0 0 8px;
}

.team-create-detail > h4 {
  margin: 0;
  font-size: 1.45rem;
}

.team-create-detail > .muted {
  margin: 8px 0 24px;
}

.team-create-name-field {
  display: block;
  max-width: 680px;
}

.team-create-name-field input {
  width: 100%;
}

.team-create-choice-list {
  display: grid;
  gap: 10px;
}

.team-create-choice {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 13px 16px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  text-align: left;
  box-shadow: none;
  font: inherit;
}

.team-create-choice:hover,
.team-create-choice:focus-visible {
  border-color: rgba(239, 22, 101, 0.3);
  background: rgba(255, 249, 251, 0.98);
  box-shadow: none;
  transform: none;
}

.team-create-choice.is-selected {
  border-color: rgba(239, 22, 101, 0.32);
  background: linear-gradient(90deg, rgba(239, 22, 101, 0.08), rgba(255, 248, 228, 0.34));
}

.team-create-choice-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff3e7d, #ff963e);
  color: #ffffff;
  font-weight: 800;
}

.team-create-choice > span:nth-child(2) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.team-create-choice strong,
.team-create-choice small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-create-choice small {
  color: var(--muted);
}

.team-create-choice > b {
  min-width: 92px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.055);
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
}

.team-create-choice.is-selected > b {
  background: rgba(239, 22, 101, 0.1);
  color: var(--accent-deep);
}

.team-create-empty {
  display: grid;
  gap: 5px;
  padding: 24px;
  border-radius: 18px;
  background: rgba(255, 249, 251, 0.82);
  color: var(--muted);
}

.team-create-empty strong {
  color: var(--ink);
}

.team-create-status {
  margin: 14px 24px 0;
}

.team-create-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 92px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.98);
}

.team-create-modal-actions > p {
  margin: 0;
  color: var(--muted);
}

.team-create-action-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(440px, 52%);
}

@media (max-width: 720px) {
  .team-create-browser {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .team-create-master {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .team-create-master button {
    min-height: 64px;
    padding: 10px;
    text-align: center;
  }

  .team-create-master button > small {
    display: none;
  }

  .team-create-detail {
    padding: 22px 18px;
  }

  .team-create-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .team-create-action-buttons {
    width: 100%;
  }
}

.team-group-create-modal {
  background: #ffffff;
}

.team-group-create-actions .sidebar-task-header-button-primary {
  min-width: 220px;
  padding: 10px 18px;
  border-radius: 999px;
  background: #ef1665;
  color: #ffffff;
  border-color: rgba(239, 22, 101, 0.12);
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
}

.team-group-create-actions .sidebar-task-header-button-primary:hover,
.team-group-create-actions .sidebar-task-header-button-primary:focus-visible {
  background: #ef1665;
  box-shadow: 0 12px 28px rgba(116, 16, 59, 0.16);
}

.team-editor-item,
.team-editor-empty {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: stretch;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 252, 253, 0.92);
}

.team-editor-empty {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.team-editor-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 18px;
  align-items: center;
  padding-top: 12px;
}

.team-editor-item-topbar {
  position: absolute;
  top: 16px;
  right: 18px;
  display: flex;
  justify-content: end;
}

.team-editor-item-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.team-editor-item-main strong,
.team-editor-item-main small {
  display: block;
}

.team-editor-item-main small {
  margin-top: 4px;
  color: var(--muted);
}

.team-editor-item-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding-top: 6px;
}

.team-editor-status-control {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.team-editor-status-control span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.team-editor-button-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.team-editor-toggle-button {
  width: auto;
  min-width: 0;
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 247, 250, 0.92);
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.18);
}

.team-editor-toggle-button.is-selected {
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.96), rgba(203, 13, 95, 0.96));
  color: #fff8f4;
  border-color: transparent;
}

.team-remove-button {
  width: auto;
  min-width: 0;
  padding: 0;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  color: #9f2f2f;
  border-color: rgba(187, 70, 70, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.team-editor-add-button {
  width: auto;
  min-width: 0;
  justify-self: start;
}

.team-editor-item-unassigned {
  grid-template-columns: minmax(0, 1fr) auto;
  padding-top: 16px;
}

.team-editor-item-actions-single {
  grid-template-columns: auto;
  justify-content: end;
  align-items: center;
}

.team-delete-button {
  width: auto;
  min-width: 0;
  color: #9f2f2f;
  border-color: rgba(187, 70, 70, 0.22);
}

@media (max-width: 980px) {
  .team-manager-grid {
    grid-template-columns: 1fr;
  }

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

  .team-field-surface {
    min-height: 640px;
    padding-inline: 14px;
  }

  .team-field-lane {
    flex-wrap: wrap;
  }

  .team-field-player {
    width: min(150px, 100%);
  }

  .team-bench-shell {
    min-height: auto;
    height: auto;
    position: static;
    margin-top: 12px;
  }

  .team-bench-lane {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-y: visible;
  }

  .team-bench-hovercard {
    left: 50%;
    top: calc(100% + 10px);
    transform: translateX(-50%);
  }

  .team-bench-player:hover .team-bench-hovercard,
  .team-bench-player:focus-within .team-bench-hovercard {
    transform: translateX(-50%) translateY(4px);
  }

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

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

  .team-row-header {
    align-items: start;
  }

  .team-home-grid {
    grid-template-columns: 1fr;
  }

  .team-roster-board-actions,
  .team-row-actions {
    width: 100%;
    justify-content: space-between;
  }

  .team-editor-item,
  .team-editor-item-actions {
    align-items: start;
  }

  .team-editor-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .team-editor-item-topbar {
    position: static;
    justify-content: end;
  }

  .team-editor-item-actions {
    width: 100%;
    grid-template-columns: 1fr;
    padding-top: 0;
  }

  .team-unassigned-modal-item,
  .team-unassigned-modal-actions {
    grid-template-columns: 1fr;
  }

  .team-person-card {
    width: 200px;
    min-width: 200px;
  }
}

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

.button-secondary {
  background: rgba(255, 247, 250, 0.92);
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.18);
}

.settings-admin-switch {
  display: grid;
  gap: 14px;
}

.admin-tag-catalog {
  display: grid;
  gap: 18px;
  margin-top: 0;
  overflow: visible;
  background: transparent;
}

.admin-tag-catalog.hidden {
  display: none;
}

.admin-tag-catalog-head h3,
.admin-tag-catalog-head p,
.admin-tag-form-head h4,
.admin-tag-form-head p,
.admin-tag-definition-head h4,
.admin-tag-definition-head p {
  margin: 0;
}

.admin-tag-catalog-head > button,
.admin-tag-definition-head > button,
.admin-tag-form-actions > button {
  width: auto;
  margin: 0;
}

.admin-tag-catalog-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-tag-catalog-head-actions > button {
  width: auto;
  margin: 0;
}

.admin-tag-catalog-layout {
  display: grid;
  grid-template-columns: minmax(210px, 0.28fr) minmax(280px, 0.72fr) minmax(300px, 0.9fr);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(239, 22, 101, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
}

.admin-tag-category-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  padding: 18px;
  border-right: 1px solid rgba(239, 22, 101, 0.12);
  background: rgba(255, 247, 250, 0.7);
}

.admin-tag-pane-label,
.admin-tag-definition-head,
.admin-tag-form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.admin-tag-pane-label {
  align-items: center;
  padding: 0 4px 14px;
}

.admin-tag-category-list,
.admin-tag-definition-list {
  display: grid;
  align-content: start;
  gap: 9px;
}

.admin-tag-category-item,
.admin-tag-definition-item {
  width: 100%;
  margin: 0;
  border: 1px solid rgba(239, 22, 101, 0.12);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  box-shadow: none;
  text-align: left;
}

.admin-tag-category-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
}

.admin-tag-category-item > span:first-child,
.admin-tag-definition-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.admin-tag-category-item strong,
.admin-tag-definition-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
  white-space: nowrap;
}

.admin-tag-category-item small,
.admin-tag-definition-item small,
.admin-tag-list-empty span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.admin-tag-category-item:hover,
.admin-tag-category-item:focus-visible,
.admin-tag-category-item.is-selected,
.admin-tag-definition-item:hover,
.admin-tag-definition-item:focus-visible,
.admin-tag-definition-item.is-selected {
  border-color: rgba(239, 22, 101, 0.42);
  background: #fff;
  box-shadow: 0 10px 24px rgba(83, 21, 49, 0.09);
  transform: none;
}

.admin-tag-category-item.is-selected {
  box-shadow: inset 4px 0 0 var(--accent), 0 10px 24px rgba(83, 21, 49, 0.09);
}

.admin-tag-category-item.is-inactive,
.admin-tag-definition-item.is-inactive {
  opacity: 0.68;
}

/* Keep the category navigator open and line-separated instead of card-based. */
.admin-tag-catalog-layout {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.admin-tag-category-pane {
  padding: 0;
  background: transparent;
}

.admin-tag-category-pane .admin-tag-pane-label {
  padding-right: 18px;
}

.admin-tag-category-list {
  gap: 0;
}

.admin-tag-category-item {
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid rgba(239, 22, 101, 0.14);
  border-radius: 0;
  background: transparent;
}

.admin-tag-category-item:hover,
.admin-tag-category-item:focus-visible,
.admin-tag-category-item.is-selected {
  border-color: rgba(239, 22, 101, 0.14);
  background: rgba(239, 22, 101, 0.045);
  box-shadow: none;
}

.admin-tag-category-item.is-selected {
  box-shadow: inset 4px 0 0 var(--accent);
}

.admin-tag-category-meta {
  display: flex;
  align-items: center;
  gap: 7px;
}

.admin-tag-category-meta b {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.09);
  color: var(--accent-deep);
  font-size: 0.75rem;
}

.admin-tag-inactive-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(91, 77, 84, 0.11);
  color: #65545d;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-tag-editor-pane {
  display: contents;
}

.admin-tag-editor-pane > .admin-tag-form,
.admin-tag-editor-pane > .admin-tag-empty {
  grid-column: 2 / -1;
  margin: 22px;
}

.admin-tag-catalog-layout > .admin-tag-definitions {
  min-width: 0;
  padding: 22px;
  align-content: start;
  border-right: 1px solid rgba(239, 22, 101, 0.12);
}

.admin-tag-catalog-layout.is-category-editing {
  grid-template-columns: minmax(210px, 0.28fr) minmax(0, 1fr);
}

.admin-tag-catalog-layout.is-category-editing > .admin-tag-definitions,
.admin-tag-catalog-layout.is-category-editing > .admin-tag-definition-editor-pane {
  display: none;
}

.admin-tag-definition-editor-pane {
  min-width: 0;
  padding: 22px;
}

.admin-tag-definition-editor-pane {
  display: grid;
  align-content: start;
}

.admin-tag-form,
.admin-tag-definitions {
  display: grid;
  gap: 16px;
}

.admin-tag-form.hidden,
.admin-tag-definitions.hidden,
.admin-tag-empty.hidden {
  display: none;
}

.admin-tag-form {
  padding: 18px;
  border: 1px solid rgba(239, 22, 101, 0.13);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.88);
}

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

.admin-tag-form-grid > label {
  display: grid;
  align-content: start;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.admin-tag-form-grid input,
.admin-tag-form-grid select,
.admin-tag-form-grid textarea {
  width: 100%;
}

.admin-tag-form-grid textarea {
  resize: vertical;
}

.admin-tag-form-wide {
  grid-column: 1 / -1;
}

.admin-tag-toggle-field {
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center;
  align-content: center !important;
  justify-self: start;
}

.admin-tag-toggle-field input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.admin-tag-key {
  max-width: 230px;
  overflow: hidden;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.08);
  color: var(--accent-deep);
  font-size: 0.7rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-tag-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.admin-tag-form-actions > button {
  width: auto;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  padding: 8px 18px;
  flex: 0 0 auto;
  border-radius: 999px;
}

.admin-tag-form-actions .admin-tag-delete-button {
  margin-right: auto;
  color: #a31545;
  border-color: rgba(163, 21, 69, 0.24);
  background: rgba(255, 245, 248, 0.96);
}

.admin-tag-form-actions .admin-tag-delete-button:hover,
.admin-tag-form-actions .admin-tag-delete-button:focus-visible {
  color: #861037;
  border-color: rgba(163, 21, 69, 0.42);
  background: #fff0f5;
}

.admin-tag-definition-head {
  align-items: center;
  padding-top: 3px;
}

.admin-tag-definition-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 12px 14px;
  border-radius: 15px;
}

.admin-tag-swatch {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  background: var(--admin-tag-color, var(--accent));
  box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.08);
}

.admin-tag-edit-label {
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 800;
}

.admin-tag-definition-form {
  margin-top: 2px;
  background: linear-gradient(145deg, rgba(255, 248, 251, 0.96), rgba(255, 253, 246, 0.96));
}

.admin-tag-color-field {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
}

.admin-tag-color-field input[type="color"] {
  min-height: 48px;
  padding: 4px;
  cursor: pointer;
}

.admin-tag-empty,
.admin-tag-list-empty {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  min-height: 150px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.admin-tag-empty {
  min-height: 420px;
}

.admin-tag-empty strong,
.admin-tag-list-empty strong {
  color: var(--ink);
}

@media (max-width: 900px) {
  .admin-tag-catalog-layout {
    grid-template-columns: 1fr;
  }

  .admin-tag-catalog-layout.is-category-editing {
    grid-template-columns: 1fr;
  }

  .admin-tag-editor-pane > .admin-tag-form,
  .admin-tag-editor-pane > .admin-tag-empty {
    grid-column: 1;
  }

  .admin-tag-category-pane {
    border-right: 0;
    border-bottom: 1px solid rgba(239, 22, 101, 0.12);
  }

  .admin-tag-catalog-layout > .admin-tag-definitions {
    border-right: 0;
    border-bottom: 1px solid rgba(239, 22, 101, 0.12);
  }

  .admin-tag-category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .admin-tag-form-grid,
  .admin-tag-category-list {
    grid-template-columns: 1fr;
  }

  .admin-tag-form-wide {
    grid-column: auto;
  }

  .admin-tag-definition-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .admin-tag-definition-item .admin-tag-inactive-badge {
    display: none;
  }
}

.call-tree-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 8px 4px 0; }
.call-tree-heading h2 { margin: 2px 0 6px; }
.call-tree-heading .muted { margin: 0; }
.call-tree-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.call-tree-edit-button { width: auto; min-width: 152px; margin: 0; padding-inline: 22px; }
.call-tree-add-phone-button { width: auto; margin: 0; padding-inline: 18px; }
.call-tree-library { display: grid; grid-template-columns: minmax(230px, 285px) minmax(0, 1fr); min-height: 720px; overflow: hidden; border: 1px solid rgba(239,22,101,.13); border-radius: 28px; background: rgba(255,255,255,.9); box-shadow: 0 20px 48px rgba(83,21,49,.08); }
.call-tree-library-sidebar { min-width: 0; padding: 22px 0; border-right: 1px solid rgba(239,22,101,.15); background: linear-gradient(180deg, rgba(255,249,251,.98), rgba(255,255,255,.98)); }
.call-tree-library-sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px 17px; }
.call-tree-library-sidebar-head h3, .call-tree-library-sidebar-head p { margin: 0; }
.call-tree-library-sidebar-head h3 { margin-top: 4px; font-size: 1.18rem; }
.call-tree-library-sidebar-head > span { display: inline-grid; min-width: 34px; min-height: 34px; place-items: center; padding: 5px 9px; border-radius: 999px; background: rgba(239,22,101,.08); color: var(--accent-deep); font-size: .78rem; font-weight: 800; }
.call-tree-library-list { display: grid; }
.call-tree-library-item { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) 9px; align-items: center; gap: 12px; width: 100%; min-height: 82px; margin: 0; padding: 14px 18px 14px 20px; border: 0; border-top: 1px solid rgba(239,22,101,.11); border-radius: 0; background: transparent; color: var(--ink); box-shadow: none; text-align: left; }
.call-tree-library-item:last-child { border-bottom: 1px solid rgba(239,22,101,.11); }
.call-tree-library-item::before { position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--accent); content: ""; opacity: 0; }
.call-tree-library-item:hover, .call-tree-library-item:focus-visible { background: rgba(255,242,247,.72); box-shadow: none; transform: none; }
.call-tree-library-item.is-active { background: linear-gradient(90deg, rgba(255,235,243,.9), rgba(255,248,251,.72)); color: var(--accent-deep); }
.call-tree-library-item.is-active::before { opacity: 1; }
.call-tree-library-item > span:nth-child(2) { display: grid; gap: 4px; min-width: 0; }
.call-tree-library-item strong, .call-tree-library-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-tree-library-item strong { color: inherit; font-size: .86rem; }
.call-tree-library-item small { color: var(--muted); font-size: .68rem; font-weight: 700; }
.call-tree-library-item > i { width: 8px; height: 8px; border-radius: 50%; background: #34a668; box-shadow: 0 0 0 4px rgba(52,166,104,.1); }
.call-tree-library-item > i.is-disabled { background: #887780; box-shadow: 0 0 0 4px rgba(91,77,84,.1); }
.call-tree-library-item-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 13px; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; font-size: 1rem; font-weight: 900; }
.call-tree-library-item-icon.is-automatic { background: linear-gradient(135deg, #ffbf24, #ff7a45); }
.call-tree-library-detail { display: grid; align-content: start; gap: 20px; min-width: 0; padding: 24px; background: radial-gradient(circle at 94% 0%, rgba(255,190,27,.08), transparent 28%), #fff; }
.call-tree-detail-head { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 22px; padding: 22px; border: 1px solid rgba(239,22,101,.13); border-radius: 22px; background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,245,249,.88)); }
.call-tree-detail-head.is-automatic { border-color: rgba(255,190,27,.34); background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,248,225,.78)); }
.call-tree-detail-heading-copy { display: grid; gap: 10px; min-width: 0; }
.call-tree-detail-heading-copy h3, .call-tree-detail-heading-copy p { margin: 0; }
.call-tree-detail-heading-copy p { max-width: 720px; color: var(--muted); line-height: 1.45; }
.call-tree-detail-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.call-tree-detail-actions > button { width: auto; min-width: 112px; margin: 0; padding-inline: 16px; }
.call-tree-detail-actions .call-tree-card-menu { position: relative; top: auto; right: auto; }
.call-tree-detail-actions .call-tree-card-menu-popover { z-index: 8; }
.call-tree-detail-performance { display: grid; gap: 14px; }
.call-tree-detail-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.call-tree-detail-metrics article { display: grid; align-content: start; gap: 7px; min-height: 116px; padding: 16px; border: 1px solid rgba(239,22,101,.11); border-radius: 17px; background: linear-gradient(145deg, #fff, rgba(255,247,250,.78)); }
.call-tree-detail-metrics span { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.call-tree-detail-metrics strong { color: var(--ink); font-size: 1.42rem; line-height: 1.1; }
.call-tree-detail-metrics small { color: var(--muted); font-size: .67rem; font-weight: 700; line-height: 1.35; }
.call-tree-detail-outcome { display: grid; gap: 10px; padding: 15px 17px; border: 1px solid rgba(239,22,101,.1); border-radius: 17px; background: rgba(255,250,252,.78); }
.call-tree-detail-outcome > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.call-tree-detail-outcome > div:first-child strong { color: var(--ink); }
.call-tree-detail-outcome > div:first-child span { color: var(--accent-deep); font-size: .74rem; font-weight: 800; }
.call-tree-detail-visualization { display: grid; gap: 14px; min-width: 0; padding: 20px; border: 1px solid rgba(239,22,101,.12); border-radius: 22px; background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,246,250,.72)); }
.call-tree-detail-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.call-tree-detail-section-head h3, .call-tree-detail-section-head p { margin: 0; }
.call-tree-detail-section-head h3 { margin-top: 4px; }
.call-tree-detail-section-head > span { padding: 7px 11px; border-radius: 999px; background: rgba(239,22,101,.08); color: var(--accent-deep); font-size: .7rem; font-weight: 800; }
.call-tree-inline-canvas { position: relative; min-width: 0; height: clamp(520px, calc(65 * var(--vh)), 720px); overflow: hidden; overscroll-behavior: contain; touch-action: none; cursor: grab; user-select: none; border: 1px solid rgba(239,22,101,.1); border-radius: 18px; background: rgba(255,255,255,.82); }
.call-tree-inline-canvas.is-panning { cursor: grabbing; }
.call-tree-inline-canvas .call-tree-diagram { position: absolute; top: 0; left: 0; min-height: 520px; margin: 0; border: 0; border-radius: 0; box-shadow: none; transform-origin: 0 0; will-change: transform; }
.call-tree-inline-canvas .custom-flow-node, .call-tree-inline-canvas .custom-flow-digit { cursor: default; }
.call-tree-card-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: stretch; }
.call-tree-card { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 1fr auto; gap: 18px 24px; min-height: 330px; padding: 24px; border: 1px solid rgba(239,22,101,.15); border-radius: 24px; background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,245,249,.94)); box-shadow: 0 16px 36px rgba(83,21,49,.08); }
.call-tree-card.is-automatic { border-color: rgba(255,190,27,.42); background: linear-gradient(145deg, rgba(255,253,245,.98), rgba(255,246,220,.82)); }
.call-tree-card.is-automatic.is-disabled { border-color: rgba(91,77,84,.22); background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(244,240,242,.9)); }
.call-tree-card-left { display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; gap: 16px; min-width: 0; padding-right: 24px; border-right: 1px solid rgba(239,22,101,.14); }
.call-tree-card-right { display: grid; align-content: start; min-width: 0; padding-right: 48px; }
.call-tree-card-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; font-size: 1.35rem; font-weight: 800; }
.call-tree-card.is-automatic .call-tree-card-icon { background: linear-gradient(135deg, #ffbf24, #ff7a45); }
.call-tree-card-copy { display: grid; align-content: start; gap: 10px; min-width: 0; }
.call-tree-card-copy h3, .call-tree-card-copy p { margin: 0; }
.call-tree-card-copy p { color: var(--muted); line-height: 1.45; }
.call-tree-card-copy small { color: var(--accent-deep); font-weight: 700; }
.call-tree-card-phone-section { display: grid; gap: 7px; }
.call-tree-card-phone-section > span { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.call-tree-card-phone-section > div { display: flex; flex-wrap: wrap; gap: 7px; }
.call-tree-card-phone { display: grid; gap: 1px; padding: 7px 10px; border: 1px solid rgba(239,22,101,.14); border-radius: 11px; background: rgba(255,255,255,.82); }
.call-tree-card-phone small { color: var(--muted); font-size: .66rem; font-weight: 700; }
.call-tree-card-phone strong { color: var(--ink); font-size: .79rem; line-height: 1.25; }
.call-tree-card-phone-empty { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.call-tree-card-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.call-tree-card-stats > div { display: grid; align-content: start; gap: 3px; min-width: 0; padding: 11px 12px; border-radius: 13px; background: rgba(239,22,101,.065); }
.call-tree-card.is-automatic .call-tree-card-stats > div { background: rgba(255,190,27,.12); }
.call-tree-card-stats span { color: var(--muted); font-size: .7rem; font-weight: 800; line-height: 1.25; }
.call-tree-card-stats strong { color: var(--accent-deep); font-size: 1.05rem; line-height: 1.2; }
.call-tree-card-stats small { color: var(--muted); font-size: .66rem; font-weight: 700; }
.call-tree-card-analytics { display: grid; gap: 12px; min-width: 0; }
.call-tree-card-analytics-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.call-tree-card-analytics-head > span { color: var(--ink); font-size: .92rem; font-weight: 800; }
.call-tree-card-analytics-head > small { color: var(--muted); font-size: .7rem; font-weight: 700; }
.call-tree-card-chart { display: grid; gap: 9px; padding: 12px; border: 1px solid rgba(239,22,101,.11); border-radius: 14px; background: rgba(255,255,255,.64); }
.call-tree-card-chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.call-tree-card-chart-head strong { color: var(--ink); font-size: .76rem; }
.call-tree-card-chart-head span { color: var(--accent-deep); font-size: .7rem; font-weight: 800; }
.call-tree-card-chart-track { display: flex; width: 100%; height: 10px; overflow: hidden; border-radius: 999px; background: rgba(91,77,84,.1); }
.call-tree-card-chart-track > span { display: block; height: 100%; }
.call-tree-card-chart-track .is-connected, .call-tree-card-chart-legend i.is-connected { background: #34a668; }
.call-tree-card-chart-track .is-unanswered, .call-tree-card-chart-legend i.is-unanswered { background: rgba(239,22,101,.32); }
.call-tree-card-chart-legend { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.call-tree-card-chart-legend > span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .68rem; font-weight: 700; }
.call-tree-card-chart-legend i { width: 8px; height: 8px; border-radius: 50%; }
.call-tree-card-chart-legend strong { color: var(--ink); }
.call-tree-card-title-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.call-tree-card-badge { padding: 5px 9px; border-radius: 999px; background: rgba(255,190,27,.18); color: #965e00; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.call-tree-card-badge.is-live { background: rgba(52,166,104,.12); color: #287c50; }
.call-tree-card-badge.is-disabled { background: rgba(91,77,84,.12); color: #65545d; }
.call-tree-card-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding-top: 5px; }
.call-tree-card-actions button { width: auto; min-width: 120px; margin: 0; }
.call-tree-automation-toggle.is-disable { color: #a31545; border-color: rgba(163,21,69,.22); }
.call-tree-card-menu { position: absolute; top: 14px; right: 14px; z-index: 2; }
.call-tree-card-menu-button { display: grid; place-items: center; width: 38px; height: 34px; margin: 0; padding: 0; border: 1px solid rgba(239,22,101,.14); border-radius: 11px; background: rgba(255,255,255,.88); color: var(--accent-deep); font-size: 1.45rem; font-weight: 900; line-height: 1; box-shadow: none; }
.call-tree-card-menu-button:hover, .call-tree-card-menu-button:focus-visible { background: #fff; border-color: rgba(239,22,101,.38); box-shadow: 0 8px 18px rgba(83,21,49,.1); transform: none; }
.call-tree-card-menu-popover { position: absolute; top: 42px; right: 0; display: grid; gap: 4px; width: 190px; padding: 7px; border: 1px solid rgba(163,21,69,.16); border-radius: 13px; background: #fff; box-shadow: 0 16px 34px rgba(49,8,26,.16); }
.call-tree-card-menu-popover.hidden { display: none; }
.call-tree-card-menu-action { width: 100%; margin: 0; padding: 10px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--accent-deep); text-align: left; font-weight: 800; box-shadow: none; }
.call-tree-card-menu-action:hover, .call-tree-card-menu-action:focus-visible { background: rgba(239,22,101,.08); box-shadow: none; transform: none; }
.call-tree-card-delete-button { background: rgba(255,235,242,.85); color: #a31545; }
.call-tree-card-delete-button:hover, .call-tree-card-delete-button:focus-visible { background: #ffdce8; color: #861037; box-shadow: none; transform: none; }
.call-tree-library-error { grid-column: 1 / -1; }
.call-tree-view-modal { display: flex; flex-direction: column; width: min(1180px, calc(calc(100 * var(--vw)) - 40px)); height: calc(calc(100 * var(--dvh)) - 48px); overflow: hidden; }
.call-tree-view-canvas { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; overscroll-behavior: contain; touch-action: none; cursor: grab; user-select: none; padding: 0; }
.call-tree-view-canvas.is-panning { cursor: grabbing; }
.call-tree-view-canvas .call-tree-diagram { position: absolute; top: 0; left: 0; margin: 0; transform-origin: 0 0; will-change: transform; }
.custom-call-tree-diagram { width: max(100%, var(--flow-canvas-width, 100%)); min-width: var(--flow-canvas-width, 100%); min-height: max-content !important; overflow: visible; padding-inline: 70px; }
.custom-flow-node { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 12px; width: 430px; min-width: 430px; max-width: 430px; margin: 0; padding: 15px 17px; border: 2px solid rgba(239,22,101,.55); border-radius: 15px; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 8px 20px rgba(116,16,59,.07); cursor: pointer; }
.custom-flow-node:hover, .custom-flow-node:focus-visible { border-color: var(--accent); background: #fff; box-shadow: 0 12px 26px rgba(116,16,59,.14); transform: none; }
.custom-flow-node.is-menu { border-color: var(--accent); background: rgba(255,247,250,.98); }
.custom-flow-node-copy { display: grid; gap: 4px; min-width: 0; }
.custom-flow-node strong { color: var(--accent-deep); line-height: 1.3; }
.custom-flow-node small { overflow-wrap: anywhere; color: var(--muted); line-height: 1.35; }
.custom-flow-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 800; }
.custom-flow-branches { position: relative; display: flex; justify-content: center; align-items: flex-start; gap: 28px; width: var(--flow-subtree-width); min-width: var(--flow-subtree-width); padding: 52px 16px 8px; }
.custom-flow-branches::before { content: ""; position: absolute; top: 24px; left: var(--flow-first-center-offset, 54px); right: var(--flow-last-center-offset, 54px); border-top: 2px solid rgba(239,22,101,.55); }
.custom-flow-branch { position: relative; display: grid; justify-items: center; align-content: start; width: var(--flow-branch-width); min-width: var(--flow-branch-width); }
.custom-flow-branch::before { content: ""; position: absolute; top: -28px; left: 50%; height: 28px; border-left: 2px solid rgba(239,22,101,.55); transform: translateX(-1px); }
.custom-flow-digit { width: auto; margin: 0; padding: 6px 11px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800; box-shadow: none; cursor: pointer; }
.custom-flow-digit:hover, .custom-flow-digit:focus-visible { background: var(--accent-deep); box-shadow: 0 7px 15px rgba(116,16,59,.16); transform: none; }
.custom-flow-option-name { min-height: 38px; padding: 8px; color: var(--ink); text-align: center; font-size: .83rem; }
.call-tree-menu-editor-head { display: grid; gap: 6px; margin: 0; }
.call-tree-menu-editor-head h3 { margin: 2px 0 5px; }
.call-tree-audio-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.call-tree-audio-actions .button-secondary { width: auto; min-width: 0; margin: 0; padding: 10px 14px; }
.call-tree-audio-preview { width: 100%; max-width: 620px; height: 42px; }
.call-tree-audio-preview.hidden { display: none; }
.call-tree-menu-greeting-field > small.is-error { color: #b42318; }
.call-tree-menu-greeting-field > small.is-success { color: #18794e; }
.call-tree-prompt-audio { display: grid; gap: 9px; }
.call-tree-prompt-audio > span { color: var(--ink); font-weight: 800; }
.call-tree-prompt-audio > small.is-error { color: #b42318; }
.call-tree-prompt-audio > small.is-success { color: #18794e; }
.call-tree-menu-editor-head .muted { margin: 0; }
.call-tree-menu-greeting-field { display: grid; gap: 8px; margin-top: 10px; color: var(--ink); font-weight: 800; }
.call-tree-menu-greeting-field textarea { width: 100%; min-height: 96px; resize: vertical; }
.call-tree-menu-greeting-field small { color: var(--muted); font-size: .76rem; font-weight: 600; line-height: 1.4; }
.call-tree-option-modal { width: min(560px, calc(calc(100 * var(--vw)) - 40px)); }
.call-tree-option-form { display: grid; gap: 18px; padding-top: 20px; }
.call-tree-option-form label { display: grid; gap: 8px; font-weight: 800; }
.call-tree-option-form input { width: 100%; }
.call-tree-phone-picker-button { width: auto; margin: 0; align-self: start; }
.call-tree-phone-picker-modal { width: min(560px, calc(calc(100 * var(--vw)) - 40px)); }
.call-tree-phone-picker-empty { display: grid; justify-items: center; gap: 8px; padding: 34px 20px 12px; text-align: center; }
.call-tree-phone-picker-empty strong { font-size: 1.05rem; }
.call-tree-phone-picker-empty p { margin: 0; }
.call-tree-phone-picker-empty-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, #ef1665, #c70f7e); color: #fff; font-size: 1.35rem; }
.call-tree-option-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.call-tree-option-actions .button-secondary, .call-tree-option-actions .button-primary { width: auto; margin: 0; padding-inline: 18px; }
.call-tree-option-actions-split { justify-content: space-between; align-items: center; }
.call-tree-option-actions-split > div { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.call-tree-delete-option-button { width: auto; margin: 0; padding: 11px 18px; border: 1px solid rgba(163,21,69,.24); border-radius: 999px; background: rgba(255,235,242,.86); color: #a31545; font-weight: 800; box-shadow: none; }
.call-tree-delete-option-button:hover, .call-tree-delete-option-button:focus-visible { border-color: rgba(163,21,69,.42); background: #ffdce8; color: #861037; box-shadow: 0 8px 18px rgba(83,21,49,.08); transform: none; }
.call-tree-delete-option-button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.call-tree-ring-targets-modal { width: min(760px, calc(calc(100 * var(--vw)) - 40px)); }
.call-tree-target-picker { display: grid; gap: 14px; padding-top: 18px; }
.call-tree-target-picker > label { display: grid; gap: 8px; font-weight: 800; }
.call-tree-target-picker input { width: 100%; }
.call-tree-ring-selected { min-height: 48px; padding: 8px; border: 1px solid rgba(239,22,101,.14); border-radius: 14px; background: rgba(255,250,252,.72); }
.call-tree-ring-target-list { max-height: min(calc(42 * var(--vh)), 390px); overflow: auto; }
.call-tree-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.call-tree-diagram { display: grid; width: 100%; justify-items: center; gap: 0; padding: 34px 28px; align-content: start; overflow: hidden; background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,244,249,.93)); }
.flowchart-node { width: min(100%, 390px); padding: 16px 22px; border: 2px solid var(--accent); border-radius: 10px; background: #fff; color: var(--accent-deep); text-align: center; font-weight: 800; box-shadow: 0 8px 18px rgba(116,16,59,.07); }
.flowchart-start { border-radius: 999px; border-color: rgba(255,190,27,.82); background: rgba(255,248,220,.95); }
.flowchart-fallback { margin-top: 4px; border-color: rgba(73,159,115,.55); background: rgba(241,251,245,.98); }
.flowchart-connector { display: grid; justify-items: center; min-height: 44px; color: var(--accent); font-size: 1.55rem; font-weight: 800; line-height: 1; }
.flowchart-connector::before { content: ""; display: block; width: 2px; height: 21px; background: currentColor; }
.flowchart-connector span { color: var(--muted); font-size: .78rem; font-weight: 700; }
.flowchart-decision { width: 156px; height: 156px; display: grid; place-items: center; padding: 28px; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); background: var(--accent); color: #fff; text-align: center; font-size: .9rem; font-weight: 800; line-height: 1.2; }
.flowchart-split-labels { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); width: min(100%, 900px); padding: 8px 13%; color: var(--accent-deep); font-size: .78rem; font-weight: 800; text-align: center; }
.flowchart-split { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); width: min(100%, 960px); gap: 38px; padding-top: 22px; }
.flowchart-split::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 22px; border-top: 2px solid rgba(239,22,101,.7); border-left: 2px solid rgba(239,22,101,.7); border-right: 2px solid rgba(239,22,101,.7); }
.flowchart-lane { position: relative; display: grid; align-content: start; gap: 14px; padding: 18px; border: 2px solid rgba(239,22,101,.24); border-radius: 18px; background: rgba(255,255,255,.65); }
.flowchart-lane-head { justify-self: center; align-self: start; height: fit-content; padding: 8px 17px; border-radius: 999px; background: var(--accent-deep); color: #fff; font-size: .82rem; font-weight: 800; }
.flowchart-route { display: grid; gap: 12px; }
.flowchart-route.compact { padding-top: 13px; border-top: 2px dashed rgba(239,22,101,.2); }
.flowchart-rule { justify-self: center; width: min(100%, 220px); padding: 12px; border: 2px solid var(--accent); border-radius: 10px; background: #fff; color: var(--accent-deep); text-align: center; font-size: .82rem; font-weight: 800; }
.flowchart-route-branches { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; padding-top: 22px; }
.flowchart-route-branches::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 17px; border-top: 2px solid rgba(239,22,101,.65); border-left: 2px solid rgba(239,22,101,.65); border-right: 2px solid rgba(239,22,101,.65); }
.flowchart-route-branches div { display: grid; gap: 7px; min-height: 92px; align-content: center; padding: 11px; border: 2px solid rgba(239,22,101,.35); border-radius: 10px; background: rgba(255,255,255,.95); text-align: center; }
.flowchart-route-branches span { color: var(--muted); font-size: .73rem; font-weight: 800; text-transform: uppercase; }
.flowchart-route-branches strong { color: var(--ink); font-size: .82rem; line-height: 1.25; }
.flowchart-merge { min-height: 72px; padding-top: 16px; }
.call-tree-branches { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); width: 100%; gap: 8px; }
.call-tree-branches div { min-width: 0; padding: 12px 8px; border-radius: 14px; background: rgba(255,255,255,.78); border: 1px solid rgba(17,17,17,.08); font-size: .8rem; font-weight: 700; text-align: center; }
.call-tree-branches span { display: inline-grid; place-items: center; width: 21px; height: 21px; margin-bottom: 5px; border-radius: 50%; background: var(--accent); color: #fff; }
.status-box.is-error { color: #a31545; border-color: rgba(163,21,69,.25); background: rgba(255,235,242,.9); }

@media (max-width: 860px) {
  .call-tree-library { grid-template-columns: 210px minmax(0, 1fr); }
  .call-tree-library-detail { padding: 18px; }
  .call-tree-detail-head { grid-template-columns: 1fr; }
  .call-tree-detail-actions { justify-content: flex-start; }
  .call-tree-detail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .call-tree-card { grid-template-columns: minmax(0, 1fr); }
  .call-tree-card-left { padding: 0 0 18px; border-right: 0; border-bottom: 1px solid rgba(239,22,101,.14); }
  .call-tree-card-right { padding-right: 0; }
  .call-tree-layout { grid-template-columns: 1fr; }
  .call-tree-heading { align-items: flex-start; flex-direction: column; }
  .call-tree-heading-actions { width: 100%; justify-content: flex-start; }
  .call-tree-view-modal { height: calc(calc(100 * var(--dvh)) - 24px); width: calc(calc(100 * var(--vw)) - 20px); }
  .call-tree-diagram { padding: 24px 14px; }
  .flowchart-split { grid-template-columns: 1fr; gap: 20px; padding-top: 10px; }
  .flowchart-split::before, .flowchart-split-labels { display: none; }
}

@media (max-width: 680px) {
  .call-tree-library { grid-template-columns: 1fr; min-height: 0; overflow: visible; }
  .call-tree-library-sidebar { padding-bottom: 0; border-right: 0; border-bottom: 1px solid rgba(239,22,101,.15); }
  .call-tree-library-list { display: flex; overflow-x: auto; padding: 0 14px 16px; }
  .call-tree-library-item { flex: 0 0 220px; border: 1px solid rgba(239,22,101,.11); border-radius: 16px; }
  .call-tree-library-item + .call-tree-library-item { margin-left: 9px; }
  .call-tree-library-item::before { inset: auto 12px 0; width: auto; height: 5px; border-radius: 5px 5px 0 0; }
  .call-tree-library-detail { padding: 14px; }
  .call-tree-detail-head, .call-tree-detail-visualization { padding: 16px; }
  .call-tree-detail-metrics { grid-template-columns: 1fr 1fr; }
  .call-tree-detail-outcome > div:first-child { align-items: flex-start; flex-direction: column; }
}

.settings-admin-grid {
  align-items: start;
}

.settings-admin-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.settings-admin-column {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

.settings-page-content {
  gap: 6px;
}

.settings-page-content.account-settings-page-enhanced {
  gap: 0;
}

.account-settings-workspace {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  flex: 1 0 auto;
  align-items: stretch;
  min-height: calc(calc(100 * var(--dvh)) - 72px);
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.account-settings-master,
.account-settings-detail {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.account-settings-master {
  position: sticky;
  top: 60px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-self: start;
  height: calc(calc(100 * var(--dvh)) - 72px);
  max-height: calc(calc(100 * var(--dvh)) - 72px);
  padding: 20px 0;
  overflow: hidden;
}

.account-settings-master .settings-page-heading {
  margin: 0;
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.account-settings-master .settings-page-heading h2,
.account-settings-master .settings-page-heading p {
  margin: 0;
}

.account-settings-master .settings-page-heading h2 {
  margin-top: 2px;
}

.account-settings-master .settings-page-heading .muted {
  margin-top: 8px;
  font-size: 0.8rem;
  line-height: 1.45;
}

.admin-inbox-list.account-settings-list {
  grid-auto-rows: 78px;
  padding-top: 16px;
}

.account-settings-list .admin-inbox-list-item {
  height: 78px;
  min-height: 78px;
  max-height: 78px;
}

.account-settings-list-chevron {
  flex: 0 0 auto;
  color: var(--accent-deep);
  font-size: 1.25rem;
  font-weight: 800;
}

.account-settings-detail {
  min-width: 0;
  min-height: calc(calc(100 * var(--dvh)) - 72px);
  border-left: 1px solid rgba(17, 17, 17, 0.1);
}

.account-settings-view {
  min-height: 100%;
  padding: 28px;
}

.account-settings-view > .panel {
  width: 100%;
  max-width: 980px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 980px) {
  .account-settings-workspace {
    grid-template-columns: 1fr;
  }

  .account-settings-master {
    position: static;
    height: auto;
    max-height: none;
    border-bottom: 1px solid rgba(17, 17, 17, 0.1);
  }

  .admin-inbox-list.account-settings-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 78px;
    overflow: visible;
  }

  .account-settings-detail {
    min-height: 0;
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .admin-inbox-list.account-settings-list {
    grid-template-columns: 1fr;
  }

  .account-settings-view {
    padding: 20px 16px;
  }
}

.settings-admin-switch-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.settings-admin-switch-head .muted {
  max-width: 720px;
}

.settings-admin-launch {
  display: flex;
  justify-content: flex-start;
}

.settings-admin-launch-button {
  width: auto;
  min-width: 220px;
  padding-inline: 26px;
}

.settings-admin-switch-toolbar {
  display: grid;
  gap: 14px;
}

.settings-search-field {
  display: grid;
  gap: 8px;
}

.settings-account-panel {
  display: grid;
  gap: 18px;
}

.settings-page-heading {
  margin-bottom: 22px;
}

.settings-page-heading h2,
.settings-page-heading p {
  margin-top: 0;
}

.settings-page-heading h2 {
  margin-bottom: 6px;
}

.settings-overview-grid {
  align-items: start;
}

.settings-side-stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

.settings-account-body {
  gap: 20px;
}

.settings-account-summary {
  margin-top: 4px;
}

.settings-account-form {
  max-width: 760px;
}

.settings-account-field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.settings-account-field-row label {
  min-width: 0;
}

.settings-account-field-row small {
  display: block;
  margin-top: 8px;
}

.settings-account-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-organization-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0 0;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 14px;
  background: rgba(17, 17, 17, 0.08);
}

.settings-organization-grid div {
  min-width: 0;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.96);
}

.settings-organization-grid dt,
.settings-organization-grid dd {
  margin: 0;
}

.settings-organization-grid dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.settings-organization-grid dd {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-weight: 800;
}

.settings-security-form,
.settings-region-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.settings-security-form label,
.settings-region-form label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.settings-security-form button,
.settings-region-form button {
  width: auto;
  justify-self: start;
}

.settings-security-secondary-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.settings-security-secondary-actions button {
  width: auto;
  min-width: 0;
}

.settings-security-panel .status-box,
.settings-region-panel .status-box {
  margin-top: 14px;
}

.settings-language-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

@media (max-width: 620px) {
  .settings-organization-grid {
    grid-template-columns: 1fr;
  }

  .settings-account-actions {
    grid-template-columns: 1fr;
  }

  .settings-security-form button,
  .settings-region-form button,
  .settings-security-secondary-actions button {
    width: 100%;
  }
}

.settings-language-button {
  min-width: 140px;
}

.settings-language-button.is-active {
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.12), rgba(255, 190, 27, 0.14));
  border-color: rgba(239, 22, 101, 0.28);
  color: var(--accent-deep);
  box-shadow: 0 12px 24px rgba(116, 16, 59, 0.1);
}

.settings-dnc-widget {
  align-self: start;
}

.settings-dnc-copy {
  margin: 4px 0 0;
}

.settings-dnc-modal {
  width: min(840px, calc(calc(100 * var(--vw)) - 40px));
}

.settings-dnc-modal-item {
  width: 100%;
  text-align: left;
}

.settings-user-switch-list {
  display: grid;
  gap: 14px;
}

.settings-admin-pagination {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.settings-admin-pagination button {
  width: auto;
  min-width: 112px;
  min-height: 42px;
  margin-top: 0;
  padding: 0 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.16);
  box-shadow: none;
  font-weight: 700;
  line-height: 1;
}

.settings-admin-pagination button:hover,
.settings-admin-pagination button:focus-visible {
  background: rgba(255, 248, 252, 0.98);
  border-color: rgba(239, 22, 101, 0.28);
  box-shadow: 0 8px 18px rgba(116, 16, 59, 0.08);
}

.settings-admin-pagination-label {
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.settings-user-switch-card {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 10px;
  align-content: start;
  padding: 18px 20px;
}

.settings-user-switch-summary {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.settings-user-switch-copy {
  min-width: 0;
}

.settings-user-switch-copy strong,
.settings-user-switch-copy small {
  display: block;
}

.settings-user-switch-copy small {
  color: var(--muted);
}

.settings-user-switch-actions {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  align-self: center;
  margin-left: auto;
}

.settings-user-switch-action-button {
  width: auto;
  min-width: 0;
  padding: 8px 14px;
  min-height: 36px;
  border-radius: 999px;
  font-size: 0.84rem;
}

.settings-user-switch-actions .preview-chip {
  align-self: center;
}

.settings-admin-switch .team-person-card {
  width: 100%;
  min-width: 0;
}

.settings-admin-switch .team-person-card-body {
  align-items: start;
}

.settings-user-editor {
  width: min(720px, calc(calc(100 * var(--vw)) - 40px));
}

.settings-admin-create-modal {
  width: min(940px, calc(calc(100 * var(--vw)) - 40px));
}

.settings-admin-create-form {
  display: grid;
  gap: 18px;
}

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

.settings-admin-create-core-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-admin-create-wide-field {
  grid-column: 1 / -1;
}

.settings-admin-create-master-detail-modal {
  width: min(1180px, calc(calc(100 * var(--vw)) - 32px));
  max-height: calc(calc(100 * var(--vh)) - 32px);
  overflow: hidden;
}

.settings-admin-create-master-detail-modal .widget-modal-head {
  margin-bottom: 18px;
}

.settings-admin-create-master-detail-form {
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 0;
  min-height: 0;
  margin: 0 -24px -24px;
  overflow: hidden;
}

.settings-admin-create-browser {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 500px;
  max-height: min(620px, calc(65 * var(--vh)));
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: grid-template-columns 160ms ease;
}

.settings-admin-create-browser.has-team-hierarchy {
  grid-template-columns: 200px 230px minmax(0, 1fr);
}

.settings-admin-create-master,
.settings-admin-create-groups {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 18px 0;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(255, 249, 251, 0.72);
}

.settings-admin-create-groups {
  background: rgba(255, 252, 247, 0.82);
}

.settings-admin-create-groups.hidden {
  display: none;
}

.settings-admin-create-master button,
.settings-admin-create-groups button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 78px;
  margin: 0;
  padding: 15px 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  text-align: left;
  font: inherit;
}

.settings-admin-create-master button {
  display: grid;
  align-content: center;
  gap: 5px;
}

.settings-admin-create-master button > span,
.settings-admin-create-groups button > span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.settings-admin-create-master button strong,
.settings-admin-create-master button > span:first-child,
.settings-admin-create-groups button strong {
  font-weight: 800;
}

.settings-admin-create-master button small,
.settings-admin-create-groups button small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-admin-create-master button:hover,
.settings-admin-create-master button:focus-visible,
.settings-admin-create-groups button:hover,
.settings-admin-create-groups button:focus-visible {
  background: rgba(239, 22, 101, 0.035);
  box-shadow: none;
  transform: none;
}

.settings-admin-create-master button.is-active,
.settings-admin-create-groups button.is-active {
  background: linear-gradient(90deg, rgba(239, 22, 101, 0.08), rgba(239, 22, 101, 0.025));
  color: var(--accent-deep);
}

.settings-admin-create-master button.is-active::before,
.settings-admin-create-groups button.is-active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--accent);
}

.settings-admin-create-details {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.settings-admin-create-detail {
  height: 100%;
  min-height: 0;
  padding: 28px 30px;
  overflow-y: auto;
}

.settings-admin-create-detail > .eyebrow {
  margin: 0 0 8px;
}

.settings-admin-create-detail > h3 {
  margin: 0;
  font-size: 1.45rem;
}

.settings-admin-create-detail > .muted-copy {
  margin: 8px 0 24px;
}

.settings-admin-create-team-list {
  display: grid;
  gap: 10px;
}

.settings-admin-create-team-choice {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 13px 16px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  text-align: left;
  box-shadow: none;
  font: inherit;
}

.settings-admin-create-team-choice:hover,
.settings-admin-create-team-choice:focus-visible {
  border-color: rgba(239, 22, 101, 0.3);
  background: rgba(255, 249, 251, 0.98);
  box-shadow: none;
  transform: none;
}

.settings-admin-create-team-choice.is-selected {
  border-color: rgba(239, 22, 101, 0.32);
  background: linear-gradient(90deg, rgba(239, 22, 101, 0.08), rgba(255, 248, 228, 0.34));
}

.settings-admin-create-team-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff3e7d, #ff963e);
  color: #ffffff;
  font-weight: 800;
}

.settings-admin-create-team-choice > span:nth-child(2) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.settings-admin-create-team-choice strong,
.settings-admin-create-team-choice small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-admin-create-team-choice small {
  color: var(--muted);
}

.settings-admin-create-team-choice > b {
  min-width: 92px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.055);
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
}

.settings-admin-create-team-choice.is-selected > b {
  background: rgba(239, 22, 101, 0.1);
  color: var(--accent-deep);
}

.settings-admin-create-empty {
  display: grid;
  gap: 5px;
  padding: 20px;
  color: var(--muted);
}

.settings-admin-create-empty strong {
  color: var(--ink);
}

.settings-admin-create-status {
  margin: 14px 24px 0;
}

.settings-admin-create-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 92px;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.98);
}

.settings-admin-create-modal-actions > p {
  margin: 0;
  color: var(--muted);
}

.settings-admin-create-action-buttons {
  display: grid;
  grid-template-columns: minmax(150px, 0.72fr) minmax(280px, 1.28fr);
  gap: 12px;
  width: min(560px, 60%);
}

@media (max-width: 800px) {
  .settings-admin-create-browser,
  .settings-admin-create-browser.has-team-hierarchy {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .settings-admin-create-master,
  .settings-admin-create-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .settings-admin-create-groups {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    overflow-x: auto;
  }

  .settings-admin-create-master button,
  .settings-admin-create-groups button {
    min-height: 62px;
    padding: 10px 14px;
  }

  .settings-admin-create-detail {
    padding: 22px 18px;
  }

  .settings-admin-create-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-admin-create-action-buttons {
    width: 100%;
  }
}

.settings-admin-credentials {
  display: grid;
  gap: 16px;
}

.settings-admin-credentials.hidden {
  display: none;
}

.settings-reset-request-card .settings-user-switch-copy {
  display: grid;
  gap: 4px;
}

.settings-reset-request-card .settings-user-switch-summary {
  grid-template-columns: 56px minmax(0, 1fr);
}

.settings-reset-request-action {
  width: 100%;
  margin-top: 6px;
}

.settings-reset-request-card .avatar-circle {
  width: 56px;
  height: 56px;
  min-width: 56px;
  max-width: 56px;
  flex: 0 0 56px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}

.settings-user-editor-form {
  display: grid;
  gap: 18px;
}

.settings-user-editor-meta {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 251, 0.96));
}

.settings-user-editor-meta span,
.settings-user-editor-meta small {
  color: var(--muted);
}

.settings-user-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.settings-user-editor-grid label,
.settings-user-editor-form label {
  display: grid;
  gap: 8px;
}

.settings-user-editor-grid label.hidden,
.settings-user-editor-form label.hidden {
  display: none;
}

.settings-user-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.settings-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.08);
  color: var(--accent-deep);
  font-size: 0.88rem;
  font-weight: 700;
}

.settings-user-switch-empty {
  padding: 24px;
  border-radius: 20px;
  border: 1px dashed rgba(239, 22, 101, 0.18);
  background: rgba(255, 251, 252, 0.9);
  color: var(--muted);
}

@media (max-width: 860px) {
  .settings-admin-columns,
  .settings-admin-grid {
    grid-template-columns: 1fr;
  }

  .settings-user-switch-card {
    padding: 16px 18px;
  }

  .settings-user-switch-summary {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .settings-user-switch-actions {
    justify-content: flex-start;
    margin-left: 0;
    grid-column: 1 / -1;
    padding-top: 4px;
    flex-wrap: wrap;
  }

  .settings-admin-create-grid,
  .settings-user-editor-grid {
    grid-template-columns: 1fr;
  }

  .settings-admin-pagination {
    grid-template-columns: 1fr;
  }

  .settings-admin-pagination-label {
    order: -1;
  }
}

.team-form-grid input,
.team-form-grid select {
  width: 100%;
}

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

@media (max-width: 860px) {
  .team-inline-form {
    grid-template-columns: 1fr;
  }

  .reports-widget-grid,
  .reports-three-column-grid {
    grid-template-columns: 1fr;
  }

  .reports-widget-column {
    grid-template-columns: 1fr;
  }

  .reports-widget-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .reports-funnel-controls {
    justify-content: flex-start;
  }

  .reports-revenue-stage-bar-wrap,
  .reports-revenue-top-item,
  .reports-rep-forecast-bar-wrap {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .reports-revenue-forecast-summary-grid {
    grid-template-columns: 1fr;
  }

  .reports-revenue-forecast-summary,
  .reports-revenue-forecast-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .reports-revenue-top-item {
    flex-direction: column;
  }

  .reports-conversion-trend-svg {
    min-width: 620px;
  }
}

.legal-shell {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.legal-card {
  background: var(--panel);
  border: 1px solid rgba(255, 182, 210, 0.55);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: 32px;
}

.legal-hero {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.legal-hero h1,
.legal-section h2 {
  margin: 0;
}

.legal-hero p,
.legal-section p,
.legal-section li,
.legal-footer,
.legal-meta {
  color: var(--muted);
  line-height: 1.65;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.legal-link-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(255, 182, 210, 0.65);
  background: linear-gradient(135deg, rgba(255, 245, 250, 0.94), rgba(255, 248, 240, 0.92));
  text-decoration: none;
  color: var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.legal-link-card:hover,
.legal-link-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(116, 16, 59, 0.12);
  border-color: rgba(239, 22, 101, 0.4);
}

.legal-link-card strong {
  font-size: 1.35rem;
}

.legal-link-card span {
  color: var(--accent-deep);
  font-weight: 700;
}

.legal-section {
  display: grid;
  gap: 12px;
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.legal-section ul {
  margin: 0;
  padding-left: 20px;
}

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

.legal-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--accent-deep);
  font-weight: 700;
  border: 1px solid rgba(255, 182, 210, 0.8);
  background: linear-gradient(135deg, rgba(255, 235, 244, 0.95), rgba(255, 248, 227, 0.95));
}

.legal-home-link:hover,
.legal-home-link:focus-visible {
  background: linear-gradient(135deg, rgba(239, 22, 101, 0.08), rgba(255, 190, 27, 0.14));
}

@media (max-width: 720px) {
  .legal-shell {
    width: min(100% - 24px, 980px);
    padding: 24px 0 36px;
  }

  .legal-card {
    border-radius: 24px;
    padding: 22px 18px;
  }

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

  .legal-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Keep every scrollable popup within the viewport so its full content remains reachable. */
.widget-modal,
.patient-card-modal,
.calendar-composer-modal,
.account-profile-modal,
.photo-crop-modal,
.team-editor-modal,
.patient-family-modal {
  box-sizing: border-box;
  max-height: calc(calc(100 * var(--vh)) - 48px);
  max-height: calc(calc(100 * var(--dvh)) - 48px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.calendar-composer-modal {
  max-height: calc(calc(100 * var(--vh)) - 40px - min(84px, calc(10 * var(--vh))));
  max-height: calc(calc(100 * var(--dvh)) - 40px - min(84px, calc(10 * var(--vh))));
}

/* Use the shared right-sidebar secondary action treatment throughout the app. */
.secondary-button {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  margin-top: 0;
  padding: 10px 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.14);
  box-shadow: 0 10px 22px rgba(116, 16, 59, 0.08);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(239, 22, 101, 0.2);
  box-shadow: 0 12px 24px rgba(116, 16, 59, 0.1);
}

.leads-filter-head-actions .secondary-button {
  width: auto;
  min-width: max-content;
  flex: 0 0 auto;
}

/* Match the shared right-sidebar secondary button treatment. */
.button-secondary {
  min-height: 42px;
  margin-top: 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.14);
  box-shadow: 0 10px 22px rgba(116, 16, 59, 0.08);
  font-weight: 800;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(239, 22, 101, 0.2);
  box-shadow: 0 12px 24px rgba(116, 16, 59, 0.1);
}

/* Give top-bar menus a soft, connected open motion. */
@keyframes topbar-panel-in {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.account-mode-launcher-panel:not(.hidden),
.account-notification-panel:not(.hidden),
.account-dropdown:not(.hidden),
.preview-dropdown:not(.hidden) {
  animation: topbar-panel-in 200ms ease-out both;
  transform-origin: top right;
}

.account-topbar-action-button,
.account-notification-trigger,
.account-trigger,
.preview-trigger {
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.account-topbar-action-button:active,
.account-notification-trigger:active,
.account-trigger:active,
.preview-trigger:active {
  transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
  .account-mode-launcher-panel:not(.hidden),
  .account-notification-panel:not(.hidden),
  .account-dropdown:not(.hidden),
  .preview-dropdown:not(.hidden) {
    animation: none;
  }

  .account-topbar-action-button,
  .account-notification-trigger,
  .account-trigger,
  .preview-trigger {
    transition: none;
  }
}

/* Keep popup action rows visible while the popup body scrolls. */
:where(
  .widget-modal .team-group-modal-actions,
  .widget-modal .call-tree-option-actions,
  .widget-modal .team-unassigned-modal-actions,
  .widget-modal .goal-editor-actions,
  .settings-user-editor-form > .settings-user-editor-actions:last-child,
  .account-profile-modal .account-profile-actions,
  .photo-crop-modal .photo-crop-actions,
  .widget-modal .pipeline-lead-assignment-actions,
  .call-triage-overlay .team-group-modal-actions,
  .call-triage-overlay .call-panel-triage-footer,
  .calendar-composer-modal form > .calendar-composer-actions:last-child
) {
  position: sticky;
  bottom: -24px;
  z-index: 15;
  margin-bottom: -24px;
  padding: 16px 0 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -1px 0 rgba(17, 17, 17, 0.06);
}

.cerebro-toast-region {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2147483001;
  display: grid;
  justify-items: end;
  gap: 12px;
  width: min(400px, calc(calc(100 * var(--vw)) - 32px));
  pointer-events: none;
}

.cerebro-toast {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 32px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 14px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 24px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 20px 40px rgba(122, 133, 153, 0.2);
  pointer-events: auto;
  animation: cerebro-toast-in 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cerebro-toast.is-leaving {
  pointer-events: none;
  animation: cerebro-toast-out 180ms ease-in both;
}

.cerebro-toast-icon {
  display: grid;
  place-items: center;
  grid-column: 1;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef1665, #ffbe1b);
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(239, 22, 101, 0.2);
}

.cerebro-toast-copy {
  grid-column: 2;
  min-width: 0;
  color: rgba(24, 21, 28, 0.94);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.cerebro-toast .cerebro-toast-action {
  grid-column: 3;
}

.cerebro-toast-close {
  display: grid;
  place-items: center;
  grid-column: 4;
  width: 32px;
  height: 32px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.07);
  color: rgba(44, 36, 48, 0.92);
  font-size: 1.25rem;
  line-height: 1;
  box-shadow: none;
}

.cerebro-toast-close:hover,
.cerebro-toast-close:focus-visible {
  background: rgba(239, 22, 101, 0.15);
  transform: none;
}

@keyframes cerebro-toast-in {
  from { opacity: 0; transform: translate3d(calc(100% + 32px), 0, 0) scale(0.98); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes cerebro-toast-out {
  from { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  to { opacity: 0; transform: translate3d(calc(100% + 32px), 0, 0) scale(0.98); }
}

@media (max-width: 680px) {
  .cerebro-toast-region {
    top: 84px;
    right: 12px;
    width: calc(calc(100 * var(--vw)) - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cerebro-toast,
  .cerebro-toast.is-leaving {
    animation: none;
  }
}

/* Pipeline-style admin roster */
.team-roster-board {
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.team-roster-board .team-roster-rows {
  display: block;
}

.team-roster-pipeline-shell {
  display: grid;
  gap: 22px;
  padding: 0;
  background: transparent;
}

.team-roster-pipeline-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.team-roster-pipeline-title {
  flex: 0 0 auto;
}

.team-roster-pipeline-title .eyebrow,
.team-roster-pipeline-title h2 {
  margin: 0;
}

.team-roster-pipeline-title h2 {
  margin-top: 5px;
  font-size: clamp(1.45rem, calc(2 * var(--vw)), 2rem);
}

.team-roster-pipeline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.team-roster-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(239, 22, 101, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
}

.team-roster-view-button,
.team-roster-department-button,
.team-roster-pipeline-actions .team-board-add-button {
  width: auto;
  min-width: 0;
  margin: 0;
  border-radius: 999px;
}

.team-roster-view-button {
  min-width: 72px;
  min-height: 38px;
  padding: 6px 15px;
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  box-shadow: none;
  font: inherit;
  font-weight: 800;
}

.team-roster-view-button:hover,
.team-roster-view-button:focus-visible,
.team-roster-view-button.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 8px 18px rgba(116, 16, 59, 0.16);
}

.team-roster-pipeline-actions .team-board-add-button {
  min-height: 44px;
  padding: 8px 16px;
  border-color: rgba(239, 22, 101, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-deep);
  box-shadow: 0 8px 20px rgba(70, 39, 56, 0.06);
}

.team-roster-pipeline-actions .team-board-add-button:hover,
.team-roster-pipeline-actions .team-board-add-button:focus-visible {
  border-color: rgba(239, 22, 101, 0.3);
  background: linear-gradient(135deg, rgba(255, 242, 246, 0.98), rgba(255, 251, 239, 0.96));
}

.team-roster-visible-count {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 235, 241, 0.78);
  font-size: 0.84rem;
  white-space: nowrap;
}

.team-roster-department-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: thin;
}

.team-roster-department-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid rgba(239, 22, 101, 0.16);
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-deep);
  box-shadow: 0 8px 20px rgba(70, 39, 56, 0.05);
  font: inherit;
  font-weight: 800;
  white-space: nowrap;
}

.team-roster-department-button small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.1);
  color: inherit;
  font-size: 0.74rem;
}

.team-roster-department-button:hover,
.team-roster-department-button:focus-visible,
.team-roster-department-button.is-active {
  color: #fff;
  border-color: var(--accent-deep);
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
}

.team-roster-department-button.is-active small {
  background: rgba(255, 255, 255, 0.2);
}

.team-roster-split-layout {
  display: grid;
  grid-template-columns: minmax(180px, 230px) minmax(190px, 250px) minmax(0, 1fr);
  min-height: 620px;
}

.team-roster-group-sidebar {
  align-self: stretch;
  padding: 0 24px 28px 0;
  border-right: 1px solid rgba(17, 17, 17, 0.12);
}

.team-roster-group-sidebar-title {
  margin: 0 0 12px;
  padding: 0 16px 12px;
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.team-roster-group-sidebar-list {
  display: grid;
}

.team-roster-sidebar-create-row {
  padding: 0 8px 12px;
  border-bottom: 1px solid rgba(239, 22, 101, 0.14);
}

.team-roster-sidebar-create-button {
  grid-template-columns: minmax(0, 1fr);
  min-height: 68px;
  padding: 12px 14px;
  gap: 0;
  border-radius: 16px;
}

.team-roster-sidebar-create-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.team-roster-sidebar-create-copy strong,
.team-roster-sidebar-create-copy small {
  display: block;
  white-space: normal;
}

.team-roster-sidebar-create-copy strong {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.25;
}

.team-roster-sidebar-create-copy small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.team-roster-sidebar-create-row + .team-roster-group-sidebar-row {
  border-top: 0;
}

.team-roster-group-sidebar-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-height: 62px;
  border-bottom: 1px solid rgba(239, 22, 101, 0.14);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.team-roster-group-sidebar-row:first-child {
  border-top: 1px solid rgba(239, 22, 101, 0.14);
}

.team-roster-group-sidebar-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: transparent;
}

.team-roster-group-sidebar-row.is-active {
  background: linear-gradient(90deg, rgba(255, 232, 239, 0.9), rgba(255, 248, 250, 0.42));
}

.team-roster-group-sidebar-row.is-active::before {
  background: var(--accent);
}

.team-roster-group-sidebar-button {
  width: 100%;
  min-width: 0;
  min-height: 61px;
  margin: 0;
  padding: 14px 10px 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.team-roster-group-sidebar-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-roster-group-sidebar-button small {
  flex: 0 0 auto;
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 800;
}

.team-roster-group-sidebar-row:hover,
.team-roster-group-sidebar-row:focus-within {
  background-color: rgba(255, 241, 245, 0.6);
}

.team-roster-group-sidebar-row.is-active .team-roster-group-sidebar-button {
  color: var(--accent-deep);
}

.team-roster-team-sidebar {
  background: linear-gradient(90deg, rgba(255, 253, 250, 0.54), rgba(255, 255, 255, 0));
}

.team-roster-nested-empty {
  margin: 0;
  padding: 18px 16px;
  border-top: 1px solid rgba(239, 22, 101, 0.14);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.team-roster-content {
  min-width: 0;
  padding: 0 0 28px 28px;
  display: grid;
  align-content: start;
  gap: 22px;
}

.team-roster-search-toolbar {
  width: 100%;
  min-width: 0;
}

.team-roster-search-field {
  width: 100%;
  min-height: 44px;
  padding: 7px 16px;
  background: #fff;
  border-color: rgba(17, 17, 17, 0.08);
  border-radius: 999px;
}

.team-roster-search-field input {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.team-roster-kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(248px, 1fr);
  gap: 12px;
  align-items: start;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px 2px 14px;
  scrollbar-color: rgba(116, 16, 59, 0.34) transparent;
}

.team-roster-kanban-column {
  min-width: 248px;
  padding: 9px;
  border: 1px solid rgba(17, 17, 17, 0.07);
  border-radius: 18px;
  background: rgba(246, 246, 248, 0.8);
}

.team-roster-kanban-column.is-unassigned {
  border-style: dashed;
  background: rgba(255, 248, 235, 0.68);
}

.team-roster-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  padding: 7px 7px 11px;
}

.team-roster-column-head h3,
.team-roster-column-head p {
  margin: 0;
}

.team-roster-column-head h3 {
  font-size: 1rem;
  line-height: 1.2;
}

.team-roster-column-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
}

.team-roster-column-head-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.team-roster-column-head-actions span,
.team-roster-column-head-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--accent-deep);
  background: rgba(239, 22, 101, 0.1);
  font-size: 0.78rem;
  font-weight: 800;
}

.team-roster-column-head-actions button {
  width: 30px;
  min-height: 30px;
  margin: 0;
  border: 0;
  cursor: pointer;
}

.team-roster-column-list {
  display: grid;
  gap: 9px;
  max-height: min(calc(66 * var(--vh)), 690px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(116, 16, 59, 0.3) transparent;
}

.team-roster-column-empty {
  display: grid;
  place-items: center;
  min-height: 112px;
  padding: 16px;
  border: 1px dashed rgba(239, 22, 101, 0.18);
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.team-roster-board-card {
  position: relative;
  display: grid;
  gap: 11px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 18px rgba(70, 39, 56, 0.055);
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.team-roster-board-card:hover,
.team-roster-board-card:focus-visible {
  border-color: rgba(239, 22, 101, 0.24);
  box-shadow: 0 12px 24px rgba(116, 16, 59, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.team-roster-card-head,
.team-roster-card-person {
  display: flex;
  align-items: center;
  min-width: 0;
}

.team-roster-card-head {
  justify-content: space-between;
  gap: 8px;
}

.team-roster-card-person {
  gap: 9px;
}

.team-roster-card-person > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.team-roster-card-person strong,
.team-roster-card-person span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-roster-card-person strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.team-roster-card-person > div span {
  color: var(--muted);
  font-size: 0.75rem;
}

.team-roster-card-avatar {
  width: 40px;
  min-width: 40px;
  height: 40px;
  font-size: 0.76rem;
}

.team-roster-card-menu-button {
  cursor: pointer;
}

.team-roster-card-menu-button:hover,
.team-roster-card-menu-button:focus-visible,
.team-roster-card-menu-button[aria-expanded="true"] {
  background: transparent;
}

.team-roster-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.team-roster-card-tag {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 9px;
  border: 1px solid rgba(116, 16, 59, 0.12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 248, 250, 0.92);
  font-size: 0.7rem;
  font-weight: 800;
}

.team-roster-card-tag.is-lead,
.team-roster-card-tag.is-active {
  color: var(--accent-deep);
  border-color: rgba(239, 22, 101, 0.2);
  background: rgba(255, 231, 240, 0.86);
}

.team-roster-card-tag.is-inactive {
  color: #6d6269;
  background: rgba(235, 233, 235, 0.9);
}

.team-roster-card-menu {
  top: calc(100% + 7px);
  right: 0;
}

.team-roster-list-entry:has(.team-roster-card-menu:not(.hidden)) {
  z-index: 20;
}

.team-roster-list-view {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 2px 6px 16px 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.team-roster-list-entry {
  position: relative;
  display: block;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 17, 17, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 20px rgba(70, 39, 56, 0.045);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.team-roster-list-entry:hover,
.team-roster-list-entry:focus-within {
  border-color: rgba(239, 22, 101, 0.2);
  box-shadow: 0 12px 24px rgba(116, 16, 59, 0.08);
  transform: translateY(-1px);
}

.team-roster-list-team-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.team-roster-create-user-button {
  flex: 0 0 auto;
}

.team-roster-list-action-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(239, 22, 101, 0.18);
  border-radius: 18px;
  background: linear-gradient(90deg, rgba(255, 241, 246, 0.98), rgba(255, 249, 233, 0.94));
  box-shadow: 0 8px 20px rgba(116, 16, 59, 0.05);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.team-roster-list-action-button:hover,
.team-roster-list-action-button:focus-visible {
  border-color: rgba(239, 22, 101, 0.3);
  background: linear-gradient(90deg, rgba(255, 235, 243, 0.99), rgba(255, 246, 222, 0.96));
  box-shadow: 0 12px 24px rgba(116, 16, 59, 0.09);
  color: var(--accent-deep);
  transform: translateY(-1px);
}

.team-roster-list-edit-team {
  background: #fff;
  border-color: rgba(17, 17, 17, 0.1);
}

.team-roster-list-edit-team:hover,
.team-roster-list-edit-team:focus-visible {
  background: rgba(255, 248, 250, 0.98);
}

.team-roster-list-add-person {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.team-roster-list-add-person > span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.team-roster-list-add-person strong {
  font-size: 0.95rem;
}

.team-roster-list-add-person small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.team-roster-list-add-icon {
  display: inline-flex;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(239, 22, 101, 0.2);
}

.team-roster-list-edit-icon {
  background: var(--accent-deep);
  font-size: 1.08rem;
}

.team-roster-list-add-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 800;
  transition: background-color 140ms ease;
}

.team-roster-list-action-button:hover .team-roster-list-add-action,
.team-roster-list-action-button:focus-visible .team-roster-list-add-action {
  background: var(--accent-deep);
}

.team-roster-list-edit-team .team-roster-list-add-action {
  background: rgba(179, 15, 82, 0.1);
  color: var(--accent-deep);
}

.team-roster-list-edit-team:hover .team-roster-list-add-action,
.team-roster-list-edit-team:focus-visible .team-roster-list-add-action {
  background: rgba(179, 15, 82, 0.18);
}

.team-roster-list-entry .team-roster-board-card.is-list-row {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.team-roster-list-entry .team-roster-board-card.is-list-row .team-roster-card-tags {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.team-roster-employee-tag {
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  padding: 3px 8px 3px 4px;
  font-size: 0.68rem;
}

.team-roster-employee-tag .patient-descriptive-tag-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.team-roster-employee-tag .patient-descriptive-tag-icon svg {
  width: 11px;
  height: 11px;
}

.team-roster-list-empty-card {
  min-height: 104px;
  border-style: solid;
  border-color: rgba(17, 17, 17, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
}

.team-roster-list-pagination-status {
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 253, 250, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

:is(body.users-roles-page, body:has(main.main-content:not([hidden]) #teamRosterBoard)) {
  height: calc(100 * var(--vh));
  height: calc(100 * var(--dvh));
  max-height: calc(100 * var(--vh));
  max-height: calc(100 * var(--dvh));
  min-height: 0;
  overflow: hidden;
}

:is(body.users-roles-page, body:has(main.main-content:not([hidden]) #teamRosterBoard)) .app-shell,
:is(body.users-roles-page, body:has(main.main-content:not([hidden]) #teamRosterBoard)) main.main-content:not([hidden]) {
  height: calc(100 * var(--vh));
  height: calc(100 * var(--dvh));
  max-height: calc(100 * var(--vh));
  max-height: calc(100 * var(--dvh));
  min-height: 0;
  overflow: hidden;
}

:is(body.users-roles-page, body:has(main.main-content:not([hidden]) #teamRosterBoard)) main.main-content:not([hidden]) > .account-topbar {
  flex: 0 0 auto;
}

:is(body.users-roles-page, body:has(main.main-content:not([hidden]) #teamRosterBoard)) .team-roster-board {
  display: flex;
  flex: 1 1 auto;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

:is(body.users-roles-page, body:has(main.main-content:not([hidden]) #teamRosterBoard)) .team-roster-rows,
:is(body.users-roles-page, body:has(main.main-content:not([hidden]) #teamRosterBoard)) .team-roster-pipeline-shell {
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

:is(body.users-roles-page, body:has(main.main-content:not([hidden]) #teamRosterBoard)) .team-roster-pipeline-shell {
  grid-template-rows: minmax(0, 1fr);
}

:is(body.users-roles-page, body:has(main.main-content:not([hidden]) #teamRosterBoard)) .team-roster-split-layout {
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

:is(body.users-roles-page, body:has(main.main-content:not([hidden]) #teamRosterBoard)) .team-roster-group-sidebar {
  max-height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

:is(body.users-roles-page, body:has(main.main-content:not([hidden]) #teamRosterBoard)) .team-roster-content {
  max-height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

:is(body.users-roles-page, body:has(main.main-content:not([hidden]) #teamRosterBoard)) .team-roster-list-view {
  height: 100%;
  max-height: 100%;
}

@media (max-width: 1180px) {
  .team-roster-pipeline-head {
    align-items: stretch;
    flex-direction: column;
  }

  .team-roster-pipeline-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .team-roster-pipeline-shell {
    padding: 0;
  }

  .team-roster-split-layout {
    grid-template-columns: minmax(145px, 180px) minmax(155px, 190px) minmax(0, 1fr);
  }

  .team-roster-group-sidebar {
    padding-right: 16px;
  }

  .team-roster-content {
    padding-left: 18px;
  }

  .team-roster-list-action-button {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 560px) {
  .team-roster-pipeline-shell {
    gap: 17px;
    padding: 0;
  }

  .team-roster-split-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .team-roster-group-sidebar {
    padding: 0 0 18px;
    border-right: 0;
    border-bottom: 1px solid rgba(17, 17, 17, 0.12);
  }

  .team-roster-group-sidebar-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-roster-sidebar-create-row {
    grid-column: 1 / -1;
  }

  .team-roster-group-sidebar-row:nth-child(2) {
    border-top: 1px solid rgba(239, 22, 101, 0.14);
  }

  .team-roster-content {
    padding: 20px 0 0;
  }

  .team-roster-pipeline-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-roster-view-toggle,
  .team-roster-visible-count {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .team-roster-view-button {
    flex: 1;
  }

  .team-roster-pipeline-actions .team-board-add-button {
    width: 100%;
  }

  .team-roster-kanban {
    grid-auto-columns: minmax(calc(82 * var(--vw)), 1fr);
  }
}
/* Admin information architecture */
.admin-page-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 24px;
}

.admin-page-heading h2 {
  margin: 4px 0 6px;
}

.admin-action-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}

.admin-action-shortcut {
  color: inherit;
  text-decoration: none;
}

.admin-action-shortcut h3 {
  margin: 5px 0 8px;
}

.admin-password-reset-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 20px;
  border-top: 1px solid rgba(124, 108, 118, 0.16);
}

.admin-password-reset-credentials-column,
.admin-password-reset-request-list {
  min-width: 0;
  padding: 24px;
}

.admin-password-reset-credentials-column {
  display: flex;
  align-items: flex-start;
}

.admin-password-reset-credentials-column .settings-admin-credentials {
  width: 100%;
}

.admin-password-reset-request-list {
  border-left: 1px solid rgba(124, 108, 118, 0.22);
}

.admin-password-reset-request-list > :first-child {
  margin-top: 0;
}

.admin-section-tabs {
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  padding: 5px;
  margin-bottom: 22px;
  border: 1px solid rgba(124, 108, 118, 0.22);
  border-radius: 999px;
  background: #eceaec;
}

.admin-section-tab {
  padding: 10px 18px;
  border-radius: 999px;
  color: #6d626b;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.admin-section-tab.is-active {
  color: #fff;
  background: #d40755;
}

@media (max-width: 900px) {
  .admin-action-shortcuts { grid-template-columns: 1fr; }
  .admin-section-tabs { overflow-x: auto; width: 100%; }
  .admin-password-reset-workspace { grid-template-columns: 1fr; }
  .admin-password-reset-request-list {
    border-top: 1px solid rgba(124, 108, 118, 0.22);
    border-left: 0;
  }
}
/* Admin shared inbox management */
.admin-inboxes-page { display: flex; flex-direction: column; min-height: calc(100 * var(--dvh)); gap: 18px; }
.admin-inboxes-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-inboxes-heading h2, .admin-inboxes-heading p { margin-bottom: 0; }
.admin-inbox-workspace { display: grid; grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); flex: 1 0 auto; align-items: stretch; gap: 0; min-height: calc(calc(100 * var(--dvh)) - 72px); border-top: 1px solid rgba(17,17,17,.08); }
.admin-inbox-master, .admin-inbox-detail { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.admin-inbox-master { position: sticky; top: 60px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; align-self: start; gap: 16px; height: calc(calc(100 * var(--dvh)) - 72px); max-height: calc(calc(100 * var(--dvh)) - 72px); padding: 20px 0; overflow: hidden; }
.admin-inbox-master-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px 16px; border-bottom: 1px solid rgba(17,17,17,.08); }
.admin-inbox-master-head h3, .admin-inbox-master-head p { margin: 0; }
.admin-inbox-list { display: grid; grid-auto-rows: 68px; align-content: start; gap: 2px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.admin-inbox-master-create { padding: 16px 20px 0; border-top: 1px solid rgba(17,17,17,.08); }
.admin-inbox-master-create button { width: 100%; margin: 0; }
.admin-inbox-list-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: 68px; min-height: 68px; max-height: 68px; margin: 0; padding: 12px 18px 12px 20px; border: 0; border-left: 5px solid transparent; border-radius: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; box-shadow: none; }
.admin-inbox-list-item > span:first-child { display: grid; min-width: 0; gap: 3px; }
.admin-inbox-list-item strong, .admin-inbox-list-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-inbox-list-item small { color: var(--text-soft); font-size: .78rem; }
.admin-inbox-list-item:hover, .admin-inbox-list-item:focus-visible { background: rgba(239,22,101,.04); transform: none; box-shadow: none; }
.admin-inbox-list-item.is-selected { border-left-color: var(--accent); background: linear-gradient(90deg, rgba(239,22,101,.09), rgba(239,22,101,.025)); color: var(--accent-deep); }
.admin-inbox-detail { display: grid; grid-template-rows: auto auto minmax(0, 1fr); min-height: 590px; height: 100%; padding: 0; overflow: hidden; border-left: 1px solid rgba(17,17,17,.1); }
.admin-inbox-detail-empty { display: grid; place-content: center; min-height: 500px; padding: 40px; text-align: center; }
.admin-inbox-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 26px 28px; }
.admin-inbox-detail-head h2, .admin-inbox-detail-head p { margin: 0; }
.admin-inbox-detail-head > div:first-child { display: grid; gap: 6px; }
.admin-inbox-detail-head-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.admin-inbox-detail-head-actions button { width: auto; min-width: 0; margin: 0; }
.admin-inbox-card { display: grid; gap: 20px; padding: 22px 24px; }
.admin-inbox-card-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.admin-inbox-card-copy { display: grid; gap: 5px; min-width: 0; }
.admin-inbox-card-copy h3, .admin-inbox-card-copy p { margin: 0; }
.admin-inbox-card-meta { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.admin-inbox-card-meta .button-secondary { width: auto; margin: 0; }
.admin-inbox-overview { display: grid; grid-template-columns: minmax(240px, .7fr) minmax(360px, 1.3fr); gap: 22px; align-items: stretch; padding: 20px 28px; border-top: 1px solid rgba(17,17,17,.08); }
.admin-inbox-response-chart { display: grid; justify-items: center; gap: 18px; min-width: 0; margin: 0; padding: 20px; border: 1px solid rgba(17,17,17,.08); border-radius: 22px; background: rgba(255,255,255,.88); }
.admin-inbox-response-pie { position: relative; display: grid; width: 150px; aspect-ratio: 1; place-items: center; border-radius: 50%; background: conic-gradient(#ef1665 0 var(--responded-stop), #ffbe1b var(--responded-stop) var(--unread-stop), #7657f6 var(--unread-stop) 100%); box-shadow: 0 16px 34px rgba(49,8,26,.08); }
.admin-inbox-response-pie::after { content: ""; position: absolute; width: 62%; aspect-ratio: 1; border-radius: 50%; background: #ffffff; }
.admin-inbox-response-pie > span { position: relative; z-index: 1; display: grid; justify-items: center; line-height: 1; }
.admin-inbox-response-pie > span strong { color: #111111; font-size: 2rem; }
.admin-inbox-response-pie > span small { margin-top: 5px; color: var(--muted); font-weight: 700; }
.admin-inbox-response-pie.is-empty { background: rgba(102,85,95,.12); box-shadow: none; }
.admin-inbox-response-chart figcaption { display: grid; width: 100%; gap: 13px; min-width: 0; }
.admin-inbox-response-legend { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.admin-inbox-response-legend li { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; color: var(--muted); }
.admin-inbox-response-legend i { width: 11px; height: 11px; border-radius: 50%; }
.admin-inbox-response-legend i.is-responded { background: #ef1665; }
.admin-inbox-response-legend i.is-unread { background: #ffbe1b; }
.admin-inbox-response-legend i.is-not-responded { background: #7657f6; }
.admin-inbox-response-legend strong { color: var(--ink); }
.admin-inbox-kpi-panel { display: grid; align-content: start; min-width: 0; gap: 12px; }
.admin-inbox-kpi-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.admin-inbox-kpi-range-label { color: var(--text-soft); font-size: .78rem; font-weight: 750; }
.admin-inbox-custom-range { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)) auto; align-items: end; gap: 9px; padding: 11px 12px; border: 1px solid rgba(17,17,17,.08); border-radius: 15px; background: rgba(255,255,255,.72); }
.admin-inbox-custom-range label { display: grid; gap: 5px; color: var(--text-soft); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.admin-inbox-custom-range input { width: 100%; min-height: 38px; padding: 7px 10px; border: 1px solid rgba(17,17,17,.12); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; }
.admin-inbox-custom-range button { width: auto; min-height: 38px; margin: 0; padding: 7px 14px; }
.admin-inbox-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0; }
.admin-inbox-stats > div,
.admin-inbox-kpi-card { display: grid; grid-template-rows: auto minmax(68px, 1fr); gap: 8px; min-width: 0; min-height: 128px; margin: 0; padding: 13px 15px 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #ffffff; box-shadow: var(--shadow); }
.admin-inbox-stats span { color: var(--text-soft); font-size: .76rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.admin-inbox-stats strong { color: var(--ink); font-size: 1.55rem; line-height: 1; }
.admin-inbox-kpi-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-inbox-kpi-chart { display: block; width: 100%; height: 72px; min-width: 0; overflow: visible; }
.admin-inbox-kpi-chart-baseline { stroke: rgba(102,85,95,.12); stroke-width: 1.5; }
.admin-inbox-kpi-chart.is-loading { display: flex; align-items: end; justify-content: center; gap: 7px; padding-bottom: 12px; }
.admin-inbox-kpi-chart.is-loading i { width: 7px; height: 22px; border-radius: 999px; background: rgba(239,22,101,.2); animation: admin-inbox-chart-loading 900ms ease-in-out infinite alternate; }
.admin-inbox-kpi-chart.is-loading i:nth-child(2) { height: 38px; animation-delay: 120ms; }
.admin-inbox-kpi-chart.is-loading i:nth-child(3) { height: 29px; animation-delay: 240ms; }
.admin-inbox-kpi-chart-message { display: grid; place-items: center; min-height: 68px; color: var(--text-soft); font-size: .76rem; text-align: center; }
@keyframes admin-inbox-chart-loading { from { opacity: .45; transform: scaleY(.72); } to { opacity: 1; transform: scaleY(1); } }
.admin-inbox-empty { padding: 36px; text-align: center; }
.admin-inbox-detail-lower { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid rgba(17,17,17,.08); }
.admin-inbox-settings-panel, .admin-inbox-access-panel { display: grid; align-content: start; gap: 20px; min-width: 0; padding: 26px 28px; }
.admin-inbox-settings-panel { border-right: 1px solid rgba(17,17,17,.08); }
.admin-inbox-settings-panel h3, .admin-inbox-settings-panel p, .admin-inbox-access-panel h3, .admin-inbox-access-panel p { margin: 0; }
.admin-inbox-settings-panel > div:first-child { display: grid; gap: 6px; }
.admin-inbox-detail-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.admin-inbox-detail-actions button, .admin-inbox-access-panel-head button { width: auto; margin: 0; }
.admin-inbox-access-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.admin-inbox-access-panel-head > div { display: grid; gap: 5px; }
.admin-inbox-access-roster { display: grid; gap: 8px; }
.admin-inbox-access-person { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 10px 12px; border: 1px solid rgba(17,17,17,.08); border-radius: 14px; background: #ffffff; }
.admin-inbox-access-person > span:last-child { display: grid; min-width: 0; gap: 2px; }
.admin-inbox-access-person strong, .admin-inbox-access-person small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-inbox-access-person small { color: var(--text-soft); }
.admin-inbox-editor-modal { display: flex; flex-direction: column; width: min(1040px, calc(calc(100 * var(--vw)) - 32px)); max-height: min(900px, calc(calc(100 * var(--vh)) - 40px)); overflow: hidden; }
.admin-inbox-editor-modal > .widget-modal-head { flex: 0 0 auto; position: relative; z-index: 6; background: #ffffff; }
.admin-inbox-editor-form { display: grid; flex: 1 1 auto; min-height: 0; gap: 20px; padding: 22px; overflow-y: auto; overscroll-behavior: contain; }
.admin-inbox-editor-fields { display: grid; grid-template-columns: minmax(220px, 0.8fr) minmax(300px, 1.2fr); gap: 14px; }
.admin-inbox-editor-fields label { display: grid; gap: 7px; font-weight: 800; }
.admin-inbox-editor-fields input, .admin-inbox-editor-fields textarea, #adminInboxMemberSearch { width: 100%; border: 1px solid rgba(17,17,17,.12); border-radius: 15px; background: #fff; color: var(--ink); font: inherit; padding: 12px 14px; }
.admin-inbox-access-editor { display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid rgba(17,17,17,.08); }
.admin-inbox-access-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.admin-inbox-access-head h4, .admin-inbox-access-head p { margin: 0; }
.admin-inbox-access-toolbar { margin-bottom: 0; }
.admin-inbox-access-browser { width: calc(100% + 44px); min-height: 350px; margin-inline: -22px; border-top: 1px solid rgba(17,17,17,.08); border-bottom: 1px solid rgba(17,17,17,.08); }
.admin-inbox-access-targets { padding-top: 0; }
.admin-inbox-team-groups { padding-top: 0; }
.admin-inbox-team-groups-empty { padding: 22px; text-align: center; }
.admin-inbox-access-results { min-width: 0; overflow: hidden; }
.admin-inbox-member-list { max-height: min(390px, calc(42 * var(--vh))); overflow: auto; padding: 16px; }
.admin-inbox-member-list .team-group-user-option { width: 100%; }
.admin-inbox-member-list .team-group-user-option:disabled { cursor: not-allowed; opacity: .58; }
.admin-inbox-picker-empty { padding: 24px; text-align: center; }
.admin-inbox-selected-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 44px; margin: 0; }
.admin-inbox-selected-team-chip .tagged-teammate-chip-icon { width: 28px; font-size: .62rem; }
.admin-inbox-selected-empty { padding: 5px 2px; }
.admin-inbox-editor-actions { position: sticky; bottom: -22px; z-index: 5; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; margin: 0 -22px -22px; padding: 16px 22px 22px; border-top: 1px solid rgba(17,17,17,.08); background: rgba(255,255,255,.98); box-shadow: 0 -14px 28px rgba(57,29,42,.08); backdrop-filter: blur(12px); }
.admin-inbox-editor-actions button { width: auto; margin: 0; }
.admin-inbox-delete-button { color: #c71932; border-color: rgba(199,25,50,.25); }
@media (max-width: 720px) {
  .admin-inboxes-heading, .admin-inbox-card-top, .admin-inbox-access-head, .admin-inbox-detail-head { align-items: stretch; flex-direction: column; }
  .admin-inbox-detail-head-actions { justify-content: flex-start; }
  .admin-inbox-overview { padding: 16px; }
  .admin-inbox-response-chart { gap: 14px; }
  .admin-inbox-response-pie { width: 130px; }
  .admin-inbox-card-meta { justify-content: space-between; }
  .admin-inbox-editor-fields { grid-template-columns: 1fr; }
  .admin-inbox-access-browser { width: calc(100% + 44px); }
  .admin-inbox-access-targets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-inbox-editor-actions { grid-template-columns: 1fr 1fr; }
  .admin-inbox-editor-actions > span { display: none; }
  .admin-inbox-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-inbox-custom-range { grid-template-columns: 1fr 1fr; }
  .admin-inbox-custom-range button { grid-column: 1 / -1; width: 100%; }
}
@media (max-width: 980px) {
  .admin-inbox-workspace { grid-template-columns: 1fr; }
  .admin-inbox-master { position: static; align-self: auto; height: auto; max-height: 280px; border-bottom: 1px solid rgba(17,17,17,.1); }
  .admin-inbox-detail { height: auto; border-left: 0; }
  .admin-inbox-overview { grid-template-columns: 1fr; }
  .admin-inbox-detail-lower { grid-template-columns: 1fr; }
  .admin-inbox-settings-panel { border-right: 0; border-bottom: 1px solid rgba(17,17,17,.08); }
}

/* Admin Action Center master-detail workspace */
.admin-action-center-page {
  gap: 0;
}

.admin-action-center-workspace {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  flex: 1 0 auto;
  align-items: stretch;
  min-height: calc(calc(100 * var(--dvh)) - 72px);
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.admin-action-center-master,
.admin-action-center-detail {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-action-center-master {
  position: sticky;
  top: 60px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-self: start;
  gap: 16px;
  height: calc(calc(100 * var(--dvh)) - 72px);
  max-height: calc(calc(100 * var(--dvh)) - 72px);
  padding: 20px 0;
  overflow: hidden;
}

.admin-action-center-list {
  grid-auto-rows: 78px;
}

.admin-action-center-list .admin-inbox-list-item {
  height: 78px;
  min-height: 78px;
  max-height: 78px;
}

.admin-action-center-list-trailing {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.admin-action-center-list-trailing b {
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.09);
  color: var(--accent-deep);
  font-size: 0.78rem;
}

.admin-action-center-list-trailing i {
  font-style: normal;
}

.admin-action-center-detail {
  min-width: 0;
  min-height: calc(calc(100 * var(--dvh)) - 72px);
  border-left: 1px solid rgba(17, 17, 17, 0.1);
}

.admin-action-center-view {
  min-height: 100%;
  padding: 28px;
}

.admin-action-center-view > .settings-admin-switch,
.admin-action-center-view > .admin-urgent-actions {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (max-width: 980px) {
  .admin-action-center-workspace {
    grid-template-columns: 1fr;
  }

  .admin-action-center-master {
    position: static;
    align-self: auto;
    height: auto;
    max-height: none;
    border-bottom: 1px solid rgba(17, 17, 17, 0.1);
  }

  .admin-action-center-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 78px;
    overflow: visible;
  }

  .admin-action-center-detail {
    min-height: 0;
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .admin-action-center-list {
    grid-template-columns: 1fr;
  }

  .admin-action-center-view {
    padding: 20px 16px;
  }
}

/* Create lead master-detail modal */
.create-lead-modal {
  display: flex;
  flex-direction: column;
  width: min(860px, calc(calc(100 * var(--vw)) - 40px));
  padding: 0;
  overflow: hidden;
}

.create-lead-modal > .widget-modal-head {
  position: relative;
  top: auto;
  z-index: 4;
  flex: 0 0 auto;
  margin: 0;
  padding: 24px;
}

.create-lead-modal > .widget-modal-head h2,
.create-lead-modal > .widget-modal-head p {
  margin: 0;
}

.create-lead-modal > .widget-modal-head h2 {
  margin-top: 4px;
}

.create-lead-modal > .widget-modal-content {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.create-lead-modal-form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  max-width: 100%;
  height: min(650px, calc(calc(100 * var(--dvh)) - 190px));
  min-height: 430px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
  background: #ffffff;
}

.create-lead-master-detail {
  display: grid;
  grid-template-columns: minmax(220px, 250px) minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.create-lead-master {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid rgba(17, 17, 17, 0.1);
  background: rgba(255, 252, 253, 0.58);
}

.create-lead-master-head {
  padding: 24px 22px 20px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.create-lead-master-head h3,
.create-lead-master-head p,
.create-lead-detail-head h3,
.create-lead-detail-head p {
  margin: 0;
}

.create-lead-master-head h3,
.create-lead-detail-head h3 {
  margin-top: 4px;
}

.create-lead-master-head .muted,
.create-lead-detail-head .muted {
  margin-top: 8px;
  font-size: 0.84rem;
  line-height: 1.45;
}

.admin-inbox-list.create-lead-section-list {
  grid-auto-rows: 82px;
  align-content: start;
  padding-top: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.create-lead-section-list .admin-inbox-list-item {
  height: 82px;
  min-height: 82px;
  max-height: 82px;
}

.create-lead-section-list .admin-inbox-list-item > span:last-child {
  flex: 0 0 auto;
  color: var(--accent-deep);
  font-size: 1.25rem;
  font-weight: 800;
}

.create-lead-detail {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.create-lead-detail-panel {
  min-height: 100%;
  padding: 30px 32px;
}

.create-lead-detail-panel[hidden] {
  display: none;
}

.create-lead-detail-head {
  margin-bottom: 26px;
}

.create-lead-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.create-lead-detail-grid label {
  min-width: 0;
  font-weight: 700;
}

.create-lead-detail-grid input,
.create-lead-detail-grid select {
  min-height: 50px;
  background: #fffdfa;
}

.create-lead-detail-grid-span-2 {
  grid-column: auto;
}

.create-lead-assignment-grid {
  grid-template-columns: minmax(0, 1fr);
}

.create-lead-event-results {
  padding-right: 0;
  background: transparent;
}

.create-lead-modal-actions {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-height: 76px;
  padding: 16px 24px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -14px 28px rgba(57, 29, 42, 0.06);
}

.create-lead-modal-actions .status-box {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: 100%;
  margin: 0 auto 0 0;
}

.create-lead-modal-actions .create-lead-modal-submit {
  flex: 0 0 auto;
  justify-self: end;
  width: auto;
  min-width: 160px;
  min-height: 42px;
  margin: 0;
  padding: 10px 22px;
}

@media (max-width: 800px) {
  .create-lead-modal-form {
    height: min(720px, calc(calc(100 * var(--dvh)) - 170px));
    min-height: 0;
  }

  .create-lead-master-detail {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .create-lead-master {
    display: block;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid rgba(17, 17, 17, 0.1);
  }

  .create-lead-master-head {
    display: none;
  }

  .admin-inbox-list.create-lead-section-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 68px;
    padding-top: 0;
    overflow: visible;
  }

  .create-lead-section-list .admin-inbox-list-item {
    height: 68px;
    min-height: 68px;
    max-height: 68px;
    padding-inline: 14px;
  }

  .create-lead-section-list .admin-inbox-list-item small,
  .create-lead-section-list .admin-inbox-list-item > span:last-child {
    display: none;
  }

  .create-lead-detail-panel {
    padding: 24px 20px;
  }
}

@media (max-width: 560px) {
  .create-lead-modal {
    width: calc(calc(100 * var(--vw)) - 20px);
  }

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

  .create-lead-detail-grid-span-2 {
    grid-column: auto;
  }

  .create-lead-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .create-lead-modal-actions .create-lead-modal-submit {
    width: 100%;
  }
}

/* Create New Lead: required marker, inline field errors and the Tags section. */
.create-lead-tags-required {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(239, 22, 101, 0.1);
  color: var(--accent-deep);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.create-lead-tags-field-error {
  color: #b42318;
  font-size: 0.8rem;
  font-weight: 700;
}

.create-lead-tags-field-error[hidden] {
  display: none;
}

input.create-lead-tags-invalid,
select.create-lead-tags-invalid {
  border-color: #b42318;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.create-lead-tags-box {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(91, 77, 84, 0.16);
  border-radius: 16px;
  background: #fff;
}

.create-lead-tags-box:focus-within {
  border-color: color-mix(in srgb, var(--accent) 55%, #fff);
  box-shadow: 0 0 0 3px rgba(239, 22, 101, 0.1);
}

.create-lead-tags-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 132px;
  overflow-y: auto;
}

.create-lead-tags-chips-empty {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.create-lead-tags-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  padding: 3px 8px 3px 6px;
  border: 1px solid color-mix(in srgb, var(--create-lead-tag-color, var(--accent)) 45%, #fff);
  border-radius: 999px;
  background: color-mix(in srgb, var(--create-lead-tag-color, var(--accent)) 10%, #fff);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
}

.create-lead-tags-chip > span:not(.create-lead-tags-dot) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.create-lead-tags-chip.is-preview {
  border-style: dashed;
}

.create-lead-tags-dot {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--create-lead-tag-color, var(--accent));
}

.create-lead-tags-chip button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1;
  box-shadow: none;
}

.create-lead-tags-chip button:hover,
.create-lead-tags-chip button:focus-visible {
  background: rgba(91, 77, 84, 0.12);
  color: var(--ink);
}

.create-lead-tags-search {
  width: 100%;
  margin: 0;
  padding: 6px 4px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  box-shadow: none;
}

.create-lead-tags-results {
  display: grid;
  align-content: start;
  gap: 2px;
  max-height: min(320px, calc(40 * var(--vh)));
  margin-top: 12px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid rgba(91, 77, 84, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
}

.create-lead-tags-row {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.create-lead-tags-row:hover,
.create-lead-tags-row.is-active {
  background: rgba(239, 22, 101, 0.07);
}

.create-lead-tags-row-group {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.create-lead-tags-create {
  grid-template-columns: auto minmax(0, auto);
  justify-content: start;
}

.create-lead-tags-create-label {
  color: var(--accent-deep);
  font-size: 0.84rem;
  font-weight: 800;
}

.create-lead-tags-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(91, 77, 84, 0.16);
  border-radius: 999px;
  color: transparent;
  font-size: 0.76rem;
}

.create-lead-tags-row.is-selected .create-lead-tags-check {
  border-color: var(--create-lead-tag-color, var(--accent));
  background: var(--create-lead-tag-color, var(--accent));
  color: #fff;
}

.create-lead-tags-empty,
.create-lead-tags-more {
  margin: 4px 8px 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.create-lead-tags-error {
  margin: 8px 0 0;
  color: #b42318;
  font-size: 0.8rem;
  font-weight: 700;
}

.create-lead-tags-error:empty {
  display: none;
}

/* Bulk lead upload keeps its own compact, single-column form layout. */
.bulk-lead-upload-modal {
  width: min(700px, calc(calc(100 * var(--vw)) - 40px));
  max-width: none;
}

.bulk-lead-upload-modal > .widget-modal-content {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.bulk-lead-upload-form {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 20px;
  margin: 0;
  padding: 24px;
  background: #ffffff;
}

.bulk-lead-upload-form .section-head,
.bulk-lead-upload-form .section-head h3,
.bulk-lead-upload-form .section-head p,
.bulk-lead-upload-form .bulk-lead-upload-copy {
  margin: 0;
}

.bulk-lead-upload-form .section-head {
  margin-bottom: 0;
}

.bulk-lead-upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: 100%;
}

.bulk-lead-upload-grid .create-lead-modal-grid-span-2 {
  grid-column: auto;
}

.bulk-lead-upload-grid label {
  min-width: 0;
  font-weight: 700;
}

.bulk-lead-upload-grid input,
.bulk-lead-upload-grid select {
  width: 100%;
  min-height: 50px;
  background: #fffdfa;
}

.bulk-lead-upload-preview {
  width: 100%;
  margin-top: 0;
}

.bulk-lead-upload-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  width: 100%;
  padding-top: 18px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.bulk-lead-upload-actions .status-box {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: 100%;
  margin: 0 auto 0 0;
}

.bulk-lead-upload-actions .bulk-lead-upload-submit {
  flex: 0 0 auto;
  width: auto;
  min-width: 160px;
  min-height: 42px;
  margin: 0;
  padding: 10px 22px;
}

@media (max-width: 560px) {
  .bulk-lead-upload-modal {
    width: calc(calc(100 * var(--vw)) - 20px);
  }

  .bulk-lead-upload-form {
    padding: 20px 16px;
  }

  .bulk-lead-upload-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .bulk-lead-upload-actions .bulk-lead-upload-submit {
    width: 100%;
  }
}

/* Nested Training master-detail: courses, lessons, then the selected lesson. */
body.training-page { height: calc(100 * var(--dvh)); overflow: hidden; }
body.training-page .app-shell { height: calc(100 * var(--dvh)); min-height: 0; }
body.training-page main.training-page-content { height: calc(100 * var(--dvh)); min-width: 0; min-height: 0; overflow: hidden; padding: 0; gap: 0; }
body.training-page main.training-page-content > .account-topbar { flex: 0 0 auto; }
.training-workspace { display: grid; flex: 1 1 0; grid-template-columns: clamp(175px, 23%, 260px) minmax(490px, 1fr); min-height: 0; overflow-x: auto; overflow-y: hidden; background: #fff; }
.training-course-workspace { display: grid; grid-template-columns: clamp(180px, 30%, 250px) minmax(0, 1fr); min-width: 0; min-height: 0; overflow: hidden; }
.training-lessons-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid #e6e2e4; overflow: hidden; }
.training-lessons-pane header { flex: 0 0 auto; padding: 28px 22px 20px; }
.training-lessons-pane h3 { margin: 0; font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.training-lesson-list { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding-bottom: 20px; }
.training-lessons-empty { padding: 0 22px; }
.training-library { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid #e6e2e4; overflow: hidden; }
.training-library header { padding: 28px 24px 12px; }
.training-library h2 { margin: 0 0 8px; }
.training-search { display: grid; gap: 6px; padding: 0 24px 20px; font-size: 13px; color: #685d65; }
.training-search input { width: 100%; min-width: 0; border: 1px solid #e6e2e4; border-radius: 24px; padding: 12px 16px; background: #fff; }
.training-course-list { min-height: 0; overflow-y: auto; padding-bottom: 20px; }
.training-course-list > .muted { padding: 24px; }
.training-course, .training-lesson-item { display: grid; flex: 0 0 auto; gap: 7px; width: 100%; padding: 22px 24px; background: #fff; color: #171417; text-align: left; border: 0; border-bottom: 1px solid #f3dfe7; border-left: 5px solid transparent; border-radius: 0; box-shadow: none; white-space: normal; }
.training-lesson-item { padding: 22px; font-size: 16px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.training-course strong { font-size: 17px; overflow-wrap: anywhere; }
.training-course span { font-size: 13px; color: #71656d; }
.training-course.is-active, .training-lesson-item.is-active { border-left-color: #f40d6a; background: linear-gradient(90deg, #ffe8f1, #fff); }
.training-lesson-item.is-active { color: #bd0853; }
.training-course.is-active strong, .training-progress-label { color: #bd0853; }
.training-course.is-complete, .training-lesson-item.is-complete { background: #edf8f1; border-bottom-color: #bde4ca; color: #17643b; }
.training-course.is-complete strong, .training-course.is-complete span { color: #17643b; }
.training-course.is-complete.is-active, .training-lesson-item.is-complete.is-active { background: #d8efdf; border-left-color: #169447; }
.training-reader { min-width: 0; min-height: 0; overflow-y: auto; padding: 28px clamp(20px, calc(3 * var(--vw)), 48px); }
.training-course-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.training-course-heading h2 { margin: 4px 0 16px; overflow-wrap: anywhere; }
.training-description { white-space: pre-wrap; line-height: 1.6; color: #71656d; }
.training-lesson-body { min-width: 0; }
.training-video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 16px; background: #151215; margin: 16px 0; }
.training-interactive { display: block; width: 100%; height: calc(80 * var(--dvh)); min-height: 520px; border: 1px solid #e6e2e4; border-radius: 16px; background: white; }
.training-lesson-text { white-space: pre-wrap; line-height: 1.7; overflow-wrap: anywhere; }
.training-lesson-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin: 24px 0; }
.training-lesson-body form > button { padding: 14px 26px; }
.training-workspace button:disabled { opacity: .6; cursor: default; }
.training-empty { padding: 40px 0; color: #71656d; }
.training-empty h2 { color: #171417; }
.training-error { color: #a3213f; background: #fff1f4; }
.training-reader [role="status"]:not(:empty) { margin-bottom: 20px; }
.training-lesson-body fieldset { margin: 22px 0; padding: 20px; border: 1px solid #eadfe5; border-radius: 16px; }
.training-lesson-body legend { font-weight: 700; padding: 0 8px; }
.training-answer { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; }
.training-answer input { flex: 0 0 auto; width: auto; accent-color: #f40d6a; }
@media (max-width: 800px) {
  .training-workspace { grid-template-columns: 175px minmax(490px, 1fr); }
  .training-library header, .training-course { padding: 18px 12px; }
  .training-search { padding: 0 12px 16px; }
  .training-reader { padding: 20px 16px; }
  .training-lessons-pane header, .training-lesson-item { padding: 18px 14px; }
  .training-course-heading { flex-wrap: wrap; }
}

/* Conversation tags (separate from contact/lead tags) */
.conversation-tag-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.conversation-tags-header { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; }
.conversation-tags-header .conversation-tag-chips { margin-top: 0; }
.conversation-tag-chip { display: inline-flex; align-items: center; gap: 2px; padding: 1px 8px; border-radius: 999px; font-size: 11px; line-height: 16px; color: var(--conversation-tag-color, #6b7280); background: color-mix(in srgb, var(--conversation-tag-color, #6b7280) 14%, transparent); border: 1px solid color-mix(in srgb, var(--conversation-tag-color, #6b7280) 40%, transparent); }
.conversation-tag-remove { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 0 0 2px; font-size: 13px; line-height: 1; }
.conversation-tag-add { border: 1px dashed currentColor; background: transparent; color: inherit; opacity: 0.7; cursor: pointer; border-radius: 999px; padding: 1px 8px; font-size: 11px; line-height: 16px; }
.conversation-tag-menu { position: absolute; top: 100%; left: 0; z-index: 20; display: flex; flex-direction: column; min-width: 160px; max-height: 240px; overflow-y: auto; padding: 4px; border-radius: 8px; background: var(--surface, #fff); color: var(--text, inherit); border: 1px solid rgba(128, 128, 128, 0.35); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }
.conversation-tag-menu-item { display: flex; align-items: center; gap: 6px; border: 0; background: transparent; color: inherit; text-align: left; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 12px; }
.conversation-tag-menu-item:hover { background: rgba(128, 128, 128, 0.15); }
.conversation-tag-menu-empty { padding: 6px 8px; font-size: 12px; }
.messaging-thread-more { position: relative; }
.messaging-thread-more-menu { left: auto; right: 0; margin-top: 4px; white-space: nowrap; }
.messaging-thread-more-menu.hidden { display: none; }
.messaging-assign-menu-note { margin: 0; padding: 6px 12px 4px; font-size: 0.78rem; white-space: nowrap; }
.conversation-tag-swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* Call flow editor: recordings, menu/ring settings, tag manager */
.call-tree-live-banner { margin: 0; padding: 9px 14px; border-radius: 12px; background: rgba(24,121,78,.1); color: #18794e; font-size: .84rem; font-weight: 700; }
.call-tree-settings-section { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid rgba(239,22,101,.13); border-radius: 16px; background: rgba(255,249,251,.7); }
.call-tree-settings-section h4 { margin: 0; font-size: .95rem; }
.call-tree-settings-section label { display: grid; gap: 6px; color: var(--ink); font-weight: 800; }
.call-tree-settings-section small { color: var(--muted); font-size: .76rem; font-weight: 600; }
.call-tree-settings-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.call-tree-menu-settings { display: grid; gap: 12px; margin: 12px 0; }
.call-tree-recording-picker { display: flex; align-items: flex-end; gap: 8px; }
.call-tree-recording-picker label { flex: 1; display: grid; gap: 6px; min-width: 0; }
.call-tree-recording-picker .button-secondary { width: auto; margin: 0; padding: 10px 14px; }
.call-tree-tag-picker { display: grid; gap: 6px; font-weight: 800; }
.call-tree-tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.call-tree-tag-option { display: inline-flex !important; align-items: center; gap: 6px !important; padding: 5px 10px; border: 1px solid rgba(128,128,128,.3); border-radius: 999px; font-weight: 600 !important; font-size: .82rem; }
.call-tree-recordings-add { display: grid; gap: 10px; margin: 12px 0 4px; }
.call-tree-recordings-list, .call-tree-tags-list { display: grid; gap: 8px; max-height: 360px; overflow-y: auto; }
.call-tree-recording-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid rgba(239,22,101,.13); border-radius: 12px; }
.call-tree-recording-row small { display: block; color: var(--muted); }
.call-tree-recording-row .button-secondary { width: auto; margin: 0; padding: 8px 12px; }
.call-tree-tag-row { display: flex; align-items: center; gap: 8px; }
.call-tree-tag-row input[type="text"] { flex: 1; min-width: 0; }
.call-tree-tag-active { display: inline-flex; align-items: center; gap: 4px; }

/* Phone System pages: side menu, page chrome, audio library */
.phone-system-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px; align-items: start; }
.phone-system-nav { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid rgba(124, 108, 118, 0.22); border-radius: 18px; background: #fff; }
.phone-system-nav-link { padding: 10px 14px; border-radius: 12px; color: #6d626b; font-weight: 700; text-decoration: none; }
.phone-system-nav-link:hover { background: #f6f1f3; }
.phone-system-nav-link.is-active { color: #fff; background: #d40755; }
.phone-system-content { min-width: 0; display: grid; gap: 16px; }
.phone-system-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.phone-system-head h2 { margin: 2px 0 6px; }
.phone-system-head .muted { margin: 0; }
.phone-system-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.phone-system-toolbar input[type="search"] { min-width: 220px; }
.phone-system-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid rgba(239, 22, 101, 0.13); border-radius: 16px; background: #fff; }
.phone-system-card-main { min-width: 0; display: grid; gap: 6px; }
.phone-system-card-main small { color: var(--muted); }
.phone-system-card-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.phone-system-card .button-secondary, .phone-system-table .button-secondary { width: auto; margin: 0; padding: 8px 12px; }
.phone-system-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.phone-system-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: rgba(239, 22, 101, 0.08); color: var(--accent-deep); font-size: 0.8rem; font-weight: 700; text-decoration: none; }
.phone-system-chip.is-plain { background: #eceaec; color: #6d626b; }
.phone-system-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid rgba(239, 22, 101, 0.13); border-radius: 16px; }
.phone-system-table th, .phone-system-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid rgba(239, 22, 101, 0.1); }
.phone-system-status { min-height: 1.2em; margin: 0; }
.phone-system-form { display: grid; gap: 12px; }
.phone-system-form textarea { width: 100%; resize: vertical; }
.audio-library-menu { position: relative; }
.audio-library-menu-list { position: absolute; right: 0; top: 100%; z-index: 5; min-width: 140px; padding: 6px; border: 1px solid rgba(124, 108, 118, 0.22); border-radius: 12px; background: #fff; box-shadow: 0 10px 28px rgba(83, 21, 49, 0.14); }
.audio-library-menu-list button { width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.audio-library-menu-list button:hover { background: #f6f1f3; }
.audio-library-player { display: grid; gap: 10px; padding: 12px; border: 1px solid rgba(239, 22, 101, 0.13); border-radius: 14px; }
.audio-library-player audio { width: 100%; }
.audio-library-player-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.audio-library-player-tools .button-secondary { width: auto; margin: 0; padding: 6px 12px; }
.audio-library-player-tools .is-active { background: #d40755; color: #fff; }
@media (max-width: 900px) {
  .phone-system-layout { grid-template-columns: 1fr; }
  .phone-system-nav { position: static; flex-direction: row; overflow-x: auto; }
  .phone-system-nav-link { white-space: nowrap; }
}

.call-tree-ring-chips-row { margin-top: 8px; }
.call-tree-ring-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; vertical-align: middle; }
.call-tree-ring-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: rgba(239,22,101,.1); color: var(--accent-deep); font-size: .78rem; font-weight: 700; line-height: 1.4; }
.call-tree-ring-chip.is-team { background: rgba(33,92,170,.12); color: #1f4f8f; }

/* Centered incoming call: only while a panel is ringing (calling.js toggles .is-incoming-centered). */
.call-panel-stack.is-incoming-centered {
  inset: 0;
  top: 0;
  right: 0;
  width: auto;
  align-items: center;
  justify-content: center;
}

.call-panel-stack.is-incoming-centered::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(24, 28, 42, 0.32);
  pointer-events: none;
}

.call-panel-stack.is-incoming-centered .call-panel-group-incoming {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(480px, calc(92 * var(--vw)));
}

.call-panel-stack.is-incoming-centered .call-panel-group-incoming .call-panel {
  width: 100%;
}

.call-panel-stack.is-incoming-centered .call-panel-group-stack {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(400px, calc(calc(100 * var(--vw)) - 32px));
}


/* Call flow editor: shared settings sections */
.call-tree-option-workspace { display: grid; gap: 12px; }
.call-tree-option-workspace.hidden { display: none; }
.call-tree-option-workspace .call-tree-option-form.hidden { display: none; }
.calls-phone-system-link { display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
.calls-phone-system-link.hidden { display: none; }
/* Full-page call flow editor: sticky top bar, sticky outline, read-only cards, Edit dialog */
.call-flow-page { display: grid; gap: 14px; min-width: 0; }
.call-flow-page.hidden { display: none; }
.call-flow-topbar { position: sticky; top: 0; z-index: 40; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 12px 18px; border: 1px solid rgba(239,22,101,.16); border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 10px 26px rgba(116,16,59,.08); backdrop-filter: blur(8px); }
.call-flow-topbar-main { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 16px; min-width: 0; flex: 1 1 420px; }
.call-flow-name { display: grid; gap: 2px; min-width: min(100%, 280px); flex: 1 1 280px; max-width: 520px; }
.call-flow-name .eyebrow { margin: 0; }
.call-flow-name input { width: 100%; padding: 6px 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink); font-size: 1.25rem; font-weight: 800; }
.call-flow-name input:hover, .call-flow-name input:focus { border-color: rgba(239,22,101,.3); background: #fff; }
.call-flow-topbar-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.call-flow-topbar-tools .button-secondary { width: auto; margin: 0; }
.call-flow-topbar .call-tree-live-banner { flex: 1 1 100%; order: 3; }
.call-flow-topbar-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.call-flow-topbar-actions .button-secondary, .call-flow-topbar-actions .button-primary { width: auto; margin: 0; padding-inline: 18px; }
.call-flow-save-status { margin: 0; max-width: 460px; color: #b42318; font-size: .84rem; font-weight: 700; }
.call-flow-save-status:empty { display: none; }
.call-flow-body { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; }
.call-flow-outline { position: sticky; top: 92px; display: grid; gap: 8px; max-height: calc(calc(100 * var(--dvh)) - 112px); overflow-y: auto; padding: 14px 10px; border: 1px solid rgba(239,22,101,.14); border-radius: 18px; background: rgba(255,250,252,.85); }
.call-flow-outline > .eyebrow { margin: 0 8px; }
.call-flow-outline-list { display: grid; gap: 2px; }
.cf-outline-line { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; margin: 0; padding: 7px 8px 7px calc(8px + var(--cf-level, 0) * 20px); border: 0; border-radius: 10px; background-color: transparent; color: var(--ink); font-size: .86rem; font-weight: 700; text-align: left; box-shadow: none; cursor: pointer; }
.cf-outline-line:hover, .cf-outline-line:focus-visible { background-color: rgba(239,22,101,.1); color: var(--accent-deep); box-shadow: none; transform: none; }
.cf-outline-label { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cf-outline-icon { flex: 0 0 auto; color: var(--accent-deep); font-size: .95rem; }
.cf-outline-badge, .cf-digit { display: inline-grid; place-items: center; flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .74rem; font-weight: 800; }
/* Thin vertical guide per nesting level so sub-menus visibly sit under the option that opens them. */
.cf-outline-line[style*="--cf-level"] { background-image: repeating-linear-gradient(90deg, rgba(239,22,101,.28) 0 1px, transparent 1px 20px); background-repeat: no-repeat; background-position: 18px 0; background-size: calc(var(--cf-level, 0) * 20px - 10px) 100%; }
.cf-outline-line.is-root, .cf-outline-line[style*="--cf-level:0"] { background-image: none; }
.cf-outline-line.is-menu, .cf-outline-line.is-root { font-weight: 800; }
.cf-outline-add { color: var(--accent-deep); font-size: .82rem; font-weight: 800; }
.call-flow-cards { --cf-step: 40px; display: grid; gap: 14px; width: min(100%, 820px); min-width: 0; margin: 0 auto; }
.cf-card { position: relative; display: grid; gap: 4px; margin-left: 0; padding: 16px 18px 12px; border: 1px solid rgba(239,22,101,.16); border-radius: 18px; background: #fff; box-shadow: 0 8px 22px rgba(116,16,59,.05); scroll-margin-top: 96px; transition: box-shadow 160ms ease, border-color 160ms ease; }
.cf-card-menu-card { border-left: 4px solid var(--accent); background: rgba(255,250,252,.9); }
.cf-card.is-highlight { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(239,22,101,.18), 0 10px 26px rgba(116,16,59,.1); }
.cf-card.has-error { border-color: #b42318; box-shadow: 0 0 0 3px rgba(180,35,24,.16); }
.cf-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cf-card-title { min-width: 0; }
.cf-card-title h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.cf-crumb { margin: 0 0 4px; color: var(--muted); font-size: .76rem; font-weight: 700; overflow-wrap: anywhere; }
.cf-menu-icon { color: var(--accent-deep); }
.cf-card-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.cf-card-actions .button-secondary { width: auto; margin: 0; padding: 8px 16px; }
.cf-card-body { display: grid; gap: 2px; }
.cf-section { display: grid; gap: 6px; padding: 12px 0; border-top: 1px solid rgba(239,22,101,.1); }
.cf-section:first-child { border-top: 0; }
.cf-section h4 { margin: 0; color: var(--muted); font-size: .76rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.cf-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.cf-label { color: var(--muted); font-weight: 700; }
.cf-value { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.cf-sub, .cf-muted { color: var(--muted); font-size: .86rem; }
.cf-chain { display: grid; gap: 8px; margin: 0; padding-left: 20px; }
.cf-chain li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cf-play { display: inline-grid; place-items: center; width: 26px; height: 26px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: #fff; font-size: .7rem; line-height: 1; box-shadow: none; cursor: pointer; }
.cf-play:hover, .cf-play:focus-visible { background: var(--accent-deep); box-shadow: none; transform: none; }
.cf-card-menu { position: relative; }
.cf-menu-toggle { width: 34px; height: 34px; margin: 0; padding: 0; border: 1px solid rgba(239,22,101,.2); border-radius: 50%; background: #fff; color: var(--accent-deep); font-size: 1.1rem; font-weight: 800; box-shadow: none; cursor: pointer; }
.cf-menu-popover { position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; min-width: 160px; padding: 6px; border: 1px solid rgba(239,22,101,.18); border-radius: 12px; background: #fff; box-shadow: 0 14px 28px rgba(116,16,59,.14); }
.cf-menu-popover.hidden { display: none; }
.cf-menu-item { display: block; width: 100%; margin: 0; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; color: #a31545; font-weight: 800; text-align: left; box-shadow: none; cursor: pointer; }
.cf-menu-item:hover:not(:disabled), .cf-menu-item:focus-visible { background: #ffe9f1; box-shadow: none; transform: none; }
.cf-menu-item:disabled { opacity: .45; cursor: not-allowed; }
/* Each menu's option cards live in a .cf-group: one continuous pink guide line down its left, ending after its last card. */
.cf-group { position: relative; display: grid; gap: 14px; min-width: 0; margin-left: var(--cf-step, 40px); }
.cf-group::before { content: ""; position: absolute; top: -14px; bottom: 0; left: calc(var(--cf-step, 40px) / -2); width: 2px; border-radius: 2px; background: rgba(239,22,101,.3); pointer-events: none; }
.cf-group-flat { margin-left: 0; }
.cf-group-flat::before { display: none; }
.cf-add-row { position: relative; }
.cf-add-option { width: 100%; min-height: 52px; margin: 0; border: 2px dashed rgba(239,22,101,.3); border-radius: 16px; background: rgba(255,250,252,.65); color: var(--accent-deep); font-weight: 800; box-shadow: none; cursor: pointer; }
.cf-add-option:hover, .cf-add-option:focus-visible { border-color: rgba(239,22,101,.65); background: #fff; transform: none; }
.call-flow-dialog { display: flex; flex-direction: column; width: min(720px, calc(calc(100 * var(--vw)) - 40px)); max-height: calc(calc(100 * var(--dvh)) - 48px); overflow: hidden; }
.call-flow-dialog-form { display: grid; gap: 16px; min-height: 0; overflow-y: auto; padding-top: 18px; overscroll-behavior: contain; }
.call-flow-dialog-section { display: grid; gap: 14px; }
.call-flow-dialog-section.hidden { display: none; }
.call-flow-dialog-error { margin: 0; color: #b42318; font-size: .86rem; font-weight: 700; }
.call-flow-dialog-error:empty { display: none; }
@media (max-width: 900px) {
  .call-flow-body { grid-template-columns: 1fr; }
  .call-flow-outline { position: static; max-height: 220px; }
  .call-flow-cards { --cf-step: 20px; }
}

.ring-group-member-list { list-style: none; margin: 6px 0 2px; padding: 0; display: grid; gap: 4px; }
.ring-group-member-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 6px 0; border-top: 1px solid rgba(239, 22, 101, 0.08); }
.ring-group-member-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 700; color: #6d626b; white-space: nowrap; cursor: pointer; }
.ring-group-member-switch input { width: 18px; height: 18px; accent-color: #d40755; }
.my-call-settings-card { display: grid; gap: 12px; padding: 16px 18px; border: 1px solid rgba(239, 22, 101, 0.13); border-radius: 16px; background: #fff; }
.my-call-settings-card h3 { margin: 0; }
.my-call-settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.my-call-settings-copy { min-width: 0; display: grid; gap: 4px; }
.my-call-settings-row .button-secondary { width: auto; margin: 0; padding: 8px 14px; }
.my-call-settings-switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.my-call-settings-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.my-call-settings-switch-track { position: relative; width: 44px; height: 24px; border-radius: 999px; background: #cfc8cd; transition: background 0.15s; }
.my-call-settings-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.my-call-settings-switch input:checked + .my-call-settings-switch-track { background: #d40755; }
.my-call-settings-switch input:checked + .my-call-settings-switch-track::after { transform: translateX(20px); }
.my-call-settings-switch input:focus-visible + .my-call-settings-switch-track { outline: 2px solid #d40755; outline-offset: 2px; }
.my-call-settings-switch input:disabled + .my-call-settings-switch-track { opacity: 0.5; }
.my-call-settings-meter { height: 10px; border-radius: 999px; background: #eceaec; overflow: hidden; }
.my-call-settings-meter.hidden { display: none; }
.my-call-settings-meter span { display: block; height: 100%; width: 0; background: #d40755; transition: width 0.08s linear; }
.phone-number-detail-tabs { display: flex; gap: 6px; border-bottom: 1px solid rgba(124, 108, 118, 0.22); }
.phone-number-detail-tab { padding: 10px 16px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #6d626b; font-weight: 700; cursor: pointer; }
.phone-number-detail-tab.is-active { color: #d40755; border-bottom-color: #d40755; }
.phone-number-detail-back { justify-self: start; width: auto; margin: 0; padding: 6px 12px; }
.phone-number-detail-panel { display: grid; gap: 0; border: 1px solid rgba(239, 22, 101, 0.13); border-radius: 16px; background: #fff; }
.phone-number-detail-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid rgba(239, 22, 101, 0.1); }
.phone-number-detail-row:last-child { border-bottom: 0; }
.phone-number-detail-copy { min-width: 0; display: grid; gap: 4px; }
.phone-number-detail-copy small { color: var(--muted); }
.phone-number-detail-row .button-secondary { width: auto; margin: 0; padding: 6px 14px; }
.phone-number-detail-choices { display: grid; gap: 10px; }
.phone-number-detail-choices label { display: flex; align-items: center; gap: 8px; }
.phone-number-detail-link { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.phone-number-detail-link:hover { color: #d40755; }
/* Call flow page: top section (live numbers, settings, first step), member chip, note summaries */
.call-flow-name-display { color: var(--ink); font-size: 1.25rem; font-weight: 800; overflow-wrap: anywhere; }
.cf-top { display: grid; gap: 14px; width: min(100%, 820px); margin: 0 auto 6px; }
.cf-top .cf-card { margin-left: 0; }
.cf-live-card { border-color: rgba(24,121,78,.28); background: rgba(24,121,78,.05); }
.cf-top-lead { display: flex; align-items: center; gap: 8px; margin: 0; }
.cf-live-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: #18794e; box-shadow: 0 0 0 3px rgba(24,121,78,.18); }
.cf-top-note { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.cf-live-list { display: grid; gap: 4px; margin: 6px 0 4px; padding-left: 20px; overflow-wrap: anywhere; }
.cf-link { color: var(--accent-deep); font-weight: 800; text-decoration: underline; }
.cf-setting-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid rgba(239,22,101,.1); }
.cf-setting-row:first-child { border-top: 0; }
.cf-setting-copy { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.cf-setting-copy .cf-value { display: grid; gap: 2px; }
.cf-setting-row .button-secondary { flex: 0 0 auto; width: auto; margin: 0; padding: 6px 14px; }
.call-tree-ring-chip.is-member { background: rgba(24,121,78,.12); color: #18794e; }
.cf-note { font-style: italic; }
.call-tree-check-row { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.call-tree-check-row input { width: 18px; height: 18px; margin: 0; accent-color: #d40755; }
.call-tree-member-redirect { display: grid; gap: 8px; }
.call-tree-member-switch { width: fit-content; }
.call-tree-member-targets { display: grid; gap: 8px; padding-left: 28px; }
.call-tree-member-target-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.call-tree-member-target-row select { min-width: 200px; max-width: 100%; }
.call-tree-member-pick-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-left: 28px; }
.call-tree-member-pick { padding: 4px 10px; font-size: .82rem; }
.call-tree-ring-picker--member .call-tree-ring-chip { padding: 2px 8px; font-size: .7rem; }
.call-tree-ring-picker--member .call-tree-ring-chips { gap: 4px; }
.widget-overlay.call-tree-ring-picker--member .call-tree-ring-targets-modal { transform: scale(.9); transform-origin: center; }
.widget-overlay.call-tree-ring-picker--member .call-tree-ring-targets-modal .widget-modal-head,
.widget-overlay.call-tree-ring-picker--member .call-tree-ring-targets-modal .call-tree-target-picker { padding-top: 6px; padding-bottom: 6px; }
.widget-overlay.call-tree-ring-picker--member .call-tree-ring-targets-modal .eyebrow { font-size: .62rem; color: #18794e; }
.call-tree-action-descriptions { display: grid; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.call-tree-action-descriptions li { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid rgba(239,22,101,.14); border-radius: 12px; }
.call-tree-action-descriptions li.is-selected { border-color: var(--accent); background: rgba(239,22,101,.06); }
.call-tree-action-descriptions li span { color: var(--muted); font-size: .86rem; }

/* SMS accounts (admin-sms-accounts.html) */
.sms-accounts-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.sms-accounts-master { display: grid; gap: 10px; padding: 12px; }
.sms-accounts-list { display: grid; gap: 4px; }
.sms-accounts-item { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border: 0; border-radius: 12px; background: transparent; color: inherit; cursor: pointer; }
.sms-accounts-item small { color: var(--muted); }
.sms-accounts-item:hover { background: #f6f1f3; }
.sms-accounts-item.is-active { background: rgba(239, 22, 101, 0.08); }
.sms-accounts-detail { display: grid; gap: 14px; min-width: 0; }
.sms-accounts-card { display: grid; gap: 10px; padding: 16px; }
.sms-accounts-card h3, .sms-accounts-card h4, .sms-accounts-card p { margin: 0; }
.sms-accounts-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sms-accounts-details { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 14px; margin: 0; }
.sms-accounts-details dt { color: var(--muted); }
.sms-accounts-details dd { margin: 0; }
.sms-accounts-members { list-style: none; margin: 0; padding: 0; display: grid; }
.sms-accounts-member { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(239, 22, 101, 0.08); }
.sms-accounts-member-name { flex: 1; min-width: 0; display: grid; }
.sms-accounts-member-name small { color: var(--muted); }
.sms-accounts-menu { position: relative; }
.sms-accounts-more { width: auto; margin: 0; padding: 6px 10px; }
.sms-accounts-menu-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; display: grid; min-width: 150px; padding: 6px; border: 1px solid rgba(124, 108, 118, 0.22); border-radius: 12px; background: #fff; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12); }
.sms-accounts-card:has(.sms-accounts-menu-list) { position: relative; z-index: 30; }
.sms-accounts-menu-list button { padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink, #111); box-shadow: none; text-align: left; cursor: pointer; }
.sms-accounts-menu-list button:hover { background: #f6f1f3; color: var(--ink, #111); }
.sms-accounts-empty { padding: 24px; }
.sms-accounts-subhead { margin: 10px 0 0; font-size: 0.9rem; color: var(--muted); }
.sms-accounts-modal [hidden] { display: none; }
.sms-accounts-modal { max-width: 460px; }
.sms-accounts-modal label { display: grid; gap: 4px; }
.sms-accounts-modal .has-error { border-color: #b3261e; }
.sms-accounts-error { margin: 0; color: #b3261e; font-weight: 700; }
.sms-accounts-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 860px) { .sms-accounts-layout { grid-template-columns: 1fr; } }

/* Campaign saved filters (campaign-filters.html) */
.phone-system-nav-link.is-disabled { opacity: 0.5; cursor: not-allowed; }
.phone-system-nav-link.is-disabled:hover { background: transparent; }
.campaign-filters-card { padding: 8px 16px 16px; }
.campaign-filters-table { width: 100%; border-collapse: collapse; }
.campaign-filters-table th { text-align: left; padding: 10px 8px; color: var(--muted); font-size: 0.85rem; }
.campaign-filters-table td { padding: 10px 8px; border-top: 1px solid rgba(239, 22, 101, 0.08); vertical-align: middle; }
.campaign-filters-more { width: 56px; text-align: right; }
/* Tablet / narrow windows: compact the campaign tables and let them scroll sideways inside the card instead of running off the page. */
@media (max-width: 1280px) {
  .campaign-filters-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; font-size: 0.85rem; }
  .campaign-filters-table th, .campaign-filters-table td { padding: 8px 6px; }
  .campaign-filters-table th { font-size: 0.75rem; }
  .campaign-filters-table td .chip, .campaign-filters-table td .status-chip { white-space: nowrap; }
  .campaign-filters-table td:nth-child(5), .campaign-filters-table th:nth-child(5) { min-width: 110px; }
}
.campaign-filters-name { padding: 0; border: 0; background: transparent; color: var(--accent-deep); font: inherit; font-weight: 800; cursor: pointer; text-align: left; }
.campaign-filters-empty { display: grid; gap: 8px; justify-items: start; padding: 24px 8px; }
.campaign-filters-empty p { margin: 0; }
.campaign-filters-modal { max-width: 760px; width: min(760px, calc(94 * var(--vw))); max-height: calc(92 * var(--vh)); overflow: auto; }
.campaign-filters-modal label { display: grid; gap: 4px; }
.campaign-filters-rules { display: grid; gap: 10px; }
.campaign-filters-rule { display: grid; grid-template-columns: 150px 110px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.campaign-filters-values { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.campaign-filters-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: baseline; }
.campaign-filters-note { flex-basis: 100%; }
.campaign-filters-chip-x { margin-left: 6px; padding: 0 2px; border: 0; background: transparent; color: inherit; font-size: 1rem; line-height: 1; cursor: pointer; }
.campaign-filters-count { padding: 10px 12px; border-radius: 12px; background: rgba(239, 22, 101, 0.06); }
.campaign-filters-people { list-style: none; margin: 0 0 12px; padding: 0; display: grid; max-height: 260px; overflow: auto; }
.campaign-filters-people li { display: flex; align-items: center; gap: 12px; padding: 6px 0; border-top: 1px solid rgba(239, 22, 101, 0.08); }
.campaign-filters-people li > span:first-child { flex: 1; min-width: 0; }
.campaign-filters-preview h4 { margin: 8px 0 4px; }
.campaign-filters-error { margin: 0; color: #b3261e; font-weight: 700; }
.campaign-filters-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 760px) { .campaign-filters-rule { grid-template-columns: 1fr; } }

/* Campaigns (campaigns.html) */
.campaigns-new { width: 100%; margin: 4px 0 8px; }
.campaigns-meter { display: grid; gap: 6px; padding: 8px 10px; border-radius: 12px; background: rgba(239, 22, 101, 0.06); font-size: 0.85rem; }
.campaigns-meter-bar { height: 6px; border-radius: 999px; background: #eceaec; overflow: hidden; }
.campaigns-meter-bar span { display: block; height: 100%; background: #d40755; }
.campaigns-card { padding: 14px 16px 16px; }
.campaigns-card h3 { margin: 0 0 8px; }
.campaigns-tabs { display: flex; gap: 4px; border-bottom: 1px solid rgba(124, 108, 118, 0.22); }
.campaigns-tab { margin: 0; padding: 10px 16px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #6d626b; font: inherit; font-weight: 800; cursor: pointer; }
.campaigns-tab.is-active { color: var(--accent-deep); border-bottom-color: #d40755; }
.campaigns-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 10px; }
.campaigns-tile { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid rgba(124, 108, 118, 0.22); border-radius: 14px; background: #fff; }
.campaigns-tile strong { font-size: 1.4rem; }
.campaigns-filter-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.campaigns-filter-row label { display: grid; gap: 4px; min-width: 150px; }
.campaigns-detail-line { display: block; }
.campaigns-chip-sending, .campaigns-chip-scheduled { background: rgba(32, 110, 190, 0.12); color: #1d5a99; }
.campaigns-chip-completed { background: rgba(30, 140, 80, 0.14); color: #1b6b3f; }
.campaigns-chip-paused, .campaigns-chip-needs_review, .campaigns-chip-partial { background: rgba(214, 140, 0, 0.16); color: #8a5a00; }
.campaigns-chip-failed, .campaigns-chip-canceled { background: rgba(179, 38, 30, 0.12); color: #b3261e; }
.campaigns-chip-draft { background: #eceaec; color: #6d626b; }
.campaigns-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.campaigns-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.campaigns-breadcrumb { color: #6d626b; font-weight: 700; }
.campaigns-breadcrumb a { color: var(--accent-deep); text-decoration: none; }
.campaigns-bubble { max-width: 460px; margin: 8px 0; padding: 12px 14px; border-radius: 18px 18px 18px 4px; background: #f6e9ee; white-space: pre-wrap; overflow-wrap: anywhere; }
.campaigns-bubble p { margin: 0; }
.campaigns-stepper { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.campaigns-step { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #eceaec; color: #6d626b; font-weight: 700; }
.campaigns-step span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; font-size: 0.8rem; }
.campaigns-step.is-active { background: #d40755; color: #fff; }
.campaigns-step.is-active span { color: #d40755; }
.campaigns-step.is-done { background: rgba(212, 7, 85, 0.12); color: var(--accent-deep); }
.campaigns-wizard { display: grid; gap: 12px; padding-bottom: 20px; }
.campaigns-field { display: grid; gap: 4px; max-width: 560px; }
.campaigns-field.hidden { display: none; }
.campaigns-field textarea { min-height: 130px; resize: vertical; }
.campaigns-counter-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 560px; }
.campaigns-counter { color: #6d626b; font-weight: 700; }
.campaigns-type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.campaigns-type { display: grid; gap: 4px; padding: 14px; border: 2px solid rgba(124, 108, 118, 0.22); border-radius: 14px; }
.campaigns-type.is-selected { border-color: #d40755; background: rgba(212, 7, 85, 0.05); }
.campaigns-type.is-disabled { opacity: 0.55; }
.campaigns-review { display: grid; grid-template-columns: minmax(260px, 2fr) minmax(0, 3fr); gap: 16px; align-items: start; }
.campaigns-review h4 { margin: 0 0 10px; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-deep); }
.campaigns-review-preview { padding: 16px; border-radius: 16px; background: #fbf5f7; border: 1px solid rgba(212, 7, 85, 0.12); position: sticky; top: 12px; }
.campaigns-review-preview .campaigns-bubble { background: #fff; box-shadow: 0 1px 2px rgba(116, 16, 59, 0.08); font-size: 0.98rem; line-height: 1.45; }
.campaigns-review-text-label { margin: 6px 0 2px 4px; font-size: 0.75rem; font-weight: 700; color: #6d626b; }
.campaigns-review-note { margin: 10px 0 0; font-size: 0.82rem; }
.campaigns-review-sections { display: grid; gap: 12px; }
.campaigns-review-people { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; background: rgba(212, 7, 85, 0.07); }
.campaigns-review-people strong { font-size: 1.6rem; line-height: 1.1; color: var(--accent-deep); }
.campaigns-review-people span { color: #6d626b; }
.campaigns-review-section { padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(124, 108, 118, 0.2); background: #fff; }
.campaigns-review-section .campaigns-details dd { font-weight: 600; }
.campaigns-review-section .campaigns-send-mode { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(124, 108, 118, 0.16); }
.campaigns-send-mode legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.campaigns-send-mode .campaigns-radio-row { gap: 10px; }
.campaigns-send-mode .campaigns-radio-row .campaigns-check { padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(124, 108, 118, 0.3); font-weight: 600; }
.campaigns-send-mode .campaigns-radio-row .campaigns-check:has(input:checked) { border-color: #d40755; background: rgba(212, 7, 85, 0.07); color: var(--accent-deep); }
.campaigns-review-repeat { margin: 14px 0 0; }
@media (max-width: 900px) { .campaigns-review { grid-template-columns: minmax(0, 1fr); } .campaigns-review-preview { position: static; } }
.campaigns-send-mode { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; }
.campaigns-bubbles { display: grid; gap: 2px; justify-items: start; }
.campaigns-bubbles .campaigns-bubble { margin: 0; }
.campaigns-details { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 10px 16px; margin: 0; align-items: start; }
.campaigns-details dt { color: var(--muted); }
.campaigns-details dd { margin: 0; display: grid; gap: 8px; justify-items: start; text-align: left; }
.campaigns-hours-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.campaigns-hours-row input[type="time"] { width: 9rem; padding: 8px 10px; }
.campaigns-check { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; cursor: pointer; }
.campaigns-check input[type="checkbox"], .campaigns-check input[type="radio"] { width: auto; margin: 0; padding: 0; }
.campaigns-radio-row { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.campaigns-send-mode .campaigns-field input[type="datetime-local"] { width: 16rem; padding: 8px 10px; }
@media (max-width: 560px) { .campaigns-details { grid-template-columns: minmax(0, 1fr); gap: 2px; } .campaigns-details dd { margin-bottom: 8px; } }
.campaigns-banner { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(32, 110, 190, 0.1); color: #1d5a99; font-weight: 700; }
.campaigns-banner.is-warn { background: rgba(214, 140, 0, 0.16); color: #8a5a00; }
.campaigns-unsaved { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(32, 110, 190, 0.08); }
.campaigns-unsaved-name { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.lead-bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 12px; }
.lead-bulk-bar .lead-bulk-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.lead-bulk-bar label.phone-system-chip { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.lead-bulk-select { margin-right: 8px; }
.campaigns-error { margin: 0; color: #b3261e; font-weight: 700; }
.campaigns-footer { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid rgba(124, 108, 118, 0.22); background: #fff; z-index: 5; }
.campaigns-footer-gap { flex: 1; }
.campaigns-confirm { max-width: 520px; }
.campaigns-confirm-body p { margin: 0 0 8px; }
.campaigns-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Campaign settings (admin-campaign-settings.html) */
.campaign-settings-form { display: grid; gap: 14px; max-width: 640px; }
.campaign-settings-section { display: grid; gap: 8px; padding: 16px; }
.campaign-settings-section h3 { margin: 0; font-size: 1.05rem; }
.campaign-settings-section p { margin: 0; }
.campaign-settings-section input, .campaign-settings-section select { max-width: 280px; }
.campaign-settings-error { color: #b42318; font-size: 0.9rem; }
.campaign-settings-actions { display: flex; justify-content: flex-end; }
.campaign-settings-sending { max-width: 640px; margin-bottom: 14px; box-sizing: border-box; }
.campaign-settings-sending-status { font-weight: 700; }
.campaign-settings-sending-status.is-on { color: #067647; }
.campaign-settings-sending-status.is-off { color: #b42318; }
.campaign-settings-sending .campaign-settings-actions { justify-content: flex-start; }
.campaign-settings-hours { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.campaign-settings-hours input { width: auto; }
.campaign-settings-section .campaign-settings-check { display: flex; align-items: center; gap: 8px; }
.campaign-settings-section .campaign-settings-check input { width: auto; margin: 0; }

/* Campaign detail: status rail + recipients table; campaign replies folder; system line */
.campaigns-detail-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 12px; }
.campaigns-rail { display: grid; gap: 2px; padding: 8px; }
.campaigns-rail-item { display: flex; justify-content: space-between; gap: 8px; margin: 0; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.campaigns-rail-item:hover { background: rgba(124, 108, 118, 0.1); }
.campaigns-rail-item.is-active { background: rgba(212, 7, 85, 0.1); color: var(--accent-deep); }
.campaigns-rail-count { color: #6d626b; font-variant-numeric: tabular-nums; }
/* "Waiting on us" / "We replied" under Replied, and the "We replied" cells (list + recipients). */
.campaigns-rail-item.is-sub { padding-left: 24px; font-weight: 600; font-size: 0.92em; }
.campaigns-rail-item.is-waiting .campaigns-rail-count { color: #b42318; font-weight: 800; }
.campaigns-answered { white-space: nowrap; font-weight: 700; }
.campaigns-answered.is-done { color: #1f7a4d; }
.campaigns-answered.is-waiting { color: #b42318; }
a.campaigns-answered.is-waiting { text-decoration: underline; }
/* Where we followed up: a small tag after "Texted" / "Archived" (Cerebro gray, Spruce blue). */
.campaigns-answered-where { display: inline-block; padding: 0 6px; border-radius: 999px; font-size: 0.78em; font-weight: 600;
  background: #f1f1f4; color: #4b5563; vertical-align: 1px; }
.campaigns-answered-where.is-spruce { background: #e0ecff; color: #1d4ed8; }
a.campaigns-answered-where:hover { text-decoration: underline; }
.campaigns-table-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.campaigns-table-head h3 { margin: 0; }
.campaigns-run-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 12px; }
.campaigns-row-link { cursor: pointer; }
.campaigns-row-link:hover td { background: rgba(212, 7, 85, 0.06); }
.campaigns-row-link:focus-visible { outline: 2px solid var(--accent-deep, #d40755); outline-offset: -2px; }
.campaigns-row-anchor { color: inherit; font-weight: 700; text-decoration: none; }
.campaigns-row-link:hover .campaigns-row-anchor, .campaigns-row-anchor:focus-visible { text-decoration: underline; }
.campaigns-reply-cell { max-width: 260px; }
.campaigns-reply-preview { display: block; max-width: 80ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.messaging-campaign-group { padding: 8px 12px 4px; color: #6d626b; font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.message-system-line { margin: 6px auto; padding: 4px 10px; max-width: 90%; border-radius: 999px; background: rgba(124, 108, 118, 0.12); color: #6d626b; font-size: 0.8rem; text-align: center; }
@media (max-width: 760px) { .campaigns-detail-body { grid-template-columns: 1fr; } .campaigns-rail { grid-auto-flow: column; overflow-x: auto; } }

/* Upload leads dialog (lead-csv-import.js): fixed head, scrolling body, footer pinned to the bottom. */
.lead-csv-modal { display: flex; flex-direction: column; width: min(760px, calc(calc(100 * var(--vw)) - 32px)); padding: 0; overflow: hidden; }
.lead-csv-modal > .lead-csv-head { position: relative; top: auto; flex: 0 0 auto; margin: 0; padding: 22px 28px 18px; border-bottom: 1px solid rgba(17, 17, 17, 0.08); box-shadow: none; }
.lead-csv-modal > .lead-csv-head h2, .lead-csv-modal > .lead-csv-head p { margin: 0; }
.lead-csv-modal > .lead-csv-head h2 { margin-top: 4px; }
.lead-csv-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 28px 0; }
.lead-csv-body > form, .lead-csv-body > div { display: grid; gap: 16px; }
.lead-csv-steps { display: flex; align-items: center; gap: 10px; list-style: none; margin: 0; padding: 0; }
.lead-csv-steps li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.lead-csv-steps li + li::before { content: ""; width: 32px; height: 2px; border-radius: 2px; background: rgba(228, 206, 217, 0.9); margin-right: 2px; }
.lead-csv-step-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(228, 206, 217, 0.9); background: #fff; font-size: 0.8rem; }
.lead-csv-steps li.is-active { color: var(--ink, #111); }
.lead-csv-steps li.is-active .lead-csv-step-num { border-color: var(--accent, #ef1665); background: var(--accent, #ef1665); color: #fff; }
.lead-csv-steps li.is-done .lead-csv-step-num { border-color: #12b76a; background: #12b76a; color: #fff; }
.lead-csv-section { display: grid; gap: 12px; }
.lead-csv-template { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 16px 18px; border-radius: 16px; border: 1px solid rgba(239, 22, 101, 0.14); background: rgba(239, 22, 101, 0.04); }
.lead-csv-template-copy { display: grid; gap: 6px; min-width: 0; }
.lead-csv-template-copy h3 { margin: 0; font-size: 1rem; }
.lead-csv-template-copy p { margin: 0; font-size: 0.88rem; }
.lead-csv-template p.lead-csv-columns { display: flex; flex-wrap: wrap; gap: 6px; }
.lead-csv-template code { font-size: 0.8rem; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(228, 206, 217, 0.9); background: #fff; white-space: nowrap; font-family: inherit; font-weight: 600; }
.lead-csv-template-button { width: auto; flex: 0 0 auto; justify-self: start; white-space: nowrap; }
.lead-csv-drop { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 16px; border: 2px dashed rgba(239, 22, 101, 0.28); background: #fffdfb; cursor: pointer; transition: border-color 150ms ease, background 150ms ease; }
.lead-csv-drop:hover, .lead-csv-drop.is-dragging { border-color: var(--accent, #ef1665); background: rgba(239, 22, 101, 0.04); }
.lead-csv-drop.has-file { border-style: solid; border-color: rgba(18, 183, 106, 0.5); background: rgba(18, 183, 106, 0.05); }
.lead-csv-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.lead-csv-drop-icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; background: rgba(239, 22, 101, 0.1); color: var(--accent, #ef1665); font-size: 1.2rem; font-weight: 700; }
.lead-csv-drop.has-file .lead-csv-drop-icon { background: rgba(18, 183, 106, 0.14); color: #067647; }
.lead-csv-drop-text { display: grid; gap: 2px; min-width: 0; }
.lead-csv-drop-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-csv-drop-text .muted { font-size: 0.85rem; }
.lead-csv-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.lead-csv-fields label { display: grid; gap: 6px; font-size: 0.9rem; font-weight: 600; }
.lead-csv-span-2 { grid-column: 1 / -1; }
.lead-csv-hint { color: var(--muted); font-size: 0.82rem; font-weight: 400; line-height: 1.35; }
.lead-csv-rule, .lead-csv-banner { margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(17, 17, 17, 0.035); color: var(--muted); font-size: 0.86rem; line-height: 1.4; }
.lead-csv-banner { background: rgba(247, 144, 9, 0.08); color: inherit; }
.lead-csv-banner.is-done { background: rgba(18, 183, 106, 0.08); }
.lead-csv-summary { font-size: 0.95rem; font-weight: 600; margin: 0 0 -6px; }
.lead-csv-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lead-csv-tile { display: grid; align-content: start; gap: 4px; padding: 14px; border-radius: 14px; border: 1px solid rgba(228, 206, 217, 0.8); background: #fff; }
.lead-csv-tile strong { font-size: 1.6rem; line-height: 1.1; }
.lead-csv-tile span { font-weight: 600; }
.lead-csv-tile small { color: var(--muted); font-size: 0.78rem; line-height: 1.35; }
.lead-csv-notes { margin: 0; padding-left: 18px; font-size: 0.9rem; display: grid; gap: 4px; }
.lead-csv-error { color: #b42318; margin: 0; flex: 1; font-size: 0.88rem; }
.lead-csv-footer { display: flex; gap: 12px; align-items: center; justify-content: space-between; position: sticky; bottom: 0; z-index: 2; margin: 4px -28px 0; padding: 14px 28px; border-top: 1px solid rgba(17, 17, 17, 0.08); background: #fff; }
.lead-csv-footer-buttons { display: flex; gap: 8px; margin-left: auto; }
.lead-csv-footer-buttons button { width: auto; white-space: nowrap; }
@media (max-width: 640px) {
  .lead-csv-tiles, .lead-csv-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-csv-fields { grid-template-columns: 1fr; }
  .lead-csv-template { flex-direction: column; align-items: stretch; }
  .lead-csv-body { padding: 16px 18px 0; }
  .lead-csv-footer { margin: 4px -18px 0; padding: 12px 18px; }
}

/* Inbox by account: Spruce-style sidebar (smart views, one row per account, collapsed legacy group). */
.messaging-account-smart {
  display: grid;
  border-bottom: 1px solid rgba(228, 206, 217, 0.46);
}

.messaging-account-smart .messaging-inbox-item {
  min-height: 44px;
}

.messaging-account-smart .messaging-inbox-item.active {
  padding-left: 18px;
  background: linear-gradient(90deg, rgba(239, 22, 101, 0.09), rgba(239, 22, 101, 0.015));
  box-shadow: inset 4px 0 0 var(--accent);
  color: var(--accent-deep);
}

.messaging-account-heading {
  margin: 0;
  padding: 10px 14px 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.messaging-account-group.is-expanded .messaging-inbox-subsections {
  max-height: 190px;
}

.messaging-legacy-group {
  display: grid;
  border-top: 1px solid rgba(228, 206, 217, 0.46);
}

.messaging-legacy-toggle {
  min-height: 48px;
}

.messaging-legacy-banner {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(239, 22, 101, 0.07);
  color: var(--accent-deep);
  font-size: 0.8rem;
}

.messaging-thread-account {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.messaging-composer-from {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.messaging-composer-from select {
  width: auto;
  max-width: 100%;
  min-height: 32px;
}

.messaging-no-accounts {
  display: grid;
  gap: 8px;
  padding: 28px;
  max-width: 560px;
  margin: 24px auto;
}

.messaging-no-accounts h2,
.messaging-no-accounts p {
  margin: 0;
}

.calls-account-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.calls-account-filter select {
  width: auto;
  min-height: 32px;
}

/* ---- Pages (round C): @ picker, page notes, Pages views ---- */
.page-composer {
  position: relative;
  display: block;
}

.page-composer-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.page-picker {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  display: grid;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(111, 28, 74, 0.14);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(116, 16, 59, 0.16);
}

.page-picker.hidden {
  display: none;
}

.page-picker-group {
  padding: 6px 10px 2px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-picker-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.page-picker-option:hover,
.page-picker-option.is-active {
  background: rgba(239, 22, 101, 0.08);
}

.page-picker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.page-picker-icon.is-team {
  background: rgba(225, 190, 74, 0.28);
  color: #6b5413;
}

.page-picker-icon.is-user {
  background: rgba(239, 22, 101, 0.12);
  color: var(--accent-deep);
}

.page-picker-copy {
  display: grid;
  min-width: 0;
}

.page-picker-copy small {
  color: var(--muted);
}

.page-mention-chip {
  display: inline-block;
  padding: 0 6px;
  border-radius: 8px;
  background: rgba(225, 190, 74, 0.34);
  color: #4a3a0c;
  font-weight: 800;
}

.message-internal-note-card.is-page {
  border-color: rgba(225, 160, 40, 0.6);
}

.message-internal-note-card.is-page-flash {
  animation: page-note-flash 2.4s ease-out;
}

@keyframes page-note-flash {
  0%, 40% { box-shadow: 0 0 0 4px rgba(239, 22, 101, 0.28); }
  100% { box-shadow: 0 10px 22px rgba(145, 112, 26, 0.09); }
}

.page-note-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.8rem;
}

.page-note-resolve {
  padding: 4px 12px;
  border: 1px solid rgba(111, 28, 74, 0.2);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-deep);
  font-weight: 700;
  cursor: pointer;
}

.page-note-resolve:hover {
  background: rgba(239, 22, 101, 0.08);
}

.page-note-resolved {
  color: #3b6b3a;
  font-weight: 700;
}

.page-note-open {
  color: var(--muted);
}

.page-note-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

.messaging-pages-count {
  background: #d92d20;
  color: #fff;
}

.pages-view {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
}

.pages-view.hidden {
  display: none;
}

.pages-view-header h2 {
  margin: 0;
}

.pages-mine-list .page-row {
  cursor: pointer;
}

.pages-mine-list .page-row.is-active {
  background:
    linear-gradient(135deg, rgba(239, 22, 101, 0.08), rgba(255, 190, 27, 0.18)),
    rgba(255, 250, 252, 0.95);
}

.pages-mine-list .page-row:focus-visible {
  outline: 2px solid var(--accent-deep, #c70f7e);
  outline-offset: -2px;
}

.pages-mine-list .page-row .messaging-thread-copy {
  grid-column: 2 / -1;
}

.pages-mine-list .messaging-thread-head {
  min-width: 0;
}

.pages-mine-list .messaging-thread-head strong {
  min-width: 0;
  flex: 1 1 auto;
}

.page-row-time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.74rem;
}

.pages-mine-list .messaging-thread-subhead {
  flex-wrap: nowrap;
  min-width: 0;
}

.pages-mine-list .messaging-thread-subhead > * {
  flex: 0 1 auto;
  min-width: 0;
}

.pages-mine-list .messaging-thread-subhead .contact-identity-chip,
.pages-mine-list .messaging-thread-subhead .page-row-count {
  flex: 0 0 auto;
}

.pages-mine-list .page-row-preview {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.page-row-author {
  color: var(--ink);
  font-weight: 600;
}

.page-row-mention {
  padding: 0 4px;
  border-radius: 6px;
  background: rgba(225, 190, 74, 0.34);
  color: #4a3a0c;
  font-weight: 700;
}

.page-row-statusline {
  margin-top: 2px;
  font-size: 0.74rem;
  min-width: 0;
}

.page-row-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
}

.page-row-status.is-open {
  color: #b42318;
  font-weight: 600;
}

.page-row-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #d92d20;
}

.page-row-count {
  padding: 0 8px;
  border-radius: 999px;
  background: #d92d20;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.pages-oversight-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pages-filter {
  position: relative;
  flex: 1 1 280px;
  max-width: 420px;
}

.pages-filter input {
  width: 100%;
}

.page-filter-chip {
  padding: 4px 10px;
  border: 1px solid rgba(111, 28, 74, 0.2);
  border-radius: 999px;
  background: rgba(225, 190, 74, 0.28);
  font-weight: 700;
  cursor: pointer;
}

.pages-status-toggle {
  display: inline-flex;
  gap: 6px;
}

.pages-status-toggle .is-active {
  background: var(--accent);
  color: #fff;
}

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

.page-table {
  width: 100%;
  border-collapse: collapse;
}

.page-table th {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(111, 28, 74, 0.14);
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.page-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(111, 28, 74, 0.08);
  vertical-align: top;
}

.page-table-row {
  cursor: pointer;
}

.page-table-row:hover,
.page-table-row:focus-visible {
  background: rgba(239, 22, 101, 0.04);
}

.page-table-conversation {
  display: grid;
  gap: 2px;
  min-width: 200px;
}

.page-table-conversation small,
.page-table-date,
.page-table-resolved {
  color: var(--muted);
  font-size: 0.8rem;
}

.page-table-date {
  white-space: nowrap;
}

.page-table-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.page-table-tag {
  padding: 0 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tag-color) 18%, #fff);
  color: var(--tag-color);
  font-size: 0.74rem;
  font-weight: 700;
}

.page-table-note {
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff9df, #fff2bd);
  color: #514219;
}

.pages-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.pages-empty {
  padding: 18px 4px;
}

/* ---- My leads (Sales > Leads) ---- */
.my-leads-shell { grid-template-columns: clamp(190px, calc(15 * var(--vw)), 240px) minmax(0, 1fr); }
.my-leads-pane { padding-top: 18px; }
.my-leads-nav-list { display: grid; gap: 2px; padding: 0 8px 16px 0; }
.my-leads-nav-item { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; padding: 6px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.my-leads-nav-item:hover, .my-leads-nav-item:focus-visible { background: rgba(242, 15, 98, 0.06); color: var(--accent-deep); }
.my-leads-nav-item.is-active { background: rgba(242, 15, 98, 0.1); color: var(--accent-deep); font-weight: 800; }
.my-leads-nav-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-leads-nav-count { font-size: 0.82rem; opacity: 0.75; }
.my-leads-nav-header { margin: 14px 12px 4px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.6; }
.contacts-filter-row { position: relative; }
.contacts-filter-dots { position: absolute; top: 0; bottom: 0; right: 6px; margin: auto 0; display: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; }
.contacts-filter-row:hover .contacts-filter-dots, .contacts-filter-row.is-menu-open .contacts-filter-dots, .contacts-filter-dots:focus-visible { display: block; }
.contacts-filter-row:hover .my-leads-nav-count, .contacts-filter-row.is-menu-open .my-leads-nav-count { visibility: hidden; }
.contacts-filter-dots:hover { background: rgba(0, 0, 0, 0.07); transform: none; opacity: 1; }
.contacts-filter-menu { position: absolute; top: calc(100% - 4px); right: 6px; z-index: 30; min-width: 120px; padding: 4px; border: 1px solid var(--line, #e4e7ec); border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(16, 24, 40, 0.14); }
.contacts-filter-menu button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.contacts-filter-menu button:hover { background: #f4f5f7; transform: none; opacity: 1; }
.contacts-filter-menu button.is-danger { color: #d92d20; }
.my-leads-nav-owner { margin: 2px 0 8px; padding: 7px 10px; width: 100%; border: 1px solid var(--line, #e4e7ec); border-radius: 8px; background: #fff; color: inherit; font: inherit; }
.my-leads-nav-new { margin: 6px 0 0; padding: 8px 12px; border: 0; background: transparent; color: var(--accent-deep); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.my-leads-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; }
.my-leads-detail { min-width: 0; padding: 18px 22px; }
.my-leads-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.my-leads-header h2 { margin: 0; font-size: 1.35rem; }
.my-leads-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.my-leads-search { min-width: 240px; }
.my-leads-selection-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(242, 15, 98, 0.07); font-weight: 700; }
.my-leads-link { border: 0; background: transparent; color: var(--accent-deep); font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }
.my-leads-table-wrap { overflow-x: auto; }
.my-leads-table { width: 100%; border-collapse: collapse; }
.my-leads-table th { padding: 8px 10px; border-bottom: 1px solid rgba(91, 77, 84, 0.18); font-size: 0.78rem; letter-spacing: 0.04em; text-align: left; text-transform: uppercase; opacity: 0.7; }
.my-leads-table td { padding: 10px; border-bottom: 1px solid rgba(91, 77, 84, 0.1); vertical-align: middle; }
.my-leads-table .my-leads-check { width: 36px; }
.my-leads-row { cursor: pointer; }
.my-leads-row:hover { background: rgba(242, 15, 98, 0.04); }
.my-leads-name { font-weight: 800; }
.my-leads-phone { white-space: nowrap; }
.my-leads-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.my-leads-table.is-loading tbody { opacity: 0.55; }
.my-leads-state { padding: 28px 10px; text-align: center; opacity: 0.8; }
.my-leads-error { color: #b42318; opacity: 1; }
.my-leads-chip { padding: 1px 9px; border-radius: 999px; background: color-mix(in srgb, var(--tag-color) 18%, #fff); color: var(--tag-color); font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.my-leads-chip-more { --tag-color: #667085; }
.my-leads-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.my-leads-overlay { position: fixed; inset: 0; z-index: 1500; display: grid; place-items: center; padding: 16px; background: rgba(35, 12, 22, 0.46); }
.my-leads-overlay.hidden { display: none; }
.my-leads-dialog { display: grid; gap: 12px; width: min(640px, 100%); max-height: calc(88 * var(--vh)); overflow: auto; padding: 22px; border-radius: 16px; background: #fff; box-shadow: 0 24px 60px rgba(35, 12, 22, 0.28); }
.my-leads-dialog-small { width: min(400px, 100%); }
.my-leads-dialog h3, .my-leads-dialog h4 { margin: 0; }
.my-leads-dialog-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.my-leads-tag-list { display: grid; gap: 4px; max-height: 280px; margin-top: 6px; overflow: auto; }
.my-leads-tag-option { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 2px; }
.my-leads-tag-option.is-locked { opacity: 0.6; }
.my-leads-tag-option small { flex-basis: 100%; padding-left: 26px; }
.my-leads-dialog-footer { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 760px) {
  .my-leads-shell { grid-template-columns: minmax(0, 1fr); }
  .my-leads-pane { position: static; min-height: 0; border-right: 0; }
  .my-leads-dialog-columns { grid-template-columns: 1fr; }
}

/* Contacts: Members (Hint) and Leads search, master-detail */
.contacts-shell { grid-template-columns: clamp(190px, calc(15 * var(--vw)), 240px) minmax(0, 1fr); }
.contacts-shell.has-detail { grid-template-columns: clamp(190px, calc(15 * var(--vw)), 240px) minmax(0, 1fr) minmax(340px, calc(30 * var(--vw))); }
.contacts-shell:not(.has-detail) .contacts-detail-pane { display: none; }
.contacts-pane { padding-top: 18px; }
.contacts-list-pane { display: flex; flex-direction: column; min-width: 0; padding: 18px 16px; border-right: 1px solid rgba(91, 77, 84, 0.16); }
.contacts-list-head { display: grid; gap: 8px; margin-bottom: 10px; }
.contacts-list-head h2 { margin: 0; font-size: 1.25rem; }
.contacts-crumb { margin: 0; font-size: 0.8rem; }
.contacts-search { width: 100%; min-width: 0; }
.contacts-sort { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.contacts-sort.hidden { display: none; }
.contacts-list { display: grid; align-content: start; gap: 0; min-height: 120px; }
.contacts-list.is-loading { opacity: 0.55; }
.contacts-row { display: grid; gap: 3px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid rgba(91, 77, 84, 0.1); border-radius: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.contacts-row:hover, .contacts-row:focus-visible { background: rgba(242, 15, 98, 0.05); }
.contacts-row.is-selected { background: rgba(242, 15, 98, 0.1); box-shadow: inset 4px 0 0 var(--accent); }
.contacts-row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.contacts-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.contacts-row-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; opacity: 0.8; }
.contacts-row-shared { font-size: 0.78rem; color: var(--accent-deep); font-weight: 700; }
.contacts-state { display: grid; justify-items: center; gap: 12px; padding: 28px 10px; text-align: center; opacity: 0.85; }
.contacts-state p { margin: 0; }
.contacts-error { color: #b42318; opacity: 1; }
.contacts-pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.contacts-pager .muted { margin-right: auto; }
.contacts-page-size { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted, #667085); }
.contacts-page-size select { padding: 4px 8px; }
/* Shared pager look (same as the PX Members Panel): range on the left, then "Rows per page", Previous, Next.
   The global label/select/button rules (grid labels, 100%-wide controls) must never reach into a pager. */
:is(.contacts-pager, .my-leads-pager, .campaigns-pager, .outbound-pager) { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; }
:is(.contacts-pager, .my-leads-pager, .campaigns-pager, .outbound-pager) .muted { white-space: nowrap; color: #66555f; font-size: 13px; }
:is(.contacts-pager, .my-leads-pager, .campaigns-pager, .outbound-pager) > .muted:first-child { margin-right: auto; }
:is(.contacts-pager, .my-leads-pager, .campaigns-pager, .outbound-pager) label { display: inline-flex; align-items: center; gap: 6px; width: auto; margin: 0; white-space: nowrap; font-size: 13px; color: #66555f; }
:is(.contacts-pager, .my-leads-pager, .campaigns-pager, .outbound-pager) select { width: auto; min-height: 34px; padding: 4px 28px 4px 12px; border: 1px solid rgba(91, 77, 84, 0.22); border-radius: 10px; background-color: #fff; color: #2d2d3a; font-size: 13px; font-weight: 700; }
:is(.contacts-pager, .my-leads-pager, .campaigns-pager, .outbound-pager) button { width: auto; flex: 0 0 auto; min-height: 36px; padding: 6px 16px; border: 1px solid rgba(239, 22, 101, 0.14); border-radius: 999px; background: rgba(255, 255, 255, 0.94); color: #b30f52; box-shadow: 0 10px 22px rgba(116, 16, 59, 0.08); font-size: 13px; font-weight: 800; white-space: nowrap; }
:is(.contacts-pager, .my-leads-pager, .campaigns-pager, .outbound-pager) button:disabled { opacity: 0.5; cursor: not-allowed; }
/* Short labels never break onto two lines (scripts/qa/qa-layout-audit.js "wrapped"): buttons, chips, tags. */
.button-primary, .button-secondary, .chip, .user-badge, .patient-descriptive-tag, .calls-routing-tag, .team-group-member-chip { white-space: nowrap; }
/* Empty-state actions are sized to their label, not stretched across the card ("stretched"). */
.campaign-filters-empty .button-primary { width: auto; justify-self: start; }
/* Shared inbox detail: the overview's two columns stack when the panel is narrow instead of being cut off ("clipped"). */
/* Right sidebar header buttons ("Crear tarea" / "Ver todas las tareas"): a row that wraps instead of two fixed
   columns that longer (Spanish) labels spill out of ("overflow"). */
.sidebar-task-header-actions, .sidebar-call-header-actions { display: flex; flex-wrap: wrap; }
:is(.sidebar-task-header-actions, .sidebar-call-header-actions) > .sidebar-task-header-button { flex: 1 1 auto; width: auto; padding-inline: 14px; }
.outbound-outcome-new [data-action="add"] { width: auto; justify-self: start; }
#settingsAccountSaveButton { white-space: nowrap; }
.settings-account-actions { display: flex; flex-wrap: wrap; }
.settings-account-actions > button { flex: 0 0 auto; width: auto; }
/* Card headers and card action rows: buttons sized to their label at any width (1920px audit "stretched"). */
.sms-accounts-card-head > button { width: auto; flex: 0 0 auto; white-space: nowrap; }
.settings-reset-request-action { min-width: max-content; }
.messaging-page .messaging-thread-title-button { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-inbox-detail { container-type: inline-size; }
@container (max-width: 720px) {
  .admin-inbox-overview { grid-template-columns: minmax(0, 1fr); }
}
.contacts-detail-pane { min-width: 0; padding: 18px 22px; }
.contacts-detail-head { display: grid; gap: 6px; margin-bottom: 14px; }
.contacts-detail-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.contacts-detail-title h3 { margin: 0; font-size: 1.4rem; }
.contacts-detail-head p { margin: 0; }
.contacts-detail-actions { margin-top: 6px; }
.contacts-card { margin-bottom: 14px; padding: 14px 16px; border: 1px solid rgba(91, 77, 84, 0.14); border-radius: 14px; background: #fff; }
.contacts-card h4 { margin: 0 0 8px; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; }
.contacts-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 18px; margin: 0; }
.contacts-field dt { font-size: 0.76rem; opacity: 0.65; }
.contacts-field dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.contacts-note { margin: 10px 0 0; font-size: 0.85rem; }
.contacts-notice { margin: 0 0 12px; font-weight: 700; }
.contacts-link-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.contacts-link { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; padding: 8px 6px; border: 0; border-radius: 8px; background: transparent; color: var(--accent-deep); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.contacts-link:hover, .contacts-link:focus-visible { background: rgba(242, 15, 98, 0.07); }
.contacts-link small { flex-basis: 100%; color: var(--text); font-weight: 400; opacity: 0.7; }
.topbar-lead-search-group { display: grid; gap: 6px; }
.topbar-lead-search-group-title { margin: 4px 6px 0; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.topbar-lead-search-all strong { color: var(--accent-deep); }
@media (max-width: 1100px) {
  .contacts-shell { grid-template-columns: minmax(0, 1fr); }
  .contacts-pane { position: static; min-height: 0; border-right: 0; }
  .contacts-list-pane { border-right: 0; }
}
/* Departments, All employees list and employee-card Teams / Delete user (Teams admin) */
.team-roster-split-layout.is-all-employees { grid-template-columns: minmax(180px, 230px) minmax(0, 1fr); }
.team-roster-department-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid rgba(17, 17, 17, 0.08); border-radius: 14px; background: rgba(255, 255, 255, 0.94); }
.team-roster-department-card-copy { display: grid; gap: 2px; min-width: 0; }
.team-roster-department-card-copy small { overflow: hidden; color: var(--muted); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.team-roster-department-card-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-roster-department-edit { flex: none; width: auto; min-height: 0; padding: 6px 14px; }
/* Lead search inside the Add/Edit team forms: keep the icon inline, not on its own line. */
.team-create-form label.topbar-lead-search-field { display: flex; }
.team-create-form label.topbar-lead-search-field > .topbar-lead-search-icon { display: inline-block; margin: 0; }
.team-roster-employees-content { grid-template-rows: auto minmax(0, 1fr); }
.employee-list-toolbar { display: flex; align-items: center; gap: 12px; min-width: 0; }
.employee-list-toolbar .team-roster-search-field { flex: 1 1 auto; }
.employee-list-status-filter { display: flex; align-items: center; gap: 8px; flex: none; color: var(--muted); font-size: 0.82rem; font-weight: 700; }
.employee-list-status-filter select { min-height: 40px; border-radius: 999px; padding: 6px 14px; }
.employee-list { display: grid; align-content: start; gap: 8px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.employee-list-count { margin: 0; color: var(--muted); font-size: 0.82rem; }
.employee-list-row { display: grid; grid-template-columns: 44px minmax(150px, 1.3fr) minmax(90px, 0.8fr) minmax(100px, 0.9fr) minmax(140px, 1.6fr) auto; align-items: center; gap: 14px; width: 100%; margin: 0; padding: 10px 14px; border: 1px solid rgba(17, 17, 17, 0.08); border-radius: 16px; background: rgba(255, 255, 255, 0.94); color: var(--ink); text-align: left; font: inherit; box-shadow: none; }
.employee-list-row:hover, .employee-list-row:focus-visible { border-color: rgba(239, 22, 101, 0.3); background: rgba(255, 249, 251, 0.98); transform: none; box-shadow: none; }
.employee-list-person { display: grid; gap: 2px; min-width: 0; }
.employee-list-person strong, .employee-list-person small, .employee-list-role, .employee-list-department { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.employee-list-person small, .employee-list-role, .employee-list-department { color: var(--muted); font-size: 0.84rem; }
.employee-list-teams { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.employee-list-chip { padding: 3px 10px; border-radius: 999px; background: rgba(17, 17, 17, 0.06); color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.employee-list-chip.is-main { background: rgba(239, 22, 101, 0.1); color: var(--accent-deep); }
.employee-list-more { justify-self: center; }
.roster-dialog-choice-list, .team-settings-lead-choices { max-height: 320px; overflow-y: auto; padding-right: 4px; }
.team-settings-lead { display: grid; gap: 8px; }
.team-settings-lead-label { color: var(--muted); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.team-create-detail .team-roster-search-field { margin-bottom: 12px; }
.employee-card-team-tag.is-secondary { font-size: 0.78rem; opacity: 0.9; }
.employee-card-teams-card { display: grid; gap: 10px; margin-top: 18px; padding: 16px 18px; border: 1px solid rgba(17, 17, 17, 0.08); border-radius: 18px; background: rgba(255, 255, 255, 0.94); }
.employee-card-teams-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.employee-card-teams-head h3 { margin: 0; }
.employee-card-teams-edit { min-height: 0; padding: 6px 16px; }
.employee-card-team-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.employee-card-team-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.employee-card-team-list li > span:first-child { display: grid; gap: 2px; min-width: 0; }
.employee-card-team-list small, .employee-card-teams-note { color: var(--muted); }
.employee-card-teams-note { margin: 0; font-size: 0.84rem; }
.employee-card-main-badge { padding: 3px 10px; border-radius: 999px; background: rgba(239, 22, 101, 0.1); color: var(--accent-deep); font-size: 0.74rem; font-weight: 800; }
.employee-card-dialog-overlay { z-index: 1700; }
.employee-card-teams-modal { display: grid; gap: 14px; }
.employee-card-teams-list { display: grid; gap: 14px; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.employee-card-teams-group { display: grid; gap: 6px; }
.employee-card-teams-group h4 { margin: 0; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; }
.employee-card-teams-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid rgba(17, 17, 17, 0.08); border-radius: 14px; background: rgba(255, 255, 255, 0.94); }
.employee-card-teams-option.is-selected { border-color: rgba(239, 22, 101, 0.32); background: rgba(239, 22, 101, 0.05); }
.employee-card-teams-check, .employee-card-teams-main { display: flex; align-items: center; gap: 8px; margin: 0; }
.employee-card-teams-main { color: var(--muted); font-size: 0.82rem; }
.employee-card-delete-card { margin-top: 16px; }
.employee-card-delete-button, .employee-card-delete-confirm { width: fit-content; min-width: 230px; border-color: rgba(191, 42, 65, 0.4); color: #b5233c; }
.employee-card-delete-confirm { background: #b5233c; color: #fff; }
.employee-card-delete-confirm:disabled { opacity: 0.45; }
@media (max-width: 900px) {
  .employee-list-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .employee-list-role, .employee-list-department, .employee-list-teams { grid-column: 2 / -1; }
}

/* ---- Calls merged into Messages: the Missed calls group and view ---- */
.messaging-missed-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.messaging-missed-settings-link {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
}

.messaging-missed-settings-link svg {
  width: 16px;
  height: 16px;
}

.messaging-missed-settings-link:hover,
.messaging-missed-settings-link:focus-visible {
  background: rgba(239, 22, 101, 0.08);
  color: var(--accent-deep);
  outline: none;
}

.messaging-missed-settings-link.hidden {
  display: none;
}

.messaging-missed-count {
  background: #d92d20;
  color: #fff;
}

.messaging-missed-count.is-quiet {
  background: rgba(91, 77, 84, 0.12);
  color: var(--muted);
}

.messaging-missed-count.hidden {
  display: none;
}

.messaging-page .messaging-single-shell.is-missed-mode {
  grid-template-columns: minmax(150px, 185px) minmax(340px, 460px) minmax(0, 1fr);
}

.missed-calls-view {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
}

.missed-calls-view.hidden {
  display: none;
}

.missed-calls-view .pages-view-header h2 {
  margin: 0;
}

.missed-calls-host,
.missed-calls-toolbar,
.missed-calls-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.missed-calls-toolbar .calls-account-filter {
  margin: 0;
}

.missed-calls-scope-toolbar {
  flex-wrap: wrap;
  justify-content: flex-start;
  min-height: 0;
  margin: 0;
}

.missed-calls-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.missed-calls-group {
  display: grid;
  min-width: 0;
  border: 1px solid rgba(91, 77, 84, 0.14);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.missed-calls-group-head {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px 10px 18px;
  border: 0;
  border-bottom: 1px solid rgba(242, 15, 98, 0.12);
  border-radius: 0;
  background: rgba(242, 15, 98, 0.04);
  color: inherit;
  font: inherit;
  text-align: left;
}

button.missed-calls-group-head {
  cursor: pointer;
}

.missed-calls-open-hint {
  flex: none;
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.missed-calls-group-cards {
  display: grid;
  gap: 0;
}

.missed-calls-group-cards .calls-missed-card:last-child {
  border-bottom: 0;
}

.calls-moved-panel {
  display: grid;
  gap: 8px;
  max-width: 560px;
  margin: 48px auto;
  padding: 24px;
}

.calls-moved-panel h2,
.calls-moved-panel p {
  margin: 0;
}

.message-call-followup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 2px;
}

/* ---- Missed calls in the Messages list column: no thread header or search, compact filters and cards ---- */
.messaging-page .messaging-single-shell.is-missed-mode #messageListToolbar,
.messaging-page .messaging-single-shell.is-missed-mode #messageThreadSection {
  display: none;
}

.missed-calls-view {
  gap: 8px;
  padding: 10px 12px;
}

.missed-calls-view .pages-view-header h2 {
  font-size: 1.15rem;
}

.missed-calls-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.missed-calls-toolbar .calls-account-filter {
  gap: 6px;
  font-size: 0.78rem;
}

.missed-calls-toolbar .calls-account-filter select {
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.8rem;
}

.missed-calls-scope-toolbar {
  flex: 1 1 auto;
  min-width: 0;
  gap: 6px;
  z-index: auto;
}

.missed-calls-scope-toolbar .reports-section-scope-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.missed-calls-view .reports-section-scope-tag,
.missed-calls-view .reports-change-scope-button {
  min-height: 26px;
  padding: 0 10px 0 6px;
  font-size: 0.74rem;
  gap: 6px;
}

.missed-calls-view .reports-section-scope-tag .pipeline-board-selected-tag-icon {
  width: 18px;
  height: 18px;
}

.missed-calls-controls {
  gap: 6px;
}

.missed-calls-controls .calls-widget-search-input {
  min-height: 32px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.missed-calls-controls .calls-sort-toggle-button {
  min-height: 32px;
  padding: 0 12px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.missed-calls-view .calls-missed-card {
  gap: 8px;
  padding: 10px 14px 12px;
}

.missed-calls-view .calls-missed-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 8px;
}

.missed-calls-view .calls-missed-identity,
.missed-calls-view .calls-missed-header-trailing,
.missed-calls-view .calls-missed-meta {
  display: contents;
}

.missed-calls-view .calls-missed-followup-state {
  grid-column: 1;
  grid-row: 1;
  min-height: 22px;
  font-size: 0.7rem;
  white-space: nowrap;
}

.missed-calls-view .calls-missed-meta > span:first-child {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.missed-calls-view .calls-missed-card-menu {
  grid-column: 3;
  grid-row: 1;
}

.missed-calls-view .calls-missed-title {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 2px 0 0;
  font-size: 0.98rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.missed-calls-view .calls-missed-identity .calls-missed-phone {
  grid-column: 1 / -1;
  grid-row: 3;
  margin: 0;
  font-size: 0.8rem;
}

.missed-calls-view .calls-missed-tags {
  grid-column: 1 / -1;
  grid-row: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.missed-calls-view .calls-missed-tags .calls-routing-tag {
  max-width: 100%;
  min-height: 22px;
  font-size: 0.72rem;
}

.missed-calls-view .calls-missed-transcript-preview {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 0.84rem;
  line-height: 1.4;
}

.missed-calls-view .calls-missed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.missed-calls-view .calls-missed-actions > button {
  flex: 1 1 110px;
  min-width: 0;
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.82rem;
}

/* ---- Contact filters (Contacts sidebar group, dialog, filter view) ---- */
.contact-filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.contact-filter-bar.hidden { display: none; }
.contact-filter-bar:empty { display: none; }
.contact-filter-select { display: grid; gap: 2px; min-width: 0; font-size: 0.82rem; }
.contact-filter-select > span { font-weight: 700; opacity: 0.7; }
.contact-filter-select select { max-width: 190px; }
.contact-filter-select-wide { flex: 1 1 100%; }
.contact-filter-save-as { margin-left: auto; }
.contact-filter-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.contact-filter-head.hidden { display: none; }
.contact-filter-count { margin: 0; font-weight: 700; }
.contact-filter-warning { flex-basis: 100%; margin: 0; font-size: 0.82rem; font-weight: 700; color: #b54708; }
.contact-filter-actions { display: flex; align-items: center; gap: 8px; }
.contact-filter-new-campaign { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 22px; border-radius: 999px; background: linear-gradient(135deg, var(--accent), var(--accent-deep)); color: #fff; font-weight: 800; white-space: nowrap; text-decoration: none; box-shadow: 0 8px 20px rgba(242, 15, 98, 0.22); }
.contact-filter-new-campaign:hover, .contact-filter-new-campaign:focus-visible { color: #fff; filter: brightness(1.05); }
.contact-filter-new-campaign.is-disabled { opacity: 0.5; cursor: not-allowed; pointer-events: auto; }
.contact-filter-selection { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 6px; padding: 8px 12px; border-radius: 10px; background: rgba(242, 15, 98, 0.07); font-weight: 700; }
.contact-filter-selection.hidden { display: none; }
.contact-filter-selected-count { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }
/* Spruce-style contact table: checkbox | Full name | Contact tags; the detail pane opens on the right only when a row is selected. */
.contacts-list-head { grid-template-columns: minmax(0, 1fr); }
.contacts-list { gap: 0; }
.contacts-trow { display: grid; grid-template-columns: 40px minmax(180px, 1.1fr) minmax(0, 2fr); align-items: center; column-gap: 10px; padding: 9px 12px; border-bottom: 1px solid rgba(91, 77, 84, 0.1); cursor: pointer; }
.contacts-trow:hover { background: rgba(242, 15, 98, 0.05); }
.contacts-trow.is-selected { background: rgba(242, 15, 98, 0.1); box-shadow: inset 4px 0 0 var(--accent); }
.contacts-thead { position: sticky; top: 0; z-index: 1; padding-top: 7px; padding-bottom: 7px; border-bottom: 1px solid rgba(91, 77, 84, 0.22); background: #fff; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); cursor: default; }
.contacts-thead:hover { background: #fff; }
.contacts-tcell { min-width: 0; }
.contacts-tcell-check input[type="checkbox"] { width: 16px; height: 16px; margin: 0; padding: 0; cursor: pointer; }
.contacts-tcell-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.contacts-tcell-name .contacts-row-name { max-width: 100%; }
.contacts-tcell-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.contacts-trow.is-omitted .contacts-row-name { opacity: 0.65; }
.contact-filter-omitted { flex-basis: 100%; font-size: 0.78rem; }
.contacts-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.contacts-detail-pane { position: relative; border-left: 1px solid rgba(91, 77, 84, 0.16); }
.contacts-detail-close { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--text); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.contacts-detail-close:hover, .contacts-detail-close:focus-visible { background: rgba(242, 15, 98, 0.1); }
.contacts-detail-pane .contacts-detail-head { padding-right: 40px; }
.contacts-list-pane { border-right: 0; }
/* The selected contact opens in a drawer over the table, so the table keeps its full width (Spruce). */
.contacts-shell.has-detail { grid-template-columns: clamp(190px, calc(15 * var(--vw)), 240px) minmax(0, 1fr); }
.contacts-shell.has-detail .contacts-detail-pane { position: fixed; top: 84px; right: 16px; bottom: 16px; z-index: 40; width: min(440px, calc(calc(100 * var(--vw)) - 32px)); overflow: auto; border: 1px solid rgba(91, 77, 84, 0.16); border-radius: 16px; background: #fff; box-shadow: -16px 0 40px rgba(35, 12, 22, 0.18); }
.contacts-tcell-tags { flex-wrap: nowrap; overflow: hidden; }
.contacts-tcell-tags > * { flex: 0 0 auto; }
.contacts-tcell-tags > :not(:last-child) { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) {
  .contacts-trow { grid-template-columns: 32px minmax(0, 1fr); }
  .contacts-trow .contacts-tcell-tags { grid-column: 2; }
}
/* Contacts > Leads > Uploads: full-width history table (Date ... Tag). */
.contacts-search.hidden, .contacts-pager .contacts-page-size.hidden { display: none; }
.contacts-trow.contacts-uploads-row { grid-template-columns: minmax(150px, 1.1fr) minmax(110px, 1.2fr) minmax(90px, 1fr) minmax(110px, 1.1fr) minmax(90px, 1fr) 52px 66px 84px 66px minmax(120px, 1fr); }
.contacts-uploads-row .contacts-tcell { overflow: hidden; text-overflow: ellipsis; font-size: 0.88rem; }
.contacts-uploads-row.is-static { cursor: default; }
.contacts-uploads-num { font-variant-numeric: tabular-nums; font-weight: 700; }
.contacts-uploads-button { width: auto; }
@media (max-width: 1100px) {
  .contacts-trow.contacts-uploads-row { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 4px; }
}
.contact-filter-modal { max-width: 720px; width: min(720px, calc(94 * var(--vw))); max-height: calc(92 * var(--vh)); overflow: auto; }
.contact-filter-modal label { display: grid; gap: 4px; }
.contact-filter-section { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid rgba(91, 77, 84, 0.14); }
.contact-filter-section h4 { margin: 0; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.7; }
.contact-filter-tag-rules { display: grid; gap: 10px; }
.contact-filter-tag-rule { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.contact-filter-groups { display: grid; gap: 14px; }
.contact-filter-group { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.contact-filter-group legend { padding: 0; margin-bottom: 4px; font-weight: 800; }
.contact-filter-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 18px; justify-items: start; }
.contact-filter-modal label.contact-filter-check { display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px; width: auto; max-width: 100%; padding: 3px 0; cursor: pointer; }
.contact-filter-modal label.contact-filter-check input[type="checkbox"] { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; padding: 0; }
.contact-filter-check span { min-width: 0; line-height: 1.25; text-align: left; overflow-wrap: anywhere; }
.contact-filter-tag-rule select { width: auto; min-width: 130px; }
.contact-filter-tag-rule > button { width: auto; min-width: 38px; align-self: start; padding: 10px 12px; line-height: 1; }
.contact-filter-error { margin: 0; color: #b42318; font-weight: 700; }
.contact-filter-error.hidden, .contact-filter-other.hidden { display: none; }
.contact-filter-picker { display: grid; gap: 4px; min-width: 0; }
.contact-filter-picker-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px 6px; border: 1px solid rgba(91, 77, 84, 0.3); border-radius: 10px; background: #fff; }
.contact-filter-picker-input { flex: 1 1 120px; min-width: 100px; border: 0; outline: 0; background: transparent; font: inherit; }
.contact-filter-picker-list { display: none; max-height: 190px; overflow: auto; border: 1px solid rgba(91, 77, 84, 0.2); border-radius: 10px; background: #fff; }
.contact-filter-picker:focus-within .contact-filter-picker-list { display: grid; }
.contact-filter-picker-group { margin: 0; padding: 6px 10px 2px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.6; }
.contact-filter-picker-option { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.contact-filter-picker-option:hover, .contact-filter-picker-option:focus-visible { background: rgba(242, 15, 98, 0.07); }
.contact-filter-picker-empty { margin: 0; padding: 8px 10px; }
@media (max-width: 760px) {
  .contacts-shell.has-detail { grid-template-columns: minmax(0, 1fr); }
  .contact-filter-tag-rule { grid-template-columns: minmax(0, 1fr); }
}

.outbound-outcomes-list { display: grid; gap: 8px; margin-top: 12px; }
.outbound-outcome-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line, #e3e3e8); border-radius: 10px; background: #fff; }
.outbound-outcome-row.is-inactive { opacity: 0.55; }
.outbound-outcome-row input[type="text"] { flex: 1 1 180px; min-width: 0; }
.outbound-outcome-row input[type="color"] { width: 36px; height: 30px; padding: 0; border: 0; background: none; }
.outbound-outcome-handle { cursor: grab; color: #8a8a96; user-select: none; width: 18px; text-align: center; }
.outbound-outcome-check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.outbound-outcome-check input { accent-color: var(--accent); }
.outbound-outcome-error { flex-basis: 100%; margin: 0; color: #b42318; font-size: 13px; }
.outbound-outcome-error.hidden { display: none; }
/* Outbound Mode: color-coded lead table (Contacts > filter) and the lead card on the right. */
.contacts-shell.has-outbound-card { grid-template-columns: clamp(190px, calc(15 * var(--vw)), 240px) minmax(0, 1fr); }
/* Keep the list pane (header buttons, outcome filter) clear of the 420px drawer. */
.contacts-shell.has-outbound-card .contacts-list-pane { padding-right: 436px; }
.outbound-card[hidden] { display: none; }
/* The lead card is a drawer over the right sidebar column (same pattern as .contacts-detail-pane), so the table keeps its width. */
.contacts-shell.has-outbound-card .outbound-card { position: fixed; top: 84px; right: 16px; bottom: 16px; z-index: 40; box-sizing: border-box; width: min(420px, calc(calc(100 * var(--vw)) - 32px)); overflow: auto; border: 1px solid rgba(91, 77, 84, 0.16); border-radius: 16px; background: #fff; box-shadow: -16px 0 40px rgba(35, 12, 22, 0.18); }
.contact-filter-actions > .contact-filter-outbound, .contact-filter-actions > [data-cf-random], .contact-filter-actions > [data-cf-random-redo], .contact-filter-actions > [data-cf-random-next], .contact-filter-actions > [data-cf-random-exit] { flex: 0 0 auto; width: auto; white-space: nowrap; }
.outbound-toolbar { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.outbound-status-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.outbound-status-chip { width: auto; padding: 6px 14px; border: 1px solid rgba(91, 77, 84, 0.22); border-radius: 999px; background: #fff; color: var(--ink, #1d1d1f); font: inherit; font-weight: 700; white-space: nowrap; cursor: pointer; }
.outbound-status-chip:hover { background: rgba(242, 15, 98, 0.06); }
.outbound-status-chip.is-active { border-color: var(--accent); background: rgba(242, 15, 98, 0.1); color: var(--accent-deep); }
.outbound-status-count { margin-left: 4px; font-weight: 600; opacity: 0.75; }
.outbound-outcome-filter { position: relative; }
.outbound-outcome-filter > summary { padding: 6px 14px; border: 1px solid rgba(91, 77, 84, 0.22); border-radius: 999px; background: #fff; font-weight: 700; cursor: pointer; list-style: none; }
.outbound-outcome-filter > summary::-webkit-details-marker { display: none; }
.outbound-outcome-filter > summary::after { content: " \25BE"; }
.outbound-outcome-menu { position: absolute; right: 0; z-index: 30; display: grid; gap: 4px; min-width: 200px; margin-top: 4px; padding: 10px 12px; border: 1px solid rgba(91, 77, 84, 0.16); border-radius: 12px; background: #fff; box-shadow: 0 12px 30px rgba(35, 12, 22, 0.16); }
.outbound-outcome-option { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.outbound-outcome-option input { accent-color: var(--accent); }
.outbound-outcome-dot { width: 10px; height: 10px; border-radius: 50%; background: #c8c2c6; }
.outbound-scroll { overflow-x: auto; }
.outbound-scroll.is-loading { opacity: 0.55; }
.outbound-table { min-width: 980px; }
.outbound-trow { display: grid; grid-template-columns: minmax(160px, 1.4fr) 130px minmax(120px, 1.1fr) 120px 120px 110px 140px 70px; align-items: center; column-gap: 10px; padding: 9px 12px 9px 16px; border-bottom: 1px solid rgba(91, 77, 84, 0.1); cursor: pointer; }
.outbound-trow:not(.outbound-thead):hover { background: rgba(242, 15, 98, 0.05); }
.outbound-trow.is-contacted { background: color-mix(in srgb, var(--outcome-color, transparent) 14%, #fff); box-shadow: inset 4px 0 0 var(--outcome-color, transparent); }
.outbound-trow.is-contacted:hover { background: color-mix(in srgb, var(--outcome-color, transparent) 24%, #fff); }
.outbound-trow.is-selected { outline: 2px solid var(--accent); outline-offset: -2px; }
.outbound-trow.is-gone { opacity: 0.55; cursor: default; }
.outbound-thead { cursor: default; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; color: #5b4d54; }
.outbound-sort-btn { padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.outbound-sort-arrow { margin-left: 4px; font-size: 0.7rem; color: var(--accent); }
.outbound-tcell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outbound-tcell-name { display: flex; align-items: center; gap: 4px 8px; flex-wrap: nowrap; white-space: nowrap; }
.outbound-tcell-name > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.outbound-tcell-name > .outbound-new-badge { flex: 0 0 auto; }
.outbound-tcell-tags { display: flex; align-items: center; gap: 4px; }
.outbound-tcell-tags > * { flex: 0 0 auto; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.outbound-tcell-count { text-align: right; }
.outbound-new-badge { padding: 1px 8px; border-radius: 999px; background: rgba(242, 15, 98, 0.12); color: var(--accent-deep); font-size: 0.72rem; font-weight: 800; }
.outbound-outcome-chip { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--outcome-color, #e6e0e3); color: var(--outcome-ink, #1d1d1f); font-size: 0.78rem; font-weight: 700; }
.outbound-trow.is-contacted .outbound-outcome-chip { background: var(--outcome-color); color: var(--outcome-ink, #1d1d1f); }
.outbound-contact-kind { display: inline-block; width: 1.2em; text-align: center; color: #5b4d54; }
.outbound-contact-kind.contact-kind-call { color: #1b5e20; }
.outbound-contact-kind.contact-kind-message { color: #1d4ed8; }
.outbound-contact-kind.contact-kind-outbound { color: var(--accent-deep); }
.outbound-gone { flex-basis: auto; }
.outbound-pager { margin-top: 8px; }
.outbound-card { position: relative; min-width: 0; padding: 18px 22px; border-left: 1px solid rgba(91, 77, 84, 0.16); overflow: auto; }
.outbound-card-head h3 { margin: 0 0 4px; padding-right: 36px; font-size: 1.15rem; }
.outbound-card-phone { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font-weight: 700; }
.outbound-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.outbound-card-section { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(91, 77, 84, 0.12); }
.outbound-card-section h4 { margin: 0 0 8px; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; }
.outbound-history { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.outbound-history-note { margin: 2px 0 0; font-size: 0.86rem; white-space: pre-wrap; }
.outbound-outcome-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.outbound-outcome-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 2px solid var(--outcome-color, #c8c2c6); border-radius: 12px; background: color-mix(in srgb, var(--outcome-color, #c8c2c6) 16%, #fff); font: inherit; font-weight: 700; color: #1d1d1f; cursor: pointer; }
.outbound-outcome-btn kbd { padding: 0 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.7); font: inherit; font-size: 0.72rem; }
.outbound-outcome-btn.is-selected { background: var(--outcome-color); color: var(--outcome-ink, #1d1d1f); box-shadow: 0 0 0 3px rgba(242, 15, 98, 0.25); }
.outbound-outcome-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.outbound-note { display: grid; gap: 4px; margin-top: 12px; font-weight: 700; }
.outbound-note textarea { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid rgba(91, 77, 84, 0.3); border-radius: 10px; font: inherit; font-weight: 400; resize: vertical; }
.outbound-card-warning { margin: 10px 0 0; font-size: 0.86rem; font-weight: 700; color: #b54708; }
.outbound-card-error { margin: 10px 0 0; font-size: 0.86rem; font-weight: 700; color: #b42318; }
.outbound-card-warning.hidden, .outbound-card-error.hidden { display: none; }
.outbound-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.outbound-page textarea { display: block; width: 100%; box-sizing: border-box; min-height: 76px; padding: 10px 12px; border: 1px solid rgba(214, 160, 0, 0.45); border-radius: 12px; background: #fffbea; font: inherit; resize: vertical; }
.outbound-page textarea:focus { outline: none; border-color: #d6a000; box-shadow: 0 0 0 3px rgba(214, 160, 0, 0.18); }
.outbound-page .page-picker { top: auto; bottom: calc(100% + 4px); }
.outbound-page-hint { margin: 6px 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.35; }
.outbound-page-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.outbound-page-actions button, .outbound-call-btn { width: auto; flex: 0 0 auto; min-height: 36px; padding: 0 16px; }
.outbound-card-phone > span { white-space: nowrap; }
.outbound-page-actions button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.page-row.is-lead-page { cursor: pointer; }
.page-row-kind { padding: 0 8px; border-radius: 999px; background: #fff1b8; color: #7a5b00; font-size: 0.72rem; font-weight: 700; }
.page-row.is-lead-page .page-row-statusline { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.outbound-autoadvance { display: inline-flex; align-items: center; gap: 6px; }
.outbound-autoadvance input { accent-color: var(--accent); }
.outbound-keys { margin: 10px 0 0; font-size: 0.78rem; }
@media (max-width: 900px) { .contacts-shell.has-outbound-card { grid-template-columns: minmax(0, 1fr); } }

/* Home launcher (home.html): the landing page after sign-in. */
.home-shell {
  display: block;
}

.home-content {
  min-height: calc(100 * var(--vh));
}

.home-launcher {
  width: 100%;
  margin: auto;
  padding: 32px 16px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.home-launcher-logo {
  width: 96px;
  height: auto;
}

.home-launcher h1 {
  margin: 0;
  font-size: 2rem;
}

.home-launcher-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, 150px);
  justify-content: center;
  gap: 16px;
  width: min(100%, 860px);
}

.account-mode-launcher-option.home-launcher-option {
  width: 150px;
  gap: 12px;
  border-radius: 22px;
  text-decoration: none;
}

.home-launcher-option .account-mode-launcher-option-icon,
.home-launcher-option .account-mode-launcher-option-icon::before {
  width: 48px;
  height: 48px;
}

.home-launcher-option .account-mode-launcher-option-title {
  font-size: 1.05rem;
}

/* Patient Experience shell (px.html): Cerebro top bar, then the PX app (px/) filling the rest. */
/* Cerebro sidebar (rows drawn by px-shell.js from the PX nav) + main; no right sidebar on this page. */
.px-shell,
body.px-page.right-sidebar-collapsed .px-shell,
html.right-sidebar-collapsed body.px-page .px-shell {
  grid-template-columns: 240px minmax(0, 1fr);
  height: calc(100 * var(--vh));
  height: calc(100 * var(--dvh));
  min-height: 0;
  overflow: hidden;
}

body.px-page.sidebar-collapsed .px-shell,
html.right-sidebar-collapsed body.px-page.sidebar-collapsed .px-shell {
  grid-template-columns: 88px minmax(0, 1fr);
}

@media (max-width: 900px) {
  html body.px-page .px-shell,
  html body.px-page.sidebar-collapsed .px-shell,
  html.right-sidebar-collapsed body.px-page.sidebar-collapsed .px-shell {
    grid-template-columns: 1fr;
  }
}

.px-content {
  height: calc(100 * var(--vh));
  padding: 10px 0 0;
  gap: 0;
  overflow: hidden;
}

.px-content .account-topbar {
  margin: -10px 0 0;
}

.px-frame {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  display: block;
}

/* ---- Saved messages and scheduled messages (saved-messages-picker.js, saved-messages.html) ---- */
.messaging-composer-tools { display: flex; align-items: center; gap: 8px; }
.messaging-composer-icons { display: flex; align-items: center; gap: 6px; }
.messaging-composer-icon-button {
  width: 36px; min-width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center;
  border-radius: 999px; border: 1px solid rgba(220, 54, 103, 0.26); background: rgba(255, 255, 255, 0.96);
  color: #c2145c; cursor: pointer;
}
.messaging-composer-icon-button svg { width: 18px; height: 18px; }
.messaging-composer-icon-button:hover, .messaging-composer-icon-button:focus-visible { border-color: rgba(220, 54, 103, 0.58); background: rgba(255, 242, 247, 0.98); }
.messaging-composer-icon-button:disabled { opacity: 0.5; cursor: not-allowed; }
@media (max-width: 700px) { .messaging-composer-tools { flex-direction: column; align-items: flex-start; } }

.saved-picker {
  position: fixed; z-index: 1500; display: flex; flex-direction: column; box-sizing: border-box; max-height: 520px;
  background: #fff; border: 1px solid rgba(17, 17, 17, 0.1); border-radius: 18px; box-shadow: 0 22px 60px rgba(49, 8, 26, 0.26); overflow: hidden;
}
.saved-picker-top { padding: 12px 12px 6px; }
.saved-picker-search { width: 100%; box-sizing: border-box; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; }
.saved-picker-links { display: flex; justify-content: space-between; gap: 12px; padding: 4px 14px 8px; }
.saved-picker-link { width: auto; padding: 0; border: 0; background: transparent; color: var(--accent-deep, #c2145c); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.saved-picker-link:hover { text-decoration: underline; }
.saved-picker-list { overflow-y: auto; padding: 0 8px 10px; min-height: 80px; }
.saved-picker-group { margin: 10px 6px 4px; color: var(--muted); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.saved-picker-empty { margin: 14px 8px; }
.saved-picker-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.saved-picker-row:hover, .saved-picker-row:focus-visible { background: rgba(239, 22, 101, 0.07); outline: none; }
.saved-picker-row-main { min-width: 0; }
.saved-picker-row strong { display: block; }
.saved-picker-preview { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.saved-picker-row.is-expanded .saved-picker-preview { display: block; -webkit-line-clamp: unset; }
.saved-picker-expand { width: auto; padding: 2px 6px; border: 0; background: transparent; color: var(--accent-deep, #c2145c); font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }

.saved-dialog-overlay { z-index: 1600; display: grid; place-items: start center; }
.saved-dialog { width: min(560px, calc(calc(100 * var(--vw)) - 32px)); z-index: 1; }
.saved-dialog-small { width: min(460px, calc(calc(100 * var(--vw)) - 32px)); }
.saved-editor-form, .schedule-dialog-form { display: grid; gap: 12px; }
.saved-editor-form label, .schedule-dialog-form label { display: grid; gap: 4px; }
.saved-editor-form input[type="text"], .saved-editor-form textarea, .schedule-dialog-form input, .schedule-dialog-form textarea {
  width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit;
}
.saved-editor-form .saved-editor-shared { display: flex; align-items: center; gap: 8px; }
.saved-editor-form .saved-editor-shared input { width: auto; }
.saved-editor-form .saved-editor-shared.hidden { display: none; }
.saved-editor-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.saved-editor-field { width: auto; padding: 3px 10px; border: 1px solid rgba(220, 54, 103, 0.3); border-radius: 999px; background: #fff; color: #c2145c; font: inherit; font-size: 0.85rem; cursor: pointer; }
.saved-editor-error { margin: 0; color: #b42318; font-size: 0.9rem; }
.saved-editor-error.hidden { display: none; }
.saved-editor-actions { display: flex; justify-content: flex-end; gap: 8px; }
.saved-editor-actions button { width: auto; }
.schedule-dialog-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.schedule-dialog-picks button { width: auto; }
.schedule-dialog-preview p { margin: 2px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(239, 22, 101, 0.06); white-space: pre-wrap; overflow-wrap: anywhere; }
.schedule-dialog-zone { margin: 0; font-size: 0.85rem; }

.message-scheduled-list { display: grid; gap: 8px; margin-top: 10px; }
.message-scheduled-bubble { border: 2px dashed rgba(194, 20, 92, 0.55); background: rgba(255, 255, 255, 0.85); color: var(--ink, #222); }
.message-scheduled-bubble.is-failed { border-color: #b42318; }
.message-scheduled-label { font-size: 0.8rem; font-weight: 800; color: #c2145c; }
.message-scheduled-label.is-failed, .message-scheduled-bubble.is-failed .message-scheduled-label { color: #b42318; }
.message-scheduled-bubble p { margin: 4px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-scheduled-error { color: #b42318; font-size: 0.85rem; }
.message-scheduled-by { font-size: 0.75rem; }
.message-scheduled-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.message-scheduled-action { width: auto; padding: 4px 12px; border: 1px solid rgba(220, 54, 103, 0.35); border-radius: 999px; background: #fff; color: #c2145c; font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.message-scheduled-action:hover { background: rgba(255, 242, 247, 0.98); }
.messaging-scheduled-count.is-quiet { background: rgba(17, 17, 17, 0.08); color: inherit; }
.scheduled-list { display: grid; gap: 8px; }
.scheduled-row { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; }
.scheduled-row:hover, .scheduled-row.is-active { background: rgba(255, 250, 252, 0.95); border-color: rgba(220, 54, 103, 0.4); }
.scheduled-row-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.scheduled-row-body { margin: 0; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.saved-page-toolbar { margin: 4px 0 8px; max-width: 640px; }
.saved-page-toolbar input { width: 100%; box-sizing: border-box; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; font: inherit; }
.saved-page-list { display: grid; gap: 12px; max-width: 760px; }
.saved-page-group { margin: 10px 0 0; font-size: 0.9rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.saved-card { display: grid; gap: 8px; padding: 16px; }
.saved-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.saved-card-head h3 { margin: 0; font-size: 1.05rem; }
.saved-card-actions { margin-left: auto; display: flex; gap: 8px; }
.saved-card-actions button { width: auto; }
.saved-card-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.saved-page-empty { display: grid; gap: 8px; justify-items: start; padding: 24px 0; }
.saved-page-empty p { margin: 0; }
.saved-page-empty button { width: auto; }

/* ---- Quick actions (sidebar "+", New message, New call) ---- */
.quick-actions-host { flex-direction: column; gap: 8px; min-height: 0; flex: 0 0 auto; padding-bottom: 8px; }
/* .sidebar prefix: beats the generic `.sidebar button { background: white }` that hid the white "+". */
.sidebar .quick-actions-button {
  position: static; flex: 0 0 auto; width: 34px; height: 34px; min-width: 0; padding: 0; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; background: rgba(239, 22, 101, 0.92); color: #fff9fb;
  border: 1px solid rgba(255, 255, 255, 0.4); box-shadow: 0 8px 20px rgba(116, 16, 59, 0.22); font-size: 1.5rem; line-height: 1; font-weight: 700; cursor: pointer;
}
.sidebar .quick-actions-button:hover, .sidebar .quick-actions-button[aria-expanded="true"] { background: rgba(179, 15, 82, 0.96); }
body.sidebar-collapsed .quick-actions-button { width: 30px; height: 30px; font-size: 1.3rem; }
.quick-actions-menu {
  position: fixed; z-index: 1700; width: 180px; padding: 6px; display: grid; gap: 2px; box-sizing: border-box;
  background: #fff; border: 1px solid rgba(17, 17, 17, 0.1); border-radius: 14px; box-shadow: 0 18px 48px rgba(49, 8, 26, 0.26);
}
.quick-actions-menu-item { width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.quick-actions-menu-item:hover, .quick-actions-menu-item:focus-visible { background: rgba(239, 22, 101, 0.1); outline: none; }
.quick-actions-dialog { width: min(520px, calc(calc(100 * var(--vw)) - 32px)); }
.quick-actions-form { display: grid; gap: 12px; }
.quick-actions-field { display: grid; gap: 4px; position: relative; }
.quick-actions-field > span { font-weight: 700; font-size: 0.9rem; }
.quick-actions-field select, .quick-actions-field textarea, .quick-actions-to-input {
  width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; background: #fff;
}
.quick-actions-to { position: relative; }
.quick-actions-to-input.hidden, .quick-actions-chip-row.hidden, .quick-actions-results.hidden, .quick-actions-from-row.hidden, .quick-actions-error.hidden { display: none; }
.quick-actions-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 8px 6px 12px; border: 1px solid rgba(220, 54, 103, 0.3); border-radius: 999px; background: rgba(239, 22, 101, 0.06); }
.quick-actions-chip-x { width: auto; min-width: 0; padding: 0 6px; border: 0; background: transparent; color: #c2145c; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.quick-actions-kind { padding: 1px 8px; border-radius: 999px; background: rgba(17, 17, 17, 0.07); font-size: 0.75rem; font-weight: 700; }
.quick-actions-results {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow-y: auto; padding: 6px; box-sizing: border-box;
  background: #fff; border: 1px solid rgba(17, 17, 17, 0.1); border-radius: 14px; box-shadow: 0 18px 48px rgba(49, 8, 26, 0.22);
}
.quick-actions-result { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.quick-actions-result:hover, .quick-actions-result.is-active { background: rgba(239, 22, 101, 0.1); }
.quick-actions-result-name { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-actions-result-phone { margin-left: auto; color: var(--muted); white-space: nowrap; }
.quick-actions-empty { margin: 8px; }
.quick-actions-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quick-actions-tools .button-secondary, .quick-actions-actions .button-secondary, .quick-actions-actions .button-primary, .quick-actions-open-link { width: auto; }
.quick-actions-error { margin: 0; color: #b42318; font-size: 0.9rem; }
.quick-actions-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.quick-actions-open-link { display: inline-flex; align-items: center; text-decoration: none; padding: 10px 18px; border-radius: 999px; }
.quick-actions-done { display: grid; gap: 14px; }
.quick-actions-done-title { margin: 0; font-size: 1.1rem; font-weight: 800; }
.contacts-detail-actions .contacts-comm-button { width: auto; margin-left: 8px; }
.contacts-detail-actions .contacts-comm-button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Messages: bulk select (checkbox over the avatar, select-all, action bar) and the list timestamp */
.messaging-select-box {
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  min-width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 6px;
  border: 2px solid rgba(17, 17, 17, 0.35);
  background: #fff;
  box-shadow: none;
  cursor: pointer;
  position: relative;
}

.messaging-select-box[aria-checked="true"],
.messaging-select-box[aria-checked="mixed"] {
  border-color: #c70f7e;
  background: linear-gradient(135deg, #ef1665, #c70f7e);
}

.messaging-select-box[aria-checked="true"]::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.messaging-select-box[aria-checked="mixed"]::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 6px;
  width: 8px;
  height: 2px;
  background: #fff;
}

.messaging-thread-controls-row .messaging-select-box {
  margin-right: 6px;
}

.messaging-page .messaging-thread-select {
  position: absolute;
  left: 25px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  opacity: 0;
}

.messaging-page .messaging-thread-item:hover .messaging-thread-select,
.messaging-page .messaging-thread-list.is-selecting .messaging-thread-select,
.messaging-page .messaging-thread-select[aria-checked="true"] {
  opacity: 1;
}

.messaging-page .messaging-thread-item:hover .message-avatar,
.messaging-page .messaging-thread-list.is-selecting .message-avatar,
.messaging-page .messaging-thread-item.is-selected .message-avatar {
  opacity: 0.25;
}

.messaging-page .messaging-thread-item.is-selected {
  background: rgba(239, 22, 101, 0.07);
}

.messaging-page .message-unread-dot {
  top: 50%;
  right: auto;
  left: 3px;
  transform: translateY(-50%);
}

.messaging-thread-time {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.messaging-thread-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.messaging-thread-bulk.hidden,
.messaging-thread-bulk .hidden {
  display: none !important;
}

.messaging-thread-bulk-count {
  font-size: 0.8rem;
  font-weight: 700;
  margin-right: 4px;
}

.messaging-thread-bulk .messaging-thread-filter-button {
  width: auto;
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Messages > Missed calls: compact rows (missed-calls.js renderMissedRow). Buttons size themselves (the global button rule is 100% wide). */
.missed-calls-list.missed-rows {
  gap: 0;
  border-top: 1px solid var(--line);
}

.missed-bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
}

.missed-bulk-bar:empty {
  display: none;
}

.missed-bulk-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
}

.missed-row {
  display: grid;
  grid-template-columns: 22px 30px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.missed-row:hover {
  background: #fff5f9;
}

.missed-row.is-active {
  background: #ffe9f1;
}

.missed-row.is-selected {
  background: #fff0f6;
}

.missed-row.is-resolved .missed-row-name,
.missed-row.is-resolved .missed-row-kind {
  color: var(--muted);
}

.missed-row-check {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  margin: 0;
  cursor: pointer;
}

.missed-row-check input,
.missed-bulk-all input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.missed-row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fdecec;
  color: #c62828;
}

.missed-row-icon.is-voicemail {
  background: #eef3ff;
  color: #2f5bd3;
}

.missed-row-icon svg {
  width: 17px;
  height: 17px;
}

.missed-row-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.missed-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.missed-row-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.missed-row-time {
  flex: 0 0 auto;
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
}

.missed-row-sub {
  font-size: 0.78rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.missed-row-kind {
  font-weight: 600;
  color: #c62828;
}

.missed-row-icon.is-voicemail + .missed-row-main .missed-row-kind {
  color: #2f5bd3;
}

.missed-row-preview {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.missed-row-audio {
  width: 100%;
  height: 32px;
  margin-top: 4px;
}

.missed-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.missed-row-call {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent-deep);
  cursor: pointer;
}

.missed-row-call svg {
  width: 16px;
  height: 16px;
}

.missed-row-call:disabled {
  opacity: 0.4;
  cursor: default;
}

.missed-row-resolve {
  flex: 0 0 auto;
  width: auto;
  min-height: 30px;
  padding: 4px 12px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.missed-row-resolve.is-reopen {
  background: #fff;
  color: var(--accent-deep);
  border: 1px solid rgba(239, 22, 101, 0.35);
}

.missed-row-call:focus-visible,
.missed-row-resolve:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
}

.missed-row .calls-missed-card-menu-trigger {
  width: 26px;
  min-height: 26px;
}

/* Inbox conversation rows: roomier rows so names and previews aren't cut off. */
.messaging-page .messaging-thread-item {
  padding: 14px 14px 14px 12px;
  gap: 12px;
  align-items: start;
}

.messaging-page .messaging-thread-item .message-avatar {
  margin-top: 2px;
}

.messaging-page .messaging-thread-title-group {
  gap: 10px;
}

.messaging-page .messaging-thread-title-group strong {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.95rem;
}

.messaging-page .messaging-thread-title-group .messaging-thread-time {
  flex: 0 0 auto;
  margin-left: auto;
  padding-right: 14px;
}

.messaging-page .messaging-thread-subhead {
  margin: 3px 0 4px;
  gap: 6px;
}

.messaging-page .messaging-thread-item p {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
}

.messaging-page .messaging-thread-item .conversation-tag-chips {
  margin-top: 6px;
}

/* Small screens render at 80% (same as browser zoom 80%). CSS zoom shrinks viewport units too, so they are
   rebuilt from the --vh/--dvh/--vw variables (never write raw vh/vw in this file) and JS positioning divides by --ui-zoom. */
@media (min-width: 901px) and (max-width: 1600px) {
  :root { zoom: 0.8; --vh: 1.25vh; --dvh: 1.25dvh; --vw: 1.25vw; --ui-zoom: 0.8; }
}

/* Admin > Phone system > Call forwarding */
.call-forward-live { margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(239, 22, 101, 0.06); color: var(--accent-deep); font-weight: 700; }
.call-forward-section-head { margin-top: 8px; }
.call-forward-section-head h3 { margin: 0 0 4px; }
.call-forward-card-on { border-color: #d40755; box-shadow: 0 0 0 1px rgba(212, 7, 85, 0.25); }
#callForwardGlobal .phone-system-card-main > strong { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.call-forward-switch { display: inline-flex !important; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.call-forward-switch input { width: 18px; height: 18px; accent-color: #d40755; }
.call-forward-hint { margin: 0; font-size: 0.85rem; }
.call-forward-summary { display: grid; gap: 8px; padding: 16px 18px; border-radius: 16px; border: 1px solid rgba(124, 108, 118, 0.22); background: #fff; }
.call-forward-summary.is-on { border-color: #d40755; background: rgba(239, 22, 101, 0.06); }
.call-forward-summary.is-partial { border-color: #e0a100; background: rgba(255, 196, 0, 0.08); }
.call-forward-summary-headline { font-size: 1.1rem; }
.call-forward-summary-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.call-forward-summary-list li { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border-top: 1px solid rgba(239, 22, 101, 0.08); }
.call-forward-summary-note { margin: 0; color: var(--muted); font-size: 0.85rem; }
.call-forward-table td:last-child { width: 1%; white-space: nowrap; text-align: right; }
.call-forward-table .button-secondary { display: inline-block; text-decoration: none; }

/* Call QA playbook (admin-call-qa-playbook.html) */
.cqp-page { min-width: 0; }
.cqp-section { display: grid; gap: 10px; padding: 16px; margin-bottom: 14px; }
.cqp-section h3, .cqp-section p { margin: 0; }
.cqp-section textarea, .cqp-section input[type="text"], .cqp-section select { width: 100%; box-sizing: border-box; font: inherit; }
.cqp-section textarea { resize: vertical; }
.cqp-section label { display: grid; gap: 4px; }
.cqp-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cqp-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cqp-actions button, .cqp-test-controls button, .cqp-small { width: auto; flex: 0 0 auto; white-space: nowrap; }
.cqp-dirty { color: #b54708; font-weight: 700; }
.cqp-error { color: #b42318; font-size: 0.92rem; margin: 0 0 10px; }
.cqp-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; }
.cqp-history { table-layout: auto; }
.cqp-row { cursor: pointer; }
.cqp-row:hover td, .cqp-row.is-selected td { background: rgba(212, 7, 85, 0.06); }
.cqp-row:focus-visible { outline: 2px solid var(--accent-deep, #d40755); outline-offset: -2px; }
.cqp-notes { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cqp-chip { white-space: nowrap; }
.cqp-chip-active { background: #dcfae6; color: #067647; }
.cqp-chip-draft { background: #fef0c7; color: #93370d; }
.cqp-chip-archived { background: #f1f1f4; color: #4b5563; }
.cqp-table-wrap { overflow-x: auto; }
.cqp-items td, .cqp-items th { vertical-align: top; }
.cqp-items { table-layout: auto; width: 100%; }
.cqp-items input[type="text"] { min-width: 110px; }
.cqp-items textarea { min-width: 190px; }
.cqp-items td:last-child, .cqp-items th:last-child { white-space: nowrap; width: 1%; }
.cqp-key { font-size: 0.85rem; overflow-wrap: anywhere; max-width: 150px; }
.cqp-switch { display: inline-flex !important; grid-auto-flow: column; align-items: center; gap: 8px; width: auto; white-space: nowrap; font-weight: 600; }
.cqp-switch input { width: auto; margin: 0; }
.cqp-category { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line, #e4ced9); border-radius: 12px; margin-top: 8px; }
.cqp-category-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.cqp-criteria { display: grid; gap: 8px; }
.cqp-criterion { grid-template-columns: 24px minmax(0, 1fr); align-items: start; }
.cqp-criterion-n { color: #6d626b; font-weight: 700; padding-top: 6px; }
.cqp-example { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line, #e4ced9); border-radius: 12px; }
.cqp-example-head { display: flex; justify-content: space-between; align-items: center; }
.cqp-test-controls { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.cqp-test-controls label { flex: 1 1 360px; }
.cqp-loading { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.cqp-spinner { width: 18px; height: 18px; border: 3px solid rgba(212, 7, 85, 0.2); border-top-color: var(--accent-deep, #d40755); border-radius: 50%; animation: cqp-spin 0.9s linear infinite; }
@keyframes cqp-spin { to { transform: rotate(360deg); } }
.cqp-compare { display: grid; gap: 12px; }
.cqp-compare-table th[scope="row"] { font-weight: 700; }
.cqp-note { display: block; color: #6d626b; font-size: 0.85rem; font-weight: 400; margin-top: 2px; }
.cqp-confirm-body { margin: 12px 0 16px; }
.cqp-section input:focus-visible, .cqp-section textarea:focus-visible, .cqp-section select:focus-visible, .cqp-section button:focus-visible { outline: 2px solid var(--accent-deep, #d40755); outline-offset: 2px; }
@media (max-width: 760px) { .cqp-meta, .cqp-category-head { grid-template-columns: 1fr; } }

/* Call QA dashboard (Reports > Call analyzer) */
.calls-analyzer-workspace > .cqd { grid-column: 1 / -1; grid-row: 1; min-width: 0; padding: 8px 8px 32px 0; }
.cqd { display: grid; gap: 16px; align-content: start; }
.cqd.cqd-loading { opacity: 0.6; transition: opacity 0.15s; }
.cqd-filters { display: flex; flex-wrap: wrap; gap: 12px; }
.cqd-filter { display: grid; gap: 4px; font-size: 0.78rem; color: var(--muted); }
.cqd-filter select { min-width: 160px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; }
.cqd-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cqd-tile { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.cqd-tile-label { font-size: 0.78rem; color: var(--muted); }
.cqd-tile-value { font-size: 1.8rem; line-height: 1.1; color: var(--ink); }
.cqd-tile-value small { font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.cqd-delta { font-size: 0.78rem; font-weight: 600; }
.cqd-delta em { font-style: normal; font-weight: 400; color: var(--muted); }
.cqd-delta-up { color: var(--success); }
.cqd-delta-down { color: var(--accent-deep); }
.cqd-delta-flat, .cqd-delta-none { color: var(--muted); }
.cqd-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; }
.cqd-panel { min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.cqd-panel header { margin-bottom: 10px; }
.cqd-panel h3 { margin: 0; font-size: 1rem; }
.cqd-muted { margin: 4px 0 0; color: var(--muted); font-size: 0.82rem; }
.cqd-chart-scroll { min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.cqd-chart-scroll svg { display: block; width: 100%; min-width: 520px; height: auto; overflow: visible; color: var(--muted); font-family: inherit; font-size: 11px; }
.cqd-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; color: var(--muted); font-size: 0.78rem; }
.cqd-legend span { display: inline-flex; align-items: center; gap: 7px; }
.cqd-legend i { width: 10px; height: 10px; border-radius: 50%; }
.cqd-rank-stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.cqd-top5 { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.cqd-top5-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cqd-top5-row:hover, .cqd-top5-row:focus-visible { background: rgba(242, 15, 98, 0.07); }
.cqd-rank { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(242, 15, 98, 0.1); color: var(--accent-deep); font-size: 0.78rem; font-weight: 700; }
.cqd-top5-name { display: grid; min-width: 0; font-weight: 600; }
.cqd-top5-name small { color: var(--muted); font-weight: 400; font-size: 0.76rem; }
.cqd-score { display: inline-block; min-width: 34px; padding: 2px 8px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; text-align: center; }
.cqd-score-good { background: rgba(25, 135, 84, 0.12); color: var(--success); }
.cqd-score-mid { background: rgba(196, 135, 0, 0.14); color: var(--warning); }
.cqd-score-low { background: rgba(242, 15, 98, 0.12); color: var(--accent-deep); }
.cqd-score-none { background: rgba(17, 17, 17, 0.06); color: var(--muted); }
.cqd-table-wrap { overflow-x: auto; }
.cqd-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.cqd-table th { padding: 8px 6px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 0.74rem; font-weight: 600; text-align: left; white-space: nowrap; }
.cqd-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cqd-table td:nth-child(2), .cqd-table td:nth-child(3) { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.cqd-table tbody tr { cursor: pointer; }
.cqd-table tbody tr:hover, .cqd-table tbody tr:focus-visible { background: rgba(242, 15, 98, 0.06); }
.cqd-rubric { margin-left: 6px; color: var(--muted); }
.cqd-empty, .cqd-empty-chart { margin: 0; padding: 28px 12px; color: var(--muted); text-align: center; }
.cqd-error { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; background: rgba(242, 15, 98, 0.08); color: var(--accent-deep); }
.cqd-retry { width: auto; padding: 6px 12px; border: 1px solid var(--accent); border-radius: 999px; background: #fff; color: var(--accent-deep); font: inherit; cursor: pointer; }
.cqd-detail { position: fixed; top: 64px; right: 0; bottom: 0; z-index: 60; display: flex; flex-direction: column; width: min(520px, 100vw); overflow: hidden; border-left: 1px solid var(--line); background: #fff; box-shadow: -12px 0 40px rgba(17, 17, 17, 0.12); }
.cqd-detail.hidden { display: none; }
.cqd-detail-head { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.cqd-detail-title { min-width: 0; }
.cqd-detail-title .eyebrow { margin: 0 0 2px; }
.cqd-detail-rep { margin: 2px 0 0; color: var(--muted); font-size: 0.85rem; }
.cqd-detail-body { flex: 1 1 auto; min-height: 0; padding: 4px 18px 32px; overflow-y: auto; overflow-wrap: anywhere; }
.cqd-detail h3 { margin: 0; overflow-wrap: anywhere; }
.cqd-detail h4 { margin: 18px 0 6px; font-size: 0.9rem; }
.cqd-close { flex: 0 0 auto; width: auto; height: 32px; min-width: 32px; margin: 0; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.cqd-close:hover, .cqd-close:focus-visible { background: rgba(17, 17, 17, 0.06); color: var(--ink); }
.cqd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.cqd-spruce-link { display: inline-block; margin-bottom: 4px; color: var(--accent-deep); font-weight: 600; }
.cqd-rubric-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cqd-rubric-item > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cqd-rubric-item blockquote { margin: 4px 0 0; padding-left: 10px; border-left: 3px solid rgba(242, 15, 98, 0.3); color: var(--muted); font-size: 0.82rem; }
.cqd-rubric-item p { margin: 4px 0 0; font-size: 0.82rem; }
.cqd-coach { display: grid; gap: 14px; }
.cqd-coach-block h5 { margin: 0 0 4px; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-deep); }
.cqd-coach-block p { margin: 0; font-size: 0.86rem; line-height: 1.5; }
.cqd-coach-list { display: grid; gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; }
.cqd-coach-list li { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--bg-strong); font-size: 0.84rem; line-height: 1.45; }
.cqd-coach-list li strong { font-weight: 700; }
.cqd-coach-script { display: block; padding-left: 10px; border-left: 3px solid rgba(242, 15, 98, 0.35); font-style: normal; color: var(--ink); }
.cqd-coach-stat { color: var(--muted); font-size: 0.74rem; }
.cqd-chat { display: grid; gap: 14px; white-space: normal; }
.cqd-turn { display: grid; gap: 2px; max-width: 92%; padding: 8px 12px; border-radius: 12px; background: #fff; }
.cqd-turn b { font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.cqd-turn p { margin: 0; line-height: 1.5; }
.cqd-turn.is-rep { justify-self: start; border: 1px solid rgba(242, 15, 98, 0.25); }
.cqd-turn.is-rep b { color: var(--accent-deep); }
.cqd-turn.is-customer { justify-self: end; background: rgba(17, 17, 17, 0.05); }
.cqd-transcript { max-height: 360px; margin: 0; padding: 12px; overflow: auto; border-radius: 10px; background: var(--bg-strong); font: inherit; font-size: 0.82rem; white-space: pre-wrap; }
@media (max-width: 1100px) {
  .cqd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cqd-grid { grid-template-columns: minmax(0, 1fr); }
}
