/**
 * Code Credits
 * Project: POKS - Praxis Organisations- und Kommunikations-System
 * Owner: Torsten Nixdorf
 * Coding Brand: Nixdorf Media
 * Module: Workspace Frontend
 * File Purpose: Provides the operative POKS workspace user interface.
 *
 * Visibility: internal
 * Data Sensitivity: business-confidential
 *
 * Rules:
 * - UTF-8 with German umlauts
 * - no secrets in source code
 * - no patient data in comments
 * - keep business logic separated from UI and adapters
 */
:root {
  --paper: #ece8df;
  --paper-strong: #fffdf8;
  --ink: #172023;
  --muted: #667074;
  --line: rgba(23, 32, 35, 0.12);
  --accent: #8558b3;
  --accent-dark: #6f489a;
  --accent-soft: rgba(133, 88, 179, 0.12);
  --accent-border: rgba(133, 88, 179, 0.26);
  --accent-contrast: #ffffff;
  --warn: #9a6b2f;
  --danger: #a24f54;
  --surface: rgba(255, 253, 248, 0.92);
  --surface-strong: rgba(247, 242, 233, 0.96);
  --surface-ink: #212a2d;
  --shadow: 0 28px 70px rgba(23, 32, 35, 0.12);
  --panel-shadow: 0 18px 40px rgba(23, 32, 35, 0.08);
  --workspace-radius: 20px;
  --workspace-radius-sm: 14px;
  --tone-red: #b3372d;
  --tone-blue: #245d73;
  --tone-green: #4f6b4f;
  --tone-amber: #a8652b;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --telephony-icon-wahlwiederholung: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTI4IiB6b29tQW5kUGFuPSJtYWduaWZ5IiB2aWV3Qm94PSIwIDAgOTYgOTUuOTk5OTk5IiBoZWlnaHQ9IjEyOCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQgbWVldCIgdmVyc2lvbj0iMS4wIj48ZGVmcz48Y2xpcFBhdGggaWQ9IjM0OTFiNWE0MDMiPjxwYXRoIGQ9Ik0gMzguMzk4NDM4IDIwLjk2ODc1IEwgOTIuNDY0ODQ0IDIwLjk2ODc1IEwgOTIuNDY0ODQ0IDc1LjAzMTI1IEwgMzguMzk4NDM4IDc1LjAzMTI1IFogTSAzOC4zOTg0MzggMjAuOTY4NzUgIiBjbGlwLXJ1bGU9Im5vbnplcm8iLz48L2NsaXBQYXRoPjxjbGlwUGF0aCBpZD0iY2RiZGYyMzlmNSI+PHBhdGggZD0iTSA2NS40Mjk2ODggMjAuOTY4NzUgQyA1MC41IDIwLjk2ODc1IDM4LjM5ODQzOCAzMy4wNzAzMTIgMzguMzk4NDM4IDQ4IEMgMzguMzk4NDM4IDYyLjkyOTY4OCA1MC41IDc1LjAzMTI1IDY1LjQyOTY4OCA3NS4wMzEyNSBDIDgwLjM1OTM3NSA3NS4wMzEyNSA5Mi40NjQ4NDQgNjIuOTI5Njg4IDkyLjQ2NDg0NCA0OCBDIDkyLjQ2NDg0NCAzMy4wNzAzMTIgODAuMzU5Mzc1IDIwLjk2ODc1IDY1LjQyOTY4OCAyMC45Njg3NSBaIE0gNjUuNDI5Njg4IDIwLjk2ODc1ICIgY2xpcC1ydWxlPSJub256ZXJvIi8+PC9jbGlwUGF0aD48Y2xpcFBhdGggaWQ9IjAwYTZmMTE4YmIiPjxwYXRoIGQ9Ik0gMC4zOTg0MzggMC45Njg3NSBMIDU0LjQ2NDg0NCAwLjk2ODc1IEwgNTQuNDY0ODQ0IDU1LjAzMTI1IEwgMC4zOTg0MzggNTUuMDMxMjUgWiBNIDAuMzk4NDM4IDAuOTY4NzUgIiBjbGlwLXJ1bGU9Im5vbnplcm8iLz48L2NsaXBQYXRoPjxjbGlwUGF0aCBpZD0iNmUzZTczYzZmMiI+PHBhdGggZD0iTSAyNy40Mjk2ODggMC45Njg3NSBDIDEyLjUgMC45Njg3NSAwLjM5ODQzOCAxMy4wNzAzMTIgMC4zOTg0MzggMjggQyAwLjM5ODQzOCA0Mi45Mjk2ODggMTIuNSA1NS4wMzEyNSAyNy40Mjk2ODggNTUuMDMxMjUgQyA0Mi4zNTkzNzUgNTUuMDMxMjUgNTQuNDY0ODQ0IDQyLjkyOTY4OCA1NC40NjQ4NDQgMjggQyA1NC40NjQ4NDQgMTMuMDcwMzEyIDQyLjM1OTM3NSAwLjk2ODc1IDI3LjQyOTY4OCAwLjk2ODc1IFogTSAyNy40Mjk2ODggMC45Njg3NSAiIGNsaXAtcnVsZT0ibm9uemVybyIvPjwvY2xpcFBhdGg+PGNsaXBQYXRoIGlkPSI3OWQ5NTA4ZjY0Ij48cmVjdCB4PSIwIiB3aWR0aD0iNTUiIHk9IjAiIGhlaWdodD0iNTYiLz48L2NsaXBQYXRoPjxjbGlwUGF0aCBpZD0iNDRkY2FiNGQ0OSI+PHBhdGggZD0iTSAzLjUzNTE1NiAyMC45Njg3NSBMIDU3LjU5Mzc1IDIwLjk2ODc1IEwgNTcuNTkzNzUgNzUuMDI3MzQ0IEwgMy41MzUxNTYgNzUuMDI3MzQ0IFogTSAzLjUzNTE1NiAyMC45Njg3NSAiIGNsaXAtcnVsZT0ibm9uemVybyIvPjwvY2xpcFBhdGg+PGNsaXBQYXRoIGlkPSIyMzcxZmVjZWFiIj48cGF0aCBkPSJNIDMwLjU2NjQwNiAyMC45Njg3NSBDIDE1LjYzNjcxOSAyMC45Njg3NSAzLjUzNTE1NiAzMy4wNzAzMTIgMy41MzUxNTYgNDcuOTk2MDk0IEMgMy41MzUxNTYgNjIuOTI1NzgxIDE1LjYzNjcxOSA3NS4wMjczNDQgMzAuNTY2NDA2IDc1LjAyNzM0NCBDIDQ1LjQ5MjE4OCA3NS4wMjczNDQgNTcuNTkzNzUgNjIuOTI1NzgxIDU3LjU5Mzc1IDQ3Ljk5NjA5NCBDIDU3LjU5Mzc1IDMzLjA3MDMxMiA0NS40OTIxODggMjAuOTY4NzUgMzAuNTY2NDA2IDIwLjk2ODc1IFogTSAzMC41NjY0MDYgMjAuOTY4NzUgIiBjbGlwLXJ1bGU9Im5vbnplcm8iLz48L2NsaXBQYXRoPjxjbGlwUGF0aCBpZD0iOTUwN2I3MGVjNSI+PHJlY3QgeD0iMCIgd2lkdGg9IjkzIiB5PSIwIiBoZWlnaHQ9Ijk2Ii8+PC9jbGlwUGF0aD48L2RlZnM+PGcgdHJhbnNmb3JtPSJtYXRyaXgoMSwgMCwgMCwgMSwgMCwgLTAuMDAwMDAwMDAwMDAwMDA4MTAxKSI+PGcgY2xpcC1wYXRoPSJ1cmwoIzk1MDdiNzBlYzUpIj48ZyBjbGlwLXBhdGg9InVybCgjMzQ5MWI1YTQwMykiPjxnIGNsaXAtcGF0aD0idXJsKCNjZGJkZjIzOWY1KSI+PGcgdHJhbnNmb3JtPSJtYXRyaXgoMSwgMCwgMCwgMSwgMzgsIDIwKSI+PGcgY2xpcC1wYXRoPSJ1cmwoIzc5ZDk1MDhmNjQpIj48ZyBjbGlwLXBhdGg9InVybCgjMDBhNmYxMThiYikiPjxnIGNsaXAtcGF0aD0idXJsKCM2ZTNlNzNjNmYyKSI+PHBhdGggZmlsbD0iIzAwMDAwMCIgZD0iTSAwLjM5ODQzOCAwLjk2ODc1IEwgNTQuNDY0ODQ0IDAuOTY4NzUgTCA1NC40NjQ4NDQgNTUuMDMxMjUgTCAwLjM5ODQzOCA1NS4wMzEyNSBaIE0gMC4zOTg0MzggMC45Njg3NSAiIGZpbGwtb3BhY2l0eT0iMSIgZmlsbC1ydWxlPSJub256ZXJvIi8+PC9nPjwvZz48L2c+PC9nPjwvZz48L2c+PGcgY2xpcC1wYXRoPSJ1cmwoIzQ0ZGNhYjRkNDkpIj48ZyBjbGlwLXBhdGg9InVybCgjMjM3MWZlY2VhYikiPjxwYXRoIHN0cm9rZS1saW5lY2FwPSJidXR0IiB0cmFuc2Zvcm09Im1hdHJpeCgxLjI0MjcyNCwgMCwgMCwgMS4yNDI3MjQsIDMuNTM2Mjc4LCAyMC45NjcyNCkiIGZpbGw9Im5vbmUiIHN0cm9rZS1saW5lam9pbj0ibWl0ZXIiIGQ9Ik0gMjEuNzUwNzEzIDAuMDAxMjE1MzEgQyA5LjczNzAzMiAwLjAwMTIxNTMxIC0wLjAwMDkwMjI5NyA5LjczOTE0OSAtMC4wMDA5MDIyOTcgMjEuNzQ5Njg3IEMgLTAuMDAwOTAyMjk3IDMzLjc2MzM2OCA5LjczNzAzMiA0My41MDEzMDIgMjEuNzUwNzEzIDQzLjUwMTMwMiBDIDMzLjc2MTI1IDQzLjUwMTMwMiA0My40OTkxODQgMzMuNzYzMzY4IDQzLjQ5OTE4NCAyMS43NDk2ODcgQyA0My40OTkxODQgOS43MzkxNDkgMzMuNzYxMjUgMC4wMDEyMTUzMSAyMS43NTA3MTMgMC4wMDEyMTUzMSBaIE0gMjEuNzUwNzEzIDAuMDAxMjE1MzEgIiBzdHJva2U9IiMwMDAwMDAiIHN0cm9rZS13aWR0aD0iOS42NTYyMDgiIHN0cm9rZS1vcGFjaXR5PSIxIiBzdHJva2UtbWl0ZXJsaW1pdD0iNCIvPjwvZz48L2c+PC9nPjwvZz48L3N2Zz4=");
  --telephony-icon-rueckruf: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTI4IiB6b29tQW5kUGFuPSJtYWduaWZ5IiB2aWV3Qm94PSIwIDAgOTYgOTUuOTk5OTk5IiBoZWlnaHQ9IjEyOCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQgbWVldCIgdmVyc2lvbj0iMS4wIj48ZGVmcz48Y2xpcFBhdGggaWQ9ImI3ZDU4NjI5OTEiPjxwYXRoIGQ9Ik0gNTEgMyBMIDkwIDMgTCA5MCA1OSBMIDUxIDU5IFogTSA1MSAzICIgY2xpcC1ydWxlPSJub256ZXJvIi8+PC9jbGlwUGF0aD48Y2xpcFBhdGggaWQ9IjMyZDE3ZTFiMjUiPjxwYXRoIGQ9Ik0gNTcuMTg3NSAwLjYwMTU2MiBMIDEwMS45MjE4NzUgMTYuNDI5Njg4IEwgODYuMDkzNzUgNjEuMTY0MDYyIEwgNDEuMzU5Mzc1IDQ1LjMzNTkzOCBaIE0gNTcuMTg3NSAwLjYwMTU2MiAiIGNsaXAtcnVsZT0ibm9uemVybyIvPjwvY2xpcFBhdGg+PGNsaXBQYXRoIGlkPSIwOGQ2M2RmMTc1Ij48cGF0aCBkPSJNIDU3LjE4NzUgMC42MDE1NjIgTCAxMDEuOTIxODc1IDE2LjQyOTY4OCBMIDg2LjA5Mzc1IDYxLjE2NDA2MiBMIDQxLjM1OTM3NSA0NS4zMzU5MzggWiBNIDU3LjE4NzUgMC42MDE1NjIgIiBjbGlwLXJ1bGU9Im5vbnplcm8iLz48L2NsaXBQYXRoPjxjbGlwUGF0aCBpZD0iZjhiM2Y3ZWViYiI+PHBhdGggZD0iTSAwLjMxMjUgMTQuMTAxNTYyIEwgNDcuNzYxNzE5IDE0LjEwMTU2MiBMIDQ3Ljc2MTcxOSA0My44Nzg5MDYgTCAwLjMxMjUgNDMuODc4OTA2IFogTSAwLjMxMjUgMTQuMTAxNTYyICIgY2xpcC1ydWxlPSJub256ZXJvIi8+PC9jbGlwUGF0aD48Y2xpcFBhdGggaWQ9IjU0ZmZmZWIwYTIiPjxyZWN0IHg9IjAiIHdpZHRoPSI5MyIgeT0iMCIgaGVpZ2h0PSI2MiIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIHRyYW5zZm9ybT0ibWF0cml4KDEsIDAsIDAsIDEsIDMsIDE3KSI+PGcgY2xpcC1wYXRoPSJ1cmwoIzU0ZmZmZWIwYTIpIj48ZyBjbGlwLXBhdGg9InVybCgjYjdkNTg2Mjk5MSkiPjxnIGNsaXAtcGF0aD0idXJsKCMzMmQxN2UxYjI1KSI+PGcgY2xpcC1wYXRoPSJ1cmwoIzA4ZDYzZGYxNzUpIj48cGF0aCBmaWxsPSIjZmYzMTMxIiBkPSJNIDg5Ljg3MTA5NCA0OS4yNSBDIDg5Ljg4NjcxOSA1MC4yNDIxODggODkuNzQ2MDk0IDUxLjI1MzkwNiA4OS40MjU3ODEgNTIuMjQ2MDk0IEMgODkuNDAyMzQ0IDUyLjM0Mzc1IDg5LjM2NzE4OCA1Mi40Mzc1IDg5LjMzMjAzMSA1Mi41MzUxNTYgQyA4Ny42MDE1NjIgNTcuNDIxODc1IDgyLjIzNDM3NSA1OS45ODQzNzUgNzcuMzQ3NjU2IDU4LjI1MzkwNiBDIDU3LjQ0MTQwNiA1MS4yMTA5MzggNDcuMDExNzE5IDI5LjM2MzI4MSA1NC4wNTQ2ODggOS40NTMxMjUgQyA1NS43ODUxNTYgNC41NjY0MDYgNjEuMTUyMzQ0IDIuMDAzOTA2IDY2LjA0Mjk2OSAzLjczNDM3NSBDIDY2LjEzNjcxOSAzLjc2OTUzMSA2Ni4yMzA0NjkgMy44MDA3ODEgNjYuMzI0MjE5IDMuODM5ODQ0IEMgNjcuMjk2ODc1IDQuMjE4NzUgNjguMTc1NzgxIDQuNzQ2MDk0IDY4LjkzMzU5NCA1LjM4MjgxMiBMIDY3LjE2NDA2MiAyMC45NDkyMTkgQyA2Ny4xNjQwNjIgMjAuOTUzMTI1IDY3LjE2MDE1NiAyMC45NTcwMzEgNjcuMTQ4NDM4IDIwLjk1NzAzMSBMIDYwLjA4NTkzOCAyMS41MzkwNjIgTCA2MC4wNjY0MDYgMjEuNTQyOTY5IEMgNTkuODQ3NjU2IDMxLjA1MDc4MSA2NC4yMDMxMjUgNDAuMTY3OTY5IDcxLjczMDQ2OSA0NS45ODA0NjkgTCA3MS43NDIxODggNDUuOTY0ODQ0IEwgNzYuNjQ0NTMxIDQwLjgzNTkzOCBMIDg5Ljg3MTA5NCA0OS4yNSAiIGZpbGwtb3BhY2l0eT0iMSIgZmlsbC1ydWxlPSJub256ZXJvIi8+PC9nPjwvZz48L2c+PGcgY2xpcC1wYXRoPSJ1cmwoI2Y4YjNmN2VlYmIpIj48cGF0aCBmaWxsPSIjMDAwMDAwIiBkPSJNIDE0LjE1MjM0NCA0NC4xNTYyNSBDIDE0LjA2MjUgNDQuMTU2MjUgMTMuOTc2NTYyIDQ0LjEzMjgxMiAxMy44OTg0MzggNDQuMDg1OTM4IEwgMC41NTg1OTQgMzYuMjM4MjgxIEMgMC40MDYyNSAzNi4xNDg0MzggMC4zMTI1IDM1Ljk4NDM3NSAwLjMxMjUgMzUuODA4NTk0IEMgMC4zMTI1IDM1LjYyODkwNiAwLjQwNjI1IDM1LjQ2NDg0NCAwLjU1ODU5NCAzNS4zNzUgTCAxMy44OTg0MzggMjcuNTI3MzQ0IEMgMTQuMDU0Njg4IDI3LjQzNzUgMTQuMjQ2MDk0IDI3LjQzNzUgMTQuNDAyMzQ0IDI3LjUyMzQzOCBDIDE0LjU1ODU5NCAyNy42MTMyODEgMTQuNjUyMzQ0IDI3Ljc4MTI1IDE0LjY1MjM0NCAyNy45NjA5MzggTCAxNC42NTIzNDQgMzIuMTY3OTY5IEwgMzkuOTcyNjU2IDMyLjE2Nzk2OSBDIDQwLjQyMTg3NSAzMi4xNjc5NjkgNDAuNzg1MTU2IDMxLjgwNDY4OCA0MC43ODUxNTYgMzEuMzU1NDY5IEwgNDAuNzg1MTU2IDIxLjk5MjE4OCBDIDQwLjc4NTE1NiAyMS41NDY4NzUgNDAuNDIxODc1IDIxLjE4MzU5NCAzOS45NzI2NTYgMjEuMTgzNTk0IEwgMjMuMjE4NzUgMjEuMTgzNTk0IEMgMjIuOTQxNDA2IDIxLjE4MzU5NCAyMi43MTg3NSAyMC45NTcwMzEgMjIuNzE4NzUgMjAuNjc5Njg4IEwgMjIuNzE4NzUgMTQuNjIxMDk0IEMgMjIuNzE4NzUgMTQuMzQzNzUgMjIuOTQxNDA2IDE0LjExNzE4OCAyMy4yMTg3NSAxNC4xMTcxODggTCA0MC44MTY0MDYgMTQuMTE3MTg4IEMgNDIuNzE4NzUgMTQuMTE3MTg4IDQ0LjUwNzgxMiAxNC44NTkzNzUgNDUuODUxNTYyIDE2LjIwMzEyNSBDIDQ3LjE5NTMxMiAxNy41NTA3ODEgNDcuOTM3NSAxOS4zMzU5MzggNDcuOTM3NSAyMS4yMzgyODEgTCA0Ny45Mzc1IDMyLjMzOTg0NCBDIDQ3LjkzNzUgMzQuMjM4MjgxIDQ3LjE5OTIxOSAzNi4wMjM0MzggNDUuODU1NDY5IDM3LjM2NzE4OCBDIDQ0LjUxMTcxOSAzOC43MDcwMzEgNDIuNzI2NTYyIDM5LjQ0OTIxOSA0MC44MjgxMjUgMzkuNDQ5MjE5IEwgMTQuNjUyMzQ0IDM5LjQ0OTIxOSBMIDE0LjY1MjM0NCA0My42NTYyNSBDIDE0LjY1MjM0NCA0My44MzU5MzggMTQuNTU4NTk0IDQ0IDE0LjQwMjM0NCA0NC4wODk4NDQgQyAxNC4zMjQyMTkgNDQuMTMyODEyIDE0LjIzODI4MSA0NC4xNTYyNSAxNC4xNTIzNDQgNDQuMTU2MjUgWiBNIDE0LjE1MjM0NCA0NC4xNTYyNSAiIGZpbGwtb3BhY2l0eT0iMSIgZmlsbC1ydWxlPSJub256ZXJvIi8+PC9nPjwvZz48L2c+PC9zdmc+");
  --role-mfa: #8558b3;
  --role-mfa-dark: #6f489a;
  --role-mfa-soft: rgba(133, 88, 179, 0.12);
  --role-mfa-border: rgba(133, 88, 179, 0.26);
  --role-doctor: #0789c8;
  --role-doctor-dark: #066b9c;
  --role-doctor-soft: rgba(7, 137, 200, 0.12);
  --role-doctor-border: rgba(7, 137, 200, 0.26);
  --role-admin: #8558b3;
  --role-admin-dark: #6f489a;
  --role-admin-soft: rgba(133, 88, 179, 0.12);
  --role-admin-border: rgba(133, 88, 179, 0.26);
  --role-system: #7b8794;
  --role-system-dark: #68717b;
  --role-system-soft: rgba(123, 135, 148, 0.12);
  --role-system-border: rgba(123, 135, 148, 0.26);
}

.shell[data-ui-role="mfa"] {
  --accent: var(--role-mfa);
  --accent-dark: var(--role-mfa-dark);
  --accent-soft: var(--role-mfa-soft);
  --accent-border: var(--role-mfa-border);
}

.shell[data-ui-role="doctor"] {
  --accent: var(--role-doctor);
  --accent-dark: var(--role-doctor-dark);
  --accent-soft: var(--role-doctor-soft);
  --accent-border: var(--role-doctor-border);
}

.shell[data-ui-role="admin"] {
  --accent: var(--role-admin);
  --accent-dark: var(--role-admin-dark);
  --accent-soft: var(--role-admin-soft);
  --accent-border: var(--role-admin-border);
}

.shell[data-ui-role="system"] {
  --accent: var(--role-system);
  --accent-dark: var(--role-system-dark);
  --accent-soft: var(--role-system-soft);
  --accent-border: var(--role-system-border);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background: #ece8df;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "Geist", "Segoe UI", system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body::before {
  content: none;
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: none;
  opacity: 0;
}

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

code {
  padding: 0.16rem 0.38rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--accent-dark);
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  font-size: 0.82em;
}

.shell {
  --workspace-sidebar-left-width: clamp(238px, 19vw, 292px);
  --workspace-sidebar-right-width: clamp(420px, 29vw, 560px);
  --workspace-side-grip-width: 44px;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0 auto;
  padding: 0 clamp(12px, 1.4vw, 22px) 24px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow-x: clip;
}

.app-shell {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

.shell[data-workspace-features-ready="false"] .workspace-nav,
.shell[data-workspace-features-ready="false"] .metrics-strip,
.shell[data-workspace-features-ready="false"] .workspace-layout {
  opacity: 0;
  pointer-events: none;
}

.poks-shell-chrome {
  display: grid;
  gap: 0;
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 0 0 24px 24px;
  overflow: hidden;
  background: #f8f4ec;
  box-shadow: none;
  backdrop-filter: none;
}

.poks-topbar {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  min-height: 44px;
  padding: 11px 16px 12px;
  background: #fffdfa;
  border-bottom: 1px solid rgba(23, 32, 35, 0.08);
  border-bottom-left-radius: var(--workspace-radius);
  border-bottom-right-radius: var(--workspace-radius);
}

.topbar-left,
.topbar-center,
.topbar-right {
  position: relative;
  z-index: 1;
}

.topbar-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  font-variant-numeric: tabular-nums;
}

.topbar-date {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.topbar-clock {
  min-width: 86px;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(23, 32, 35, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-weight: 700;
}

.topbar-center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  min-width: 0;
  padding: 0.36rem 0.82rem;
  border-radius: 999px;
  border: 1px solid rgba(23, 32, 35, 0.1);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.topbar-area {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  justify-self: end;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.topbar-icon-button {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(23, 32, 35, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  cursor: pointer;
  transition: transform 220ms var(--ease), background 220ms var(--ease), border-color 220ms var(--ease), color 220ms var(--ease);
}

.topbar-icon-button:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--accent) 12%, rgba(255, 255, 255, 0.92));
  border-color: var(--accent-border);
  color: var(--accent-dark);
}

.topbar-action-button {
  min-height: 32px;
  padding: 0.42rem 0.72rem;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 8%, rgba(255, 255, 255, 0.92));
  color: var(--accent-dark);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.topbar-action-button:hover,
.topbar-action-button:focus-visible {
  background: color-mix(in srgb, var(--accent) 15%, rgba(255, 255, 255, 0.96));
  outline: none;
}

.profile-avatar {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, rgba(23, 32, 35, 0.1));
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.profile-avatar .role-icon,
.internal-chat__conversation-avatar .role-icon {
  display: inline-grid;
  place-items: center;
  line-height: 0;
}

.profile-avatar .workspace-fa-icon {
  width: 14px;
  height: 14px;
}

.topbar-auth-glyph {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 15px;
  height: 15px;
  color: currentColor;
}

.topbar-auth-glyph::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2.1px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  box-sizing: border-box;
}

.topbar-auth-glyph::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 2.1px;
  height: 7.5px;
  transform: translateX(-50%);
  background: currentColor;
  border-radius: 999px;
}

.topbar-auth-glyph[data-pending="true"] {
  opacity: 0.7;
}

.topbar-metrics-glyph {
  position: relative;
  display: inline-grid;
  grid-template-columns: repeat(3, 4px);
  align-items: center;
  gap: 2px;
  width: 18px;
  height: 15px;
}

.topbar-metrics-glyph::before,
.topbar-metrics-glyph::after,
.topbar-metrics-glyph span {
  content: "";
  display: block;
  width: 4px;
  border-radius: 999px;
  background: currentColor;
}

.topbar-metrics-glyph::before {
  height: 8px;
}

.topbar-metrics-glyph::after {
  height: 12px;
}

.topbar-metrics-glyph span {
  height: 15px;
}

.topbar-icon-button[aria-expanded="false"] .topbar-metrics-glyph {
  align-items: center;
}

.topbar-icon-button[aria-expanded="false"] .topbar-metrics-glyph::before,
.topbar-icon-button[aria-expanded="false"] .topbar-metrics-glyph::after,
.topbar-icon-button[aria-expanded="false"] .topbar-metrics-glyph span {
  height: 3px;
}

.workspace-nav {
  --workspace-nav-item-height: 46px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 0;
  position: sticky;
  top: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--workspace-radius);
  overflow-x: hidden;
  overflow-y: hidden;
  scrollbar-width: none;
  background: #fffdfa;
  box-shadow: none;
  backdrop-filter: none;
  z-index: 18;
}

.workspace-nav.is-dragging {
  cursor: grabbing;
}

.workspace-nav a,
.sidebar-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.78rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdfa;
  color: var(--ink);
  font-weight: 680;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, border-color 0.2s ease;
}

.workspace-nav a {
  position: relative;
  box-sizing: border-box;
  flex: 0 1 clamp(9.75rem, 7.8vw, 11.75rem);
  min-width: clamp(9.75rem, 7.8vw, 11.75rem);
  min-height: var(--workspace-nav-item-height);
  height: var(--workspace-nav-item-height);
  border: 1px solid transparent;
  border-radius: var(--workspace-radius);
  background: #fffdfa;
  line-height: 1.12;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-wrap: balance;
  white-space: normal;
  gap: 0.45rem;
}

.workspace-fa-icon {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.role-icon {
  display: inline-grid;
  place-items: center;
  line-height: 0;
  vertical-align: middle;
}

.workspace-nav__icon {
  flex: 0 0 1rem;
  width: 1rem;
  height: 1rem;
  display: inline-grid;
  place-items: center;
  color: currentColor;
  opacity: 0.78;
}

.workspace-nav__icon .workspace-fa-icon {
  width: 0.95rem;
  height: 0.95rem;
}

.workspace-nav a.is-active .workspace-nav__icon,
.workspace-nav a[aria-current="page"] .workspace-nav__icon {
  opacity: 0.96;
}

.workspace-nav a > span:last-child {
  min-width: 0;
}

.workspace-nav[hidden],
.workspace-nav a[hidden],
body[data-ui-surface="mobile"] .workspace-nav[hidden],
body[data-ui-surface="mobile"] .workspace-nav a[hidden],
body[data-ui-surface="desktop"] .workspace-nav[hidden],
body[data-ui-surface="desktop"] .workspace-nav a[hidden] {
  display: none !important;
}

.workspace-nav a.has-nav-badge {
  padding-right: 2.25rem;
}

.workspace-nav__badge {
  position: absolute;
  top: -7px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  background: #b5281f;
  color: #ffffff;
  box-shadow: 0 14px 26px -18px rgba(31, 37, 35, 0.72);
  font-size: 0.7rem;
  font-weight: 860;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: center;
  pointer-events: none;
}

.workspace-nav__badge[hidden] {
  display: none;
}

.workspace-nav a[data-workspace-feature="documents"] {
  flex: 0 1 clamp(14.5rem, 12vw, 18rem);
  min-width: clamp(14.5rem, 12vw, 18rem);
}

.workspace-nav a[draggable="true"] {
  cursor: grab;
  user-select: none;
  padding-left: 1.75rem;
}

.workspace-nav a[draggable="true"]::before {
  content: "";
  position: absolute;
  left: 0.58rem;
  top: 50%;
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.26;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.workspace-nav a[draggable="true"]:hover::before,
.workspace-nav a[draggable="true"]:focus-visible::before,
.workspace-nav a[draggable="true"].is-dragging::before,
.workspace-nav a[draggable="true"][aria-grabbed="true"]::before {
  opacity: 0.82;
  transform: translateY(-50%) scale(1.05);
}

.workspace-nav a:hover,
.sidebar-nav a:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.84);
  border-color: var(--accent-border);
}

.workspace-nav a.is-active,
.workspace-nav a[aria-current="page"],
.sidebar-nav a.is-active,
.sidebar-nav a[aria-current="page"] {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent-dark);
  box-shadow: 0 12px 22px -18px color-mix(in srgb, var(--accent-dark) 84%, black);
}

.workspace-nav a.is-dragging {
  opacity: 0.72;
  cursor: grabbing;
}

.workspace-nav a.is-drop-target {
  border-color: var(--accent-border);
  box-shadow: inset 0 0 0 2px var(--accent-soft), 0 12px 22px -18px color-mix(in srgb, var(--accent-dark) 84%, black);
}

.workspace-layout {
  display: grid;
  grid-template-columns:
    var(--workspace-sidebar-left-width)
    minmax(0, 1fr)
    var(--workspace-sidebar-right-width);
  gap: 22px;
  align-items: stretch;
  align-self: stretch;
  min-height: 0;
  height: auto;
  padding-bottom: 24px;
  overflow: hidden;
  transition: grid-template-columns 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.workspace-layout--core {
  grid-template-columns: clamp(224px, 15.8vw, 272px) minmax(0, 1fr);
  gap: 22px;
}

.workspace-category-rail {
  display: grid;
  min-width: 0;
  padding-top: 12px;
}

.workspace-category-shell {
  position: sticky;
  top: 0;
  display: grid;
  gap: 12px;
  min-height: 0;
  padding: 18px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, rgba(255, 255, 255, 0.1));
  border-radius: var(--workspace-radius);
  background: color-mix(in srgb, var(--accent) 18%, #1d2528);
  box-shadow: none;
}

.workspace-category-shell__head {
  display: grid;
  gap: 6px;
}

.workspace-category-shell__head .eyebrow,
.workspace-category-shell__head .workspace-area-sidebar__title,
.workspace-category-shell__note {
  color: #ffffff;
}

.workspace-category-shell__head .eyebrow {
  opacity: 0.74;
}

.workspace-category-shell__note {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.82rem;
  line-height: 1.45;
}

.workspace-category-nav {
  display: grid;
  gap: 8px;
  min-height: 0;
  max-height: calc(100dvh - 240px);
  overflow-y: auto;
  padding-right: 4px;
}

.workspace-category-nav__button {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 0.9rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  text-align: left;
  cursor: pointer;
  transition: transform 220ms var(--ease), background 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease), color 220ms var(--ease);
}

.workspace-category-nav__button:hover,
.workspace-category-nav__button:focus-visible {
  border-color: rgba(255, 255, 255, 0.16);
  background: color-mix(in srgb, var(--accent) 24%, rgba(255, 255, 255, 0.08));
  color: #ffffff;
}

.workspace-category-nav__button:active {
  transform: translateY(1px) scale(0.995);
}

.workspace-category-nav__button.is-active {
  border-color: rgba(255, 255, 255, 0.22);
  background: color-mix(in srgb, var(--accent) 32%, rgba(255, 255, 255, 0.1));
  color: #ffffff;
  box-shadow: inset 3px 0 0 rgba(255, 255, 255, 0.92), 0 16px 28px -24px color-mix(in srgb, var(--accent) 70%, #0f1417);
}

.workspace-category-nav__label {
  display: block;
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 820;
  letter-spacing: -0.02em;
}

.workspace-category-nav__description {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  line-height: 1.4;
}

.workspace-category-nav__empty {
  padding: 0.75rem 0.15rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  line-height: 1.45;
}

.workspace-main {
  display: grid;
  align-content: start;
  gap: 22px;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-top: 12px;
  padding-right: 8px;
  padding-bottom: 156px;
  background: #f8f4ec;
}

.workspace-main--core {
  padding-right: 0;
}

.workspace-context-shell {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, rgba(255, 255, 255, 0.1));
  border-radius: var(--workspace-radius);
  background: color-mix(in srgb, var(--accent) 18%, #1d2528);
  box-shadow: none;
}

.workspace-context-shell__head {
  display: grid;
  gap: 6px;
}

.workspace-area-nav--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.workspace-area-nav--inline .workspace-area-nav__button {
  width: auto;
  min-width: 0;
  padding-right: 1rem;
  padding-left: 1rem;
  border-radius: 14px;
}

.shell > .poks-service-footer {
  grid-column: 1 / -1;
  align-self: end;
  margin-top: 24px;
  margin-bottom: 0;
}

.poks-service-footer {
  flex: 0 0 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  padding: 8px 14px;
  border: 1px solid rgba(156, 167, 178, 0.18);
  border-radius: var(--workspace-radius);
  background: #fffdfa;
  box-shadow: none;
  backdrop-filter: none;
  color: var(--muted);
  font-size: 0.74rem;
  overflow: hidden;
}

.poks-service-footer__copy,
.poks-service-footer__text,
.poks-service-footer__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.poks-service-footer__copy {
  flex: 1 1 auto;
  overflow: hidden;
}

.poks-service-footer__text {
  flex: 1 1 auto;
  margin: 0;
  font-style: normal;
  flex-wrap: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poks-service-footer__actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.poks-service-footer__text span,
.poks-service-footer__link {
  flex: 0 0 auto;
  white-space: nowrap;
}

.poks-service-footer__link {
  color: var(--accent-dark);
  font-weight: 820;
  text-decoration: none;
}

.poks-service-footer__link:hover,
.poks-service-footer__link:focus-visible {
  text-decoration: underline;
}

.poks-service-footer__link--manual {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0.4rem 0.72rem;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-soft);
  text-decoration: none;
}

.metrics-strip {
  display: none;
}

.workspace-sidebar,
.workspace-rail {
  display: grid;
  gap: 14px;
  align-self: start;
  min-width: 0;
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.workspace-sidebar {
  position: static;
  padding-top: 14px;
}

.workspace-rail {
  position: static;
  padding-top: 14px;
}

.workspace-side-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 36px;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(156, 167, 178, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 14px 26px -24px rgba(31, 37, 35, 0.4);
  cursor: pointer;
  font-size: 0.77rem;
  font-weight: 820;
  letter-spacing: 0.02em;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.workspace-side-toggle[data-unread-count]::after {
  content: attr(data-unread-count);
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: #b5281f;
  color: #fff;
  box-shadow: 0 12px 24px -18px rgba(31, 37, 35, 0.7);
  font-size: 0.68rem;
  font-weight: 860;
  line-height: 1;
}

.workspace-side-toggle:hover,
.workspace-focus-toggle:hover {
  border-color: rgba(123, 135, 148, 0.34);
  background: rgba(245, 247, 249, 0.86);
}

.workspace-side-toggle:active,
.workspace-focus-toggle:active {
  transform: translateY(1px) scale(0.99);
}

.workspace-side-toggle [data-sidebar-toggle-label] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-focus-controls {
  position: sticky;
  top: 0;
  z-index: 14;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
  padding: 0 4px 8px;
  pointer-events: none;
}

.workspace-focus-toggle {
  min-height: 34px;
  padding: 0.5rem 0.82rem;
  border-color: rgba(156, 167, 178, 0.24);
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 14px 26px -24px rgba(31, 37, 35, 0.42);
  font-size: 0.78rem;
  pointer-events: auto;
}

body[data-ui-surface="desktop"] .shell[data-sidebar-left="collapsed"] {
  --workspace-sidebar-left-width: var(--workspace-side-grip-width);
}

body[data-ui-surface="desktop"] .shell[data-sidebar-right="collapsed"] {
  --workspace-sidebar-right-width: var(--workspace-side-grip-width);
}

body[data-ui-surface="desktop"] .shell[data-sidebar-left="collapsed"] .workspace-sidebar,
body[data-ui-surface="desktop"] .shell[data-sidebar-right="collapsed"] .workspace-rail {
  overflow: visible;
}

body[data-ui-surface="desktop"] .shell[data-sidebar-left="collapsed"] .workspace-sidebar .sidebar-section,
body[data-ui-surface="desktop"] .shell[data-sidebar-right="collapsed"] .workspace-rail .panel--chat {
  display: none;
}

body[data-ui-surface="desktop"] .shell[data-sidebar-left="collapsed"] .workspace-side-toggle--left,
body[data-ui-surface="desktop"] .shell[data-sidebar-right="collapsed"] .workspace-side-toggle--right {
  min-height: min(280px, 44dvh);
  width: var(--workspace-side-grip-width);
  padding: 12px 4px;
  border-radius: var(--workspace-radius);
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.sidebar-section {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 18px;
  border: 1px solid rgba(156, 167, 178, 0.12);
  border-radius: var(--workspace-radius);
  background: #fffdfa;
  box-shadow: none;
  backdrop-filter: none;
}

.workspace-sidebar-stack,
.workspace-area-sidebar,
.workspace-sidebar-search {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.workspace-area-sidebar__title {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.workspace-area-nav {
  display: grid;
  gap: 8px;
}

.workspace-area-nav__button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 42px;
  padding: 0.72rem 0.9rem;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
  box-shadow: none;
  text-align: left;
  font-weight: 780;
  cursor: pointer;
  transition: color 220ms var(--ease), background 220ms var(--ease), transform 220ms var(--ease);
}

.workspace-area-nav__button:hover,
.workspace-area-nav__button:focus-visible {
  background: color-mix(in srgb, var(--accent) 22%, rgba(255, 255, 255, 0.08));
  color: #ffffff;
}

.workspace-area-nav__button:active {
  transform: translateY(1px) scale(0.995);
}

.workspace-area-nav__button.is-active {
  background: color-mix(in srgb, var(--accent) 24%, rgba(255, 255, 255, 0.08));
  color: #ffffff;
  box-shadow: inset 2px 0 0 color-mix(in srgb, var(--accent) 74%, #ffffff), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.workspace-area-nav__note {
  padding: 0.2rem 0.1rem;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.45;
}

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

.workspace-rail .panel--chat {
  display: grid;
  gap: 12px;
  min-height: 280px;
}

.chat-stage {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  min-height: 180px;
  padding: 18px;
  border: 1px solid rgba(156, 167, 178, 0.12);
  border-radius: var(--workspace-radius);
  background: #fffdfa;
}

.chat-stage strong {
  letter-spacing: -0.03em;
  font-size: 1.02rem;
}

.chat-stage span {
  color: var(--muted);
  line-height: 1.5;
}

.internal-chat {
  min-width: 0;
}

.internal-chat__intro {
  display: grid;
  gap: 16px;
  min-width: 0;
  grid-template-columns: minmax(0, 1.16fr) minmax(320px, 0.84fr);
  align-items: stretch;
}

.internal-chat__intro:has(.internal-chat__token-form[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.internal-chat__status,
.internal-chat__token-form,
.internal-chat__token-compact,
.internal-chat__message-form {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.internal-chat__status {
  padding: 14px 16px;
  border: 1px solid rgba(23, 32, 35, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.internal-chat__status-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.internal-chat__token-compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(36, 100, 74, 0.18);
  border-radius: var(--workspace-radius);
  background: rgba(226, 244, 236, 0.66);
}

.internal-chat__token-compact[hidden],
.internal-chat__token-form[hidden] {
  display: none;
}

.internal-chat__token-form .field,
.internal-chat__message-form .field {
  min-width: 0;
}

.internal-chat__token-form {
  padding: 14px 16px;
  border: 1px solid rgba(23, 32, 35, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.internal-chat__onboarding {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 16px;
}

.internal-chat__onboarding-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid rgba(23, 32, 35, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 18px 32px -30px rgba(31, 37, 35, 0.45);
}

.internal-chat__onboarding-card--primary {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(95, 71, 150, 0.14);
}

.internal-chat__onboarding-card--preview {
  align-content: stretch;
}

.internal-chat__onboarding-card strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.internal-chat__onboarding-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.internal-chat__step-list {
  display: grid;
  gap: 12px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.internal-chat__step-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.internal-chat__step-list li > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: rgba(95, 71, 150, 0.12);
  color: #5f4796;
  font-size: 0.78rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.internal-chat__step-list li strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.92rem;
}

.internal-chat__step-list li p {
  font-size: 0.8rem;
}

.internal-chat__preview-stack {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.internal-chat__preview-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(23, 32, 35, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.internal-chat__preview-card strong {
  font-size: 0.92rem;
}

.internal-chat__preview-kicker {
  color: #5f4796;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.internal-chat__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.internal-chat__modebar {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.internal-chat__done-notes-toggle {
  justify-self: start;
}

.internal-chat__lane {
  display: grid;
  gap: 14px;
  min-width: 0;
  align-content: start;
  padding: 16px 18px;
  border: 1px solid rgba(23, 32, 35, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 18px 34px -30px rgba(31, 37, 35, 0.38);
}

.internal-chat__section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.internal-chat__section-head strong {
  display: block;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.internal-chat__section-head--composer {
  grid-template-columns: minmax(0, 1fr);
}

.internal-chat__composer-copy {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.internal-chat__target-field {
  margin: 0;
}

.internal-chat__target-field span {
  font-size: 0.7rem;
}

.internal-chat__filters .mini-button {
  position: relative;
}

.internal-chat__filters .mini-button.is-active {
  background: var(--ink);
  color: #fff;
  border-color: rgba(31, 37, 35, 0.82);
}

.internal-chat__filter-badge {
  position: absolute;
  top: -8px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  background: #b5281f;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  box-shadow: 0 12px 22px -16px rgba(31, 37, 35, 0.82);
  font-size: 0.68rem;
  font-weight: 920;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.32);
}

.internal-chat__filter-badge[hidden] {
  display: none;
}

.internal-chat__filter-badge--notes {
  right: -8px;
}

.internal-chat__feed {
  display: grid;
  gap: 10px;
  min-height: 160px;
  max-height: min(46dvh, 520px);
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.internal-chat__message-form {
  align-content: start;
  padding: 14px 16px;
  border: 1px solid rgba(23, 32, 35, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.internal-chat__lane--composer .internal-chat__message-form {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.internal-chat__token-form .button,
.internal-chat__message-form .button {
  justify-self: start;
  min-width: 170px;
}

.internal-chat[data-chat-ready="true"] .internal-chat__onboarding {
  display: none;
}

.internal-chat__conversation {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(150, 160, 170, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
}

.internal-chat__conversation:hover,
.internal-chat__conversation:focus-visible,
.internal-chat__conversation.is-active {
  transform: translateY(-1px);
  border-color: var(--accent-border);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
}

.internal-chat__conversation--unread {
  border-color: rgba(181, 40, 31, 0.26);
  background: rgba(255, 250, 249, 0.92);
}

.internal-chat__conversation-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: var(--role-primary-soft);
  color: var(--role-primary-strong);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.internal-chat__conversation-avatar .workspace-fa-icon {
  width: 19px;
  height: 19px;
}

.internal-chat__conversation-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.internal-chat__conversation-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: baseline;
}

.internal-chat__conversation-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.internal-chat__conversation-head time {
  color: var(--muted);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.internal-chat__conversation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.internal-chat__conversation-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.internal-chat__conversation-kind--group {
  background: rgba(95, 71, 150, 0.12);
  color: #5f4796;
}

.internal-chat__conversation-kind--direct {
  background: rgba(7, 137, 200, 0.12);
  color: #0c6b97;
}

.internal-chat__conversation-kind--note {
  background: rgba(190, 140, 48, 0.14);
  color: #8b5c12;
}

.internal-chat__conversation-subtitle {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.internal-chat__conversation p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.79rem;
  line-height: 1.34;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.internal-chat__conversation-tools {
  display: grid;
  align-content: start;
  justify-items: end;
  gap: 8px;
  min-width: 28px;
}

.internal-chat__conversation-badge {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: #b5281f;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.internal-chat__message {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 24px -28px rgba(31, 37, 35, 0.28);
}

.internal-chat__message--unread {
  border-color: rgba(181, 40, 31, 0.28);
  background: rgba(255, 250, 249, 0.86);
}

.internal-chat__message-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
  gap: 6px;
  color: var(--muted);
  font-size: clamp(0.67rem, 0.74rem, 0.82rem);
  line-height: 1.28;
}

.internal-chat__message-sender {
  --internal-chat-sender-color: var(--accent-dark);
  min-width: 0;
  max-height: 2.56em;
  color: var(--internal-chat-sender-color);
  font-weight: 700;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.internal-chat__message-head time {
  white-space: nowrap;
}

.internal-chat__message-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-width: 0;
}

.internal-chat__message-expand,
.internal-chat__message-done {
  display: inline-grid;
  width: 1.42em;
  height: 1.42em;
  min-width: 1.42em;
  padding: 0.12em;
  place-items: center;
  border: 0;
  border-radius: 0.45em;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
}

.internal-chat__conversation-open {
  color: var(--muted);
}

.internal-chat__message-expand:hover,
.internal-chat__message-expand:focus-visible {
  background: rgba(31, 37, 41, 0.08);
  color: var(--ink);
  outline: none;
}

.internal-chat__message-done {
  color: #72a92d;
}

.internal-chat__message-done:hover,
.internal-chat__message-done:focus-visible {
  background: rgba(114, 169, 45, 0.12);
  outline: none;
}

.internal-chat__message-done:disabled,
.internal-chat__done-button:disabled {
  cursor: progress;
  opacity: 0.62;
}

.internal-chat__message-expand svg,
.internal-chat__message-done svg,
.internal-chat__done-button svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.internal-chat__message-done svg circle,
.internal-chat__done-button svg circle {
  stroke-width: 1.9;
}

.internal-chat__done-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: rgba(114, 169, 45, 0.32);
  background: rgba(232, 246, 218, 0.72);
  color: #436d18;
  font-weight: 760;
}

.internal-chat__done-button:hover,
.internal-chat__done-button:focus-visible {
  border-color: rgba(114, 169, 45, 0.5);
  background: rgba(219, 241, 196, 0.92);
  outline: none;
}

.internal-chat__message-body {
  color: var(--ink);
  overflow-wrap: anywhere;
  line-height: 1.42;
}

.internal-chat__message-actions {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.internal-chat__message--done {
  opacity: 0.64;
}

.internal-chat__message--done .internal-chat__message-body {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.practice-overview__status {
  margin-bottom: 10px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.practice-overview__status strong {
  display: block;
  margin-bottom: 4px;
}

.practice-overview__website-link {
  white-space: nowrap;
}

.practice-overview__website-icon {
  display: inline-grid;
  width: 1rem;
  height: 1rem;
  place-items: center;
  line-height: 0;
}

.practice-overview__website-icon .workspace-fa-icon {
  width: 0.92rem;
  height: 0.92rem;
}

.practice-overview__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 14px;
}

.practice-overview__context-stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.practice-timeblick {
  display: grid;
  gap: 10px;
}

.practice-timeblick__header,
.practice-timeblick__widget-meta,
.practice-timeblick__worktime-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.practice-timeblick__header h3 {
  margin: 0;
  font-size: 1.08rem;
}

.practice-timeblick__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(156, 167, 178, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
}

.practice-timeblick__mode {
  min-height: 30px;
  padding: 5px 9px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 760;
  cursor: pointer;
}

.practice-timeblick__mode:hover,
.practice-timeblick__mode:focus-visible {
  color: var(--ink);
  background: var(--accent-soft);
}

.practice-timeblick__mode.is-active {
  color: var(--accent-contrast);
  background: var(--accent);
}

.practice-timeblick__widget {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(156, 167, 178, 0.22);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.68);
}

.practice-timeblick__widget-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 740;
}

.practice-timeblick__view[hidden] {
  display: none;
}

.practice-timeblick__view {
  display: grid;
  min-height: 82px;
  place-items: center;
}

.practice-timeblick__digital-clock {
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.practice-timeblick__analog-clock {
  position: relative;
  width: min(146px, 100%);
  aspect-ratio: 1;
  border: 1px solid rgba(156, 167, 178, 0.28);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.98) 0 55%, transparent 56% 63%, rgba(133, 88, 179, 0.13) 64% 100%),
    repeating-conic-gradient(from -90deg, rgba(133, 88, 179, 0.16) 0deg 1.5deg, transparent 1.5deg 30deg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 10px 22px rgba(23, 32, 35, 0.08);
}

.practice-timeblick__clock-label {
  position: absolute;
  color: var(--muted);
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  font-size: 0.64rem;
  font-weight: 800;
}

.practice-timeblick__clock-label--top {
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.practice-timeblick__clock-label--right {
  top: 50%;
  right: 11px;
  transform: translateY(-50%);
}

.practice-timeblick__clock-label--bottom {
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.practice-timeblick__clock-label--left {
  top: 50%;
  left: 11px;
  transform: translateY(-50%);
}

.practice-timeblick__clock-hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  border-radius: 999px;
  transform: translateX(-50%) rotate(var(--rotation, 0deg));
  transform-origin: bottom center;
}

.practice-timeblick__clock-hand--hour {
  width: 5px;
  height: 24%;
  background: rgba(23, 32, 35, 0.84);
}

.practice-timeblick__clock-hand--minute {
  width: 4px;
  height: 34%;
  background: var(--accent-dark);
}

.practice-timeblick__clock-hand--second {
  width: 2px;
  height: 38%;
  background: var(--danger);
}

.practice-timeblick__clock-center {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border: 2px solid var(--accent-contrast);
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

.practice-timeblick__timeline {
  display: grid;
  width: 100%;
  gap: 6px;
}

.practice-timeblick__timeline-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  color: var(--muted);
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  font-size: 0.62rem;
  font-weight: 800;
}

.practice-timeblick__timeline-scale span:nth-child(2),
.practice-timeblick__timeline-scale span:nth-child(3),
.practice-timeblick__timeline-scale span:nth-child(4) {
  justify-self: center;
}

.practice-timeblick__timeline-scale span:last-child {
  justify-self: end;
}

.practice-timeblick__timeline-track {
  position: relative;
  height: 18px;
  overflow: hidden;
  border: 1px solid rgba(156, 167, 178, 0.22);
  border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, rgba(156, 167, 178, 0.1) 0 calc(25% - 1px), transparent calc(25% - 1px) 25%),
    rgba(246, 248, 250, 0.86);
}

.practice-timeblick__timeline-segments {
  position: absolute;
  inset: 0;
}

.practice-timeblick__timeline-segment {
  position: absolute;
  top: 2px;
  bottom: 2px;
  min-width: 6px;
  border-radius: 999px;
}

.practice-timeblick__timeline-segment.is-past {
  background: rgba(133, 88, 179, 0.28);
}

.practice-timeblick__timeline-segment.is-upcoming {
  background: rgba(133, 88, 179, 0.18);
}

.practice-timeblick__timeline-segment.is-active {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.practice-timeblick__timeline-now {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.92);
  transform: translateX(-50%);
}

.practice-timeblick__timeline-now[hidden] {
  display: none;
}

.practice-timeblick__worktime-status {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 760;
  text-align: center;
}

.practice-timeblick__worktime-meta {
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.practice-timeblick__worktime-meta strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.practice-timeblick__next {
  display: grid;
  gap: 5px;
  padding-top: 12px;
  border-top: 1px solid rgba(156, 167, 178, 0.22);
}

.practice-timeblick__next strong {
  overflow-wrap: anywhere;
}

.practice-timeblick__next > span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.practice-overview__column {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(156, 167, 178, 0.22);
  border-radius: var(--workspace-radius);
  background: rgba(246, 248, 250, 0.62);
}

.practice-overview__column > p:not(.eyebrow) {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.practice-overview__action-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.practice-overview__action-card .button {
  margin-top: auto;
}

.practice-overview__work-item {
  align-items: start;
}

.practice-overview__work-item-copy {
  min-width: 0;
}

.practice-overview__work-item-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.practice-overview__work-item-heading strong {
  min-width: 0;
}

.practice-overview__work-item-icon {
  flex: 0 0 1.35rem;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-grid;
  place-items: center;
  margin-top: 1px;
  color: var(--accent);
}

.practice-overview__work-item-icon .workspace-fa-icon {
  width: 1.2rem;
  height: 1.2rem;
}

.practice-overview__work-item[data-overview-action="workspace_missed_calls_open"] .practice-overview__work-item-icon,
.practice-overview__work-item[data-overview-action="manual_closure_failed"] .practice-overview__work-item-icon {
  color: var(--tone-red);
}

.practice-overview__work-item[data-overview-action="workspace_documents_open"] .practice-overview__work-item-icon {
  color: var(--tone-amber);
}

.practice-overview__work-item[data-overview-action="workspace_waiting_open"] .practice-overview__work-item-icon {
  color: var(--tone-green);
}

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

.practice-closure-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: grid;
  place-items: center;
  padding: 18px;
}

.practice-closure-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 20, 26, 0.42);
  backdrop-filter: blur(4px);
}

.practice-closure-modal__card {
  position: relative;
  z-index: 1;
  width: min(700px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(156, 167, 178, 0.3);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 26px 70px -34px rgba(14, 20, 26, 0.52);
}

.practice-closure-modal__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.practice-closure-modal__header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
}

.practice-closure-modal__header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.practice-closure-modal__close {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
}

.practice-closure-modal__form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.practice-closure-modal__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(170px, 0.65fr);
  gap: 12px;
}

.practice-closure-modal__grid .field.full {
  grid-column: 1 / -1;
}

.practice-closure-modal__status,
.practice-closure-modal__summary {
  padding: 10px 12px;
  border: 1px solid rgba(156, 167, 178, 0.22);
  border-radius: var(--workspace-radius);
  background: rgba(246, 248, 250, 0.78);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.practice-closure-modal__status:empty {
  display: none;
}

.practice-closure-modal__status.is-error {
  border-color: rgba(185, 28, 28, 0.3);
  background: rgba(254, 242, 242, 0.92);
  color: #991b1b;
}

.practice-closure-modal__status.is-success {
  border-color: rgba(22, 101, 52, 0.3);
  background: rgba(240, 253, 244, 0.92);
  color: #166534;
}

.practice-closure-modal__summary strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.practice-closure-modal__confirm {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.4;
}

.practice-closure-modal__confirm input {
  margin-top: 3px;
}

.practice-closure-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 720px) {
  .practice-overview__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .practice-closure-modal__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

.internal-chat-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
}

.internal-chat-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 20, 26, 0.42);
  backdrop-filter: blur(4px);
}

.internal-chat-modal__card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 12px;
  width: min(640px, calc(100vw - 32px));
  height: auto;
  min-width: min(360px, calc(100vw - 32px));
  min-height: 0;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 32px);
  padding: 18px 18px 20px;
  overflow: auto;
  resize: both;
  border: 1px solid rgba(156, 167, 178, 0.3);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 70px -34px rgba(14, 20, 26, 0.45);
}

.internal-chat-modal__card::before {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 18px;
  height: 18px;
  pointer-events: none;
  opacity: 0.72;
  border-right: 2px solid rgba(103, 112, 122, 0.52);
  border-bottom: 2px solid rgba(103, 112, 122, 0.42);
  background: transparent;
}

.internal-chat-modal__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.internal-chat-modal__header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.internal-chat-modal__header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.internal-chat-modal__close {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
}

.internal-chat-modal__body {
  min-height: 92px;
  max-height: min(34dvh, 320px);
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(156, 167, 178, 0.2);
  border-radius: var(--workspace-radius);
  background: rgba(246, 248, 250, 0.72);
  color: var(--ink);
  line-height: 1.5;
  white-space: normal;
}

.internal-chat-modal__body p {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.internal-chat-modal__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.internal-chat-modal__reply {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.internal-chat-modal__reply[hidden] {
  display: none;
}

.internal-chat-modal__templates {
  flex: 1 0 100%;
  padding: 10px;
  border: 1px solid rgba(156, 167, 178, 0.22);
  border-radius: var(--workspace-radius);
  background: rgba(246, 248, 250, 0.62);
}

.internal-chat-modal__templates[hidden] {
  display: none;
}

.internal-chat-modal__templates summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
}

.internal-chat-modal__template-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
  margin-top: 10px;
}

.internal-chat-modal__template-grid textarea {
  min-height: 64px;
}

.internal-chat-modal__template-preview {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(108, 76, 145, 0.18);
  border-radius: var(--workspace-radius);
  background: rgba(108, 76, 145, 0.08);
  color: var(--ink);
}

.internal-chat-modal__template-preview[hidden] {
  display: none;
}

.internal-chat-modal__template-preview strong {
  font-size: 0.78rem;
}

.internal-chat-modal__template-preview span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.internal-chat-modal__template-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.internal-chat-modal__reply textarea {
  min-height: 72px;
  resize: vertical;
}

.internal-chat-modal__reply .field {
  flex: 1 0 100%;
}

.internal-chat-modal__reply .button {
  width: auto;
  min-width: 172px;
  padding-inline: 22px;
}

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

.document-rejection-modal {
  position: fixed;
  inset: 0;
  z-index: 1002;
  display: grid;
  place-items: center;
  padding: 18px;
}

.document-rejection-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 20, 26, 0.44);
  backdrop-filter: blur(4px);
}

.document-rejection-modal__card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(156, 167, 178, 0.3);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 26px 70px -34px rgba(14, 20, 26, 0.45);
}

.document-rejection-modal__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.document-rejection-modal__header h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.document-rejection-modal__close {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
}

.document-rejection-modal__form {
  display: grid;
  gap: 12px;
}

.document-rejection-modal__form textarea {
  min-height: 96px;
  resize: vertical;
}

.document-rejection-modal__field-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.document-rejection-modal__field-head output {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.document-rejection-modal__channel-status {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.document-rejection-modal__channel-status.is-warning {
  color: var(--danger);
  font-weight: 700;
}

.document-rejection-modal__preview,
.document-rejection-modal__sms {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(156, 167, 178, 0.22);
  border-radius: var(--workspace-radius);
  background: rgba(246, 248, 250, 0.72);
}

.document-rejection-modal__preview-head,
.document-rejection-modal__sms-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.document-rejection-modal__preview p,
.document-rejection-modal__sms p {
  margin: 0;
  color: var(--ink);
  line-height: 1.32;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.document-rejection-modal__preview p.is-invalid,
.document-rejection-modal__preview output.is-invalid,
.document-rejection-modal__sms p.is-invalid,
.document-rejection-modal__sms output.is-invalid {
  color: var(--danger);
}

.document-rejection-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

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

.contact-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 1003;
  display: grid;
  place-items: center;
  padding: 18px;
}

.contact-editor-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 20, 26, 0.48);
  backdrop-filter: blur(4px);
}

.contact-editor-modal__card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 16px 18px 14px;
  border: 1px solid rgba(156, 167, 178, 0.3);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 26px 70px -34px rgba(14, 20, 26, 0.45);
}

.contact-editor-modal__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(156, 167, 178, 0.18);
}

.contact-editor-modal__header h3 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.2;
}

.contact-editor-modal__header span {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.contact-editor-modal__close {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--ink);
  cursor: pointer;
}

.contact-editor-modal__form {
  display: grid;
  gap: 10px;
}

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

.contact-dialer-modal {
  position: fixed;
  inset: 0;
  z-index: 1004;
  display: grid;
  place-items: center;
  padding: 18px;
}

.contact-dialer-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 30, 38, 0.48);
  backdrop-filter: blur(8px) saturate(0.92);
}

.contact-dialer-modal__card {
  position: relative;
  z-index: 1;
  width: min(540px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 0;
  border: 1px solid rgba(156, 167, 178, 0.28);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 32px 82px -42px rgba(16, 24, 32, 0.54);
}

.contact-dialer-modal__header {
  position: relative;
  display: block;
  padding: 22px 58px 16px;
  border-bottom: 1px solid rgba(156, 167, 178, 0.2);
  text-align: center;
}

.contact-dialer-modal__header h3 {
  margin: 0;
  color: #17202a;
  font-size: clamp(1.24rem, 2vw, 1.55rem);
  font-weight: 860;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.contact-dialer-modal__header span {
  display: block;
  margin-top: 0.28rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-dialer-modal__close {
  position: absolute;
  top: 16px;
  right: 18px;
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(156, 167, 178, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.contact-dialer-modal__close:hover {
  transform: translateY(-1px);
  border-color: var(--accent-border);
  background: rgba(255, 255, 255, 0.98);
}

.contact-dialer-modal__close:active {
  transform: translateY(0);
}

.contact-dialer-modal__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  justify-items: center;
  padding: 22px 24px 24px;
}

.contact-dialer-target {
  position: relative;
  overflow: hidden;
  display: grid;
  width: min(390px, 100%);
  gap: 10px;
  justify-items: center;
  padding: 18px;
  border: 1px solid rgba(156, 167, 178, 0.26);
  border-radius: 22px;
  background: rgba(248, 251, 253, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 18px 46px -34px rgba(26, 35, 42, 0.42);
}

.contact-dialer-target::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  pointer-events: none;
}

.contact-dialer-target__label {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-dialer-target__display {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 64px;
  display: grid;
  place-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(34, 125, 85, 0.18);
  border-radius: 18px;
  background: rgba(231, 242, 234, 0.88);
  color: #1d5138;
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  font-size: clamp(1rem, 2vw, 1.28rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.contact-dialer-modal__form {
  display: grid;
  width: min(390px, 100%);
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 0;
}

.contact-dialer-modal__status {
  padding: 11px 13px;
  border: 1px solid rgba(156, 167, 178, 0.24);
  border-radius: 16px;
  background: rgba(247, 250, 253, 0.9);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.contact-dialer-modal__form .field {
  gap: 8px;
}

.contact-dialer-modal__form .field > span {
  color: #53606a;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.contact-dialer-modal__form select {
  width: 100%;
  min-height: 52px;
  border-color: rgba(156, 167, 178, 0.32);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: #1c252d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.contact-dialer-modal__status--error {
  border-color: rgba(162, 79, 84, 0.28);
  background: rgba(162, 79, 84, 0.09);
  color: var(--danger);
}

.contact-dialer-modal__status--warn {
  border-color: rgba(154, 107, 47, 0.3);
  background: rgba(154, 107, 47, 0.09);
  color: var(--warn);
}

.contact-dialer-modal__status--success {
  border-color: rgba(34, 125, 85, 0.28);
  background: rgba(34, 125, 85, 0.09);
  color: #1b6848;
}

.contact-dialer-modal__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  margin-top: 2px;
}

.contact-dialer-modal__actions .button {
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border-radius: 999px;
  padding-inline: 18px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.contact-dialer-modal__actions .button--line {
  background: rgba(255, 255, 255, 0.72);
}

.contact-dialer-modal__actions .button--success {
  min-width: 148px;
  background: #197449;
  box-shadow: 0 16px 30px -22px rgba(25, 116, 73, 0.86);
}

.contact-dialer-modal__actions .button:hover {
  transform: translateY(-1px);
}

.contact-dialer-modal__actions .button:active {
  transform: translateY(0);
}

.contact-editor-modal__sections {
  display: grid;
  gap: 10px;
}

.contact-editor-modal__section {
  min-width: 0;
  margin: 0;
  padding: 12px 14px 14px;
  border: 1px solid rgba(156, 167, 178, 0.22);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.96);
}

.contact-editor-modal__section legend {
  padding: 0 7px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-editor-modal__section--safety {
  display: grid;
  gap: 10px;
  border-color: rgba(205, 142, 67, 0.26);
  background: rgba(255, 250, 244, 0.94);
}

.contact-editor-modal__grid {
  display: grid;
  gap: 9px 10px;
}

.contact-editor-modal__grid--identity {
  grid-template-columns: minmax(190px, 1.1fr) minmax(86px, 0.32fr) repeat(2, minmax(150px, 1fr));
  align-items: center;
}

.contact-editor-modal__grid--contact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.contact-editor-modal__field--wide {
  grid-column: span 2;
}

.contact-editor-modal__field--company {
  grid-column: 1 / -1;
}

.contact-editor-modal__field--full {
  grid-column: 1 / -1;
}

.contact-editor-modal__field--color input[type="color"] {
  width: 100%;
  min-height: 42px;
  padding: 5px;
  border-radius: 10px;
  cursor: pointer;
}

.contact-editor-modal__columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}


.contact-editor-modal__columns--single {
  grid-template-columns: 1fr;
}

.contact-editor-modal__group[hidden] {
  display: none;
}

.contact-editor-modal__tool-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.contact-editor-modal__search-icon {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(106, 73, 151, 0.72);
  border-radius: 999px;
  position: relative;
  flex: 0 0 auto;
}

.contact-editor-modal__search-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  right: -6px;
  bottom: -3px;
  border-radius: 999px;
  background: rgba(106, 73, 151, 0.72);
  transform: rotate(45deg);
}
.contact-editor-modal__group {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 0;
}

.contact-editor-modal__group h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 850;
}

.contact-editor-modal__status {
  padding: 8px 10px;
  border: 1px solid rgba(156, 167, 178, 0.24);
  border-radius: var(--workspace-radius);
  background: rgba(246, 248, 250, 0.76);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.42;
}

.contact-editor-modal__status--error {
  border-color: rgba(162, 79, 84, 0.28);
  background: rgba(162, 79, 84, 0.1);
  color: var(--danger);
}

.contact-editor-modal__status--success {
  border-color: rgba(111, 193, 69, 0.32);
  background: rgba(111, 193, 69, 0.12);
  color: #426f2d;
}

.contact-editor-modal__status--warn {
  border-color: rgba(205, 142, 67, 0.34);
  background: rgba(205, 142, 67, 0.12);
  color: #855a22;
}

.contact-editor-modal__tool {
  display: grid;
  grid-template-columns: auto minmax(320px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid rgba(156, 167, 178, 0.22);
  border-radius: var(--workspace-radius);
  background: rgba(246, 248, 250, 0.62);
}

.contact-editor-modal__tool strong,
.contact-editor-modal__tool span {
  display: block;
}

.contact-editor-modal__tool strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.contact-editor-modal__tool span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.contact-editor-modal__tool-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.contact-editor-modal__results {
  display: grid;
  gap: 7px;
}

.contact-editor-modal__results[hidden] {
  display: none;
}

.contact-editor-modal__result,
.contact-editor-modal__match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.contact-editor-modal__result {
  justify-content: space-between;
  padding: 8px 9px;
  border: 1px solid rgba(156, 167, 178, 0.18);
  border-radius: calc(var(--workspace-radius) - 4px);
  background: rgba(255, 255, 255, 0.76);
}

.contact-editor-modal__result strong,
.contact-editor-modal__result span {
  display: block;
}

.contact-editor-modal__result span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
}

.contact-editor-modal__matches {
  display: grid;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(205, 142, 67, 0.28);
  border-radius: var(--workspace-radius);
  background: rgba(205, 142, 67, 0.08);
}

.contact-editor-modal__matches[hidden] {
  display: none;
}

.contact-editor-modal__matches > strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.contact-editor-modal__matches > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.contact-editor-modal__match-list {
  display: grid;
  gap: 8px;
}

.contact-editor-modal__match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid rgba(156, 167, 178, 0.18);
  border-radius: calc(var(--workspace-radius) - 4px);
  background: rgba(255, 255, 255, 0.72);
}

.contact-editor-modal__match strong,
.contact-editor-modal__match span {
  display: block;
}

.contact-editor-modal__match span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
}

.contact-editor-modal__merge {
  display: grid;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(137, 94, 180, 0.28);
  border-radius: var(--workspace-radius);
  background: rgba(137, 94, 180, 0.08);
}

.contact-editor-modal__merge[hidden] {
  display: none;
}

.contact-editor-modal__merge > strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.contact-editor-modal__merge > p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.contact-editor-modal__merge-warning {
  color: #855a22 !important;
}

.contact-editor-modal__merge-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.contact-editor-modal__merge-table label {
  display: grid;
  gap: 5px;
  padding: 8px 9px;
  border: 1px solid rgba(156, 167, 178, 0.18);
  border-radius: calc(var(--workspace-radius) - 4px);
  background: rgba(255, 255, 255, 0.78);
}

.contact-editor-modal__merge-table span {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-editor-modal__merge-table small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.contact-editor-modal__merge-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.contact-editor-modal__check,
.contact-editor-modal__confirm {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.36;
}

.contact-editor-modal__check {
  padding: 8px 10px;
  border: 1px solid rgba(156, 167, 178, 0.2);
  border-radius: calc(var(--workspace-radius) - 2px);
  background: rgba(255, 255, 255, 0.68);
}

.contact-editor-modal__check span {
  display: grid;
  gap: 2px;
}

.contact-editor-modal__check strong {
  font-size: 0.9rem;
}

.contact-editor-modal__check small {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.32;
}

.contact-editor-modal__confirm {
  padding: 8px 10px;
  border: 1px solid rgba(162, 79, 84, 0.24);
  border-radius: var(--workspace-radius);
  background: rgba(162, 79, 84, 0.08);
}

.contact-editor-modal__confirm[hidden] {
  display: none;
}

.contact-editor-modal__hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.32;
}

.contact-editor-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
  border-top: 1px solid rgba(156, 167, 178, 0.14);
}

.contact-editor-modal__spacer {
  flex: 1 1 auto;
}

.internal-chat[data-chat-ready="false"] .internal-chat__message-form,
.internal-chat[data-chat-ready="false"] .internal-chat__feed {
  opacity: 0.72;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  gap: 28px;
  min-height: min(560px, 64dvh);
  align-items: start;
  padding: 28px 0 22px;
}

.hero__copy {
  display: grid;
  gap: 12px;
  max-width: 860px;
  animation: rise 0.62s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: color-mix(in srgb, var(--accent) 68%, var(--ink));
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

h1 {
  max-width: none;
  white-space: nowrap;
  font-size: clamp(3rem, 6.8vw, 6.4rem);
  font-weight: 760;
}

h2 {
  text-wrap: balance;
  font-size: clamp(1.45rem, 1.95vw, 2.15rem);
  font-weight: 820;
}

.hero__text {
  max-width: 66ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.65;
}

.command-panel,
.panel,
.metrics-strip article {
  border: 1px solid rgba(23, 32, 35, 0.1);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 22px 48px rgba(23, 32, 35, 0.08);
  backdrop-filter: blur(14px);
}

.metrics-strip article {
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82), 0 10px 24px -26px rgba(31, 37, 35, 0.3);
}

.command-panel {
  display: grid;
  gap: 18px;
  align-self: stretch;
  min-height: 340px;
  padding: 24px;
  border-radius: var(--workspace-radius);
  position: relative;
  overflow: hidden;
  animation: rise 0.7s 0.08s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.command-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: color-mix(in srgb, var(--accent) 72%, var(--tone-red));
}

.stack-form {
  display: grid;
  gap: 12px;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 32px;
  padding: 0.4rem 0.72rem;
  border: 1px solid rgba(23, 32, 35, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
}

.pulse {
  width: 0.76rem;
  height: 0.76rem;
  border-radius: 999px;
  background: var(--accent);
  animation: breathe 1.8s infinite cubic-bezier(0.16, 1, 0.3, 1);
}

.hint {
  margin: auto 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 0.74rem 0.86rem;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: border-color 220ms var(--ease), box-shadow 220ms var(--ease), transform 220ms var(--ease), background 220ms var(--ease);
}

input,
select {
  min-height: 42px;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-border);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, rgba(255, 255, 255, 0.72));
}

.button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.76rem 1rem;
  cursor: pointer;
  font-weight: 820;
  letter-spacing: -0.02em;
  transition: transform 220ms var(--ease), background 220ms var(--ease), border-color 220ms var(--ease), color 220ms var(--ease), box-shadow 220ms var(--ease);
}

.button:active {
  transform: translateY(1px) scale(0.99);
}

.button--dark {
  background: color-mix(in srgb, var(--accent) 82%, var(--tone-red));
  color: var(--accent-contrast);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.button--dark:hover {
  background: color-mix(in srgb, var(--accent-dark) 88%, var(--tone-red));
}

.button--line {
  border-color: rgba(23, 32, 35, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.button--line:hover {
  background: color-mix(in srgb, var(--accent) 10%, rgba(255, 255, 255, 0.84));
  border-color: var(--accent-border);
  color: var(--accent-dark);
}

.button--danger {
  background: rgba(162, 79, 84, 0.12);
  color: var(--danger);
}

.button--danger:hover {
  background: rgba(162, 79, 84, 0.2);
}

.button--success {
  background: #227d55;
  color: #fff;
}

.button--success:hover {
  background: #196544;
}

.metrics-strip {
  position: static;
  display: grid;
  grid-template-columns: repeat(var(--metric-count, 8), minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
  margin: 12px 0 12px;
  padding: 0 2px 2px;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: visible;
}

.metrics-strip[hidden],
.shell[data-metrics-strip="collapsed"] .metrics-strip {
  display: none;
}

.metrics-strip article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem;
  min-width: 0;
  min-height: 68px;
  padding: 10px 12px 9px;
  border-radius: var(--workspace-radius);
  position: relative;
  overflow: hidden;
  animation: rise 0.58s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i, 1) * 60ms);
}

.metrics-strip__icon {
  grid-row: 1 / 3;
  align-self: center;
  display: inline-grid;
  place-items: center;
  width: 1.68rem;
  height: 1.68rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: color-mix(in srgb, var(--accent-dark) 72%, var(--muted));
  border: 1px solid rgba(156, 167, 178, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.metrics-strip__icon .workspace-fa-icon {
  width: 0.82rem;
  height: 0.82rem;
}

.metrics-strip article::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: rgba(156, 167, 178, 0.24);
}

.metrics-strip article:nth-child(1) {
  --i: 1;
}

.metrics-strip article:nth-child(2) {
  --i: 2;
}

.metrics-strip article:nth-child(3) {
  --i: 3;
}

.metrics-strip article:nth-child(4) {
  --i: 4;
}

.metrics-strip article:nth-child(5) {
  --i: 5;
}

.metrics-strip article:nth-child(6) {
  --i: 6;
}

.metrics-strip article:nth-child(7) {
  --i: 7;
}

.metrics-strip article > span:not(.metrics-strip__icon),
.status-grid span {
  color: inherit;
  font-size: 0.68rem;
  line-height: 1.05;
  font-weight: 740;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metrics-strip strong {
  grid-column: 2;
  align-self: end;
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.2rem, 2.2vw, 2rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.workspace-grid {
  display: block;
  width: 100%;
}

.panel {
  min-width: 0;
  border: 1px solid rgba(23, 32, 35, 0.08);
  border-radius: var(--workspace-radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  background: #fffdfa;
  box-shadow: none;
  animation: rise 0.66s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.panel--contacts {
  overflow: visible;
}

.workspace-main .panel[id] {
  scroll-margin-top: 170px;
}

.workspace-grid > [data-workspace-page] {
  display: none;
}

.workspace-grid > [data-workspace-page].is-active {
  display: grid;
  gap: 20px;
  align-content: start;
  align-items: start;
  width: 100%;
  max-width: none;
}

.workspace-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.workspace-home-actions {
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(260px, 0.85fr);
  gap: 16px;
  margin-bottom: 18px;
}

.workspace-home-search,
.workspace-home-launcher {
  display: grid;
  gap: 14px;
  position: relative;
  padding: 18px;
  border: 1px solid rgba(23, 32, 35, 0.1);
  border-radius: var(--workspace-radius);
  background: #fffdfa;
  box-shadow: none;
}

.workspace-home-search::before,
.workspace-home-launcher::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--tile-tone, var(--accent));
}

.workspace-home-search {
  --tile-tone: var(--tone-blue);
}

.workspace-home-launcher {
  --tile-tone: color-mix(in srgb, var(--accent) 76%, var(--tone-red));
}

.panel__header--home-search,
.workspace-home-launcher .panel__header {
  margin-bottom: 0;
}

.workspace-home-tile {
  min-width: 0;
}

.workspace-home-tile__button {
  --tile-tone: color-mix(in srgb, var(--accent) 76%, var(--tone-red));
  width: 100%;
  height: 100%;
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 210px;
  position: relative;
  isolation: isolate;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--tile-tone) 18%, rgba(23, 32, 35, 0.12));
  border-radius: var(--workspace-radius);
  background: #fffdfa;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
  transition: transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease), background 220ms var(--ease);
}

.workspace-home-tile__button::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: inherit;
  background: var(--tile-tone);
}

.workspace-home-tile__button:hover,
.workspace-home-tile__button:focus-visible {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--tile-tone) 32%, rgba(23, 32, 35, 0.12));
  box-shadow: 0 26px 44px -32px color-mix(in srgb, var(--tile-tone) 32%, rgba(23, 32, 35, 0.22)), inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.workspace-home-tile__eyebrow {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.workspace-home-tile__button strong {
  color: var(--ink);
  font-size: 1.16rem;
  font-weight: 860;
  letter-spacing: -0.02em;
}

.workspace-home-tile__button p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.workspace-home-tile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: color-mix(in srgb, var(--accent) 68%, var(--tone-red));
}

.panel__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel__header.panel__header--stacked,
.telephony-section__header.telephony-section__header--stacked {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "eyebrow actions"
    "title actions";
  align-items: start;
  column-gap: 12px;
  row-gap: 4px;
}

.panel__header.panel__header--stacked > .eyebrow,
.telephony-section__header.telephony-section__header--stacked > .eyebrow {
  grid-area: eyebrow;
  margin-bottom: 0;
}

.panel__header.panel__header--stacked > h2,
.telephony-section__header.telephony-section__header--stacked > h3 {
  grid-area: title;
}

.panel__header.panel__header--stacked > .chip,
.panel__header.panel__header--stacked > .button,
.panel__header.panel__header--stacked > .panel__actions,
.telephony-section__header.telephony-section__header--stacked > .chip,
.telephony-section__header.telephony-section__header--stacked > .button,
.telephony-section__header.telephony-section__header--stacked > .panel__actions {
  grid-area: actions;
  align-self: start;
  justify-self: end;
}

.panel__header--telephony > h2 {
  color: var(--ink);
  font-size: clamp(2.3rem, 3.8vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.panel__header--home {
  margin-bottom: 6px;
}

.panel__lead {
  max-width: 64ch;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.inline-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.inline-form--compact {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.inline-form--compact .button {
  grid-column: 1 / -1;
}

.inline-form--planning {
  grid-template-columns: repeat(2, minmax(140px, 1fr)) auto;
}

.inline-form--planning .button,
.inline-form--appointments .button {
  grid-column: 1 / -1;
}

.inline-form--appointments {
  grid-template-columns: repeat(3, minmax(140px, 1fr));
}

.inline-form--message {
  grid-template-columns: repeat(2, minmax(140px, 1fr));
}

.inline-form--voice {
  grid-template-columns: repeat(3, minmax(140px, 1fr));
}

.inline-form--contacts {
  grid-template-columns: minmax(260px, 1fr) minmax(132px, 168px) minmax(178px, 220px) auto auto;
}

.inline-form--contacts .inline-form__wide {
  min-width: min(560px, 100%);
}

.inline-form--contacts .inline-form__tiny {
  min-width: 132px;
}

.inline-form--contacts .inline-form__sort {
  min-width: 178px;
}

.inline-form--contacts .inline-form__tiny select {
  min-height: 40px;
}

.inline-form--contacts .inline-form__sort select {
  min-height: 40px;
}

.inline-form--contacts .button {
  min-height: 50px;
}

.telephony-panel {
  display: grid;
  gap: 22px;
}

.telephony-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.telephony-hero__copy {
  display: grid;
  gap: 0.42rem;
}

.telephony-hero__copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.3rem, 3.8vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.telephony-hero__subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.32;
}

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

.telephony-kpi {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 90px;
  border: 1px solid rgba(156, 167, 178, 0.18);
  border-radius: var(--workspace-radius);
  background: #fffdfa;
  padding: 18px 20px;
}

.telephony-kpi__icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent);
}

.telephony-kpi__icon svg {
  width: 22px;
  height: 22px;
}

.telephony-kpi__icon .telephony-action-icon {
  width: 22px;
  height: 22px;
}

.telephony-kpi--accepted .telephony-kpi__icon {
  background: rgba(111, 193, 69, 0.18);
  color: #5da93a;
}

.telephony-kpi--rauka .telephony-kpi__icon {
  position: relative;
  background: rgba(31, 122, 92, 0.14);
  color: #145c45;
}

.telephony-kpi__ai-mark {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.telephony-kpi__spark {
  position: absolute;
  color: currentColor;
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
}

.telephony-kpi__spark--one {
  top: 7px;
  right: 9px;
}

.telephony-kpi__spark--two {
  bottom: 8px;
  right: 6px;
  transform: scale(0.82);
}

.telephony-kpi__spark--three {
  bottom: 9px;
  left: 7px;
  transform: scale(0.72);
}

.telephony-kpi--outbound .telephony-kpi__icon {
  background: rgba(43, 145, 201, 0.18);
  color: #1688c4;
}

.telephony-kpi--missed .telephony-kpi__icon {
  background: rgba(247, 112, 96, 0.16);
  color: #ef6d5c;
}

.telephony-kpi--blocked .telephony-kpi__icon {
  background: rgba(97, 101, 109, 0.18);
  color: #60636b;
}

.telephony-kpi--voicemail .telephony-kpi__icon {
  background: rgba(43, 145, 201, 0.18);
  color: #1688c4;
}

.telephony-kpi__copy {
  display: grid;
  gap: 0.08rem;
}

.telephony-kpi__copy strong {
  color: var(--ink);
  font-size: clamp(1.8rem, 2.4vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

.telephony-kpi__copy span {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.35;
}

.telephony-records {
  display: grid;
  gap: 12px;
}

.telephony-filterbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(120px, 0.85fr)) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 0 18px;
  border-top: 1px solid rgba(156, 167, 178, 0.18);
  border-bottom: 1px solid rgba(156, 167, 178, 0.18);
}

.telephony-filterbar .field {
  margin-bottom: 0;
}

.telephony-filterbar .field > span {
  color: rgba(53, 59, 69, 0.72);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.telephony-filterbar__search {
  min-width: 0;
}

.telephony-filterbar__submit {
  min-height: 50px;
}

.telephony-selection-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "title callback clear"
    "note callback clear";
  align-items: center;
  column-gap: 10px;
  row-gap: 4px;
  border: 1px solid rgba(156, 167, 178, 0.2);
  border-radius: var(--workspace-radius);
  background: #fffdfa;
  box-shadow: none;
  padding: 14px 16px;
}

#telephony-selection-title {
  grid-area: title;
  min-width: 0;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 820;
  letter-spacing: -0.03em;
}

#telephony-selection-note {
  grid-area: note;
  min-width: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.32;
}

#telephony-bulk-callback {
  grid-area: callback;
  justify-self: end;
}

#telephony-bulk-clear {
  grid-area: clear;
  justify-self: end;
}

.telephony-bulk-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.telephony-table {
  display: grid;
  gap: 0;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.telephony-table__head,
.telephony-row {
  display: grid;
  grid-template-columns:
    32px
    minmax(148px, 1.02fr)
    minmax(136px, 0.8fr)
    minmax(150px, 0.92fr)
    minmax(150px, 0.94fr)
    minmax(180px, 1.04fr)
    minmax(220px, 1.16fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.telephony-table__head {
  padding: 12px 0;
  border-bottom: 1px solid rgba(156, 167, 178, 0.22);
  align-items: start;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.telephony-table__cell {
  min-width: 0;
}

.telephony-table__head .telephony-table__cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telephony-table__cell--check,
.telephony-row__check {
  display: grid;
  place-items: center;
}

.telephony-table__cell--check input,
.telephony-row__check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent-dark);
}

.telephony-table__cell--type,
.telephony-row__type {
  display: flex;
  align-items: center;
  gap: 12px;
}

.telephony-table__cell--actions {
  display: flex;
  justify-content: flex-start;
  text-align: left;
}

.telephony-row__type,
.telephony-row__datetime,
.telephony-row__caller,
.telephony-row__callee,
.telephony-row__notes,
.telephony-row__actions {
  min-width: 0;
}

.telephony-row {
  padding: 16px 0;
  border-bottom: 1px solid rgba(156, 167, 178, 0.18);
}

.telephony-row:hover {
  background: rgba(245, 248, 252, 0.52);
}

.telephony-row__type-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent);
}

.telephony-row__type-icon svg {
  width: 22px;
  height: 22px;
}

.telephony-row__type-icon .telephony-action-icon {
  width: 22px;
  height: 22px;
}

.telephony-row--accepted .telephony-row__type-icon {
  background: rgba(111, 193, 69, 0.14);
  color: #5da93a;
}

.telephony-row--missed .telephony-row__type-icon {
  background: rgba(247, 112, 96, 0.14);
  color: #ef6d5c;
}

.telephony-row--blocked .telephony-row__type-icon {
  background: rgba(97, 101, 109, 0.16);
  color: #60636b;
}

.telephony-row--voicemail .telephony-row__type-icon {
  background: rgba(43, 145, 201, 0.14);
  color: #1688c4;
}

.telephony-row--outbound .telephony-row__type-icon {
  background: rgba(43, 145, 201, 0.12);
  color: #185c78;
}

.telephony-row__check-placeholder {
  display: block;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(156, 167, 178, 0.22);
  border-radius: 4px;
  background: rgba(247, 250, 253, 0.7);
}

.telephony-row__type-copy {
  display: grid;
  gap: 0.16rem;
}

.telephony-row__type-copy strong {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.telephony-row__type-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.telephony-row__datetime {
  display: grid;
  gap: 0.16rem;
  font-variant-numeric: tabular-nums;
}

.telephony-row__datetime strong {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.telephony-row__datetime span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.telephony-row__caller a,
.telephony-row__caller strong,
.telephony-row__callee strong {
  color: var(--accent-dark);
  font-weight: 760;
}

.telephony-row__caller a,
.telephony-row__callee span {
  display: block;
  text-decoration: none;
}

.telephony-row__caller a:hover {
  text-decoration: underline;
}

.telephony-row__caller-stack {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.telephony-row__caller .telephony-row__caller-name {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 780;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telephony-row__caller-number {
  display: block;
  min-width: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.telephony-row__caller-number .telephony-row__number-link {
  display: inline;
  font-size: inherit;
}

.telephony-row__callee {
  display: grid;
  gap: 0.16rem;
}

.telephony-row__callee span,
.telephony-row__caller {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.telephony-row__notes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.telephony-row__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 8px;
}

.telephony-row--selected {
  border-color: var(--accent-border);
  box-shadow: inset 0 0 0 1px var(--accent-soft);
  background: rgba(247, 250, 253, 0.95);
}

.telephony-row--workflow-done {
  opacity: 0.68;
}

.telephony-row__details {
  grid-column: 2 / -1;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(156, 167, 178, 0.18);
}

.telephony-row__details-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.telephony-row__number-link {
  color: var(--accent-dark);
  text-decoration: none;
}

.telephony-row__number-link:hover {
  text-decoration: underline;
}

.telephony-callback-shell {
  display: grid;
  gap: 14px;
  margin-top: 4px;
  padding-top: 18px;
  border-top: 1px solid rgba(156, 167, 178, 0.18);
  scroll-margin-top: 28px;
}

.telephony-callback-shell.is-focused {
  border-color: rgba(134, 86, 191, 0.32);
  box-shadow:
    0 0 0 1px var(--accent-border),
    0 18px 30px -26px rgba(134, 86, 191, 0.45);
}

.telephony-outbound-shell {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(156, 167, 178, 0.2);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.54);
  padding: 14px;
}

.telephony-outbound-shell.is-focused {
  border-color: rgba(43, 145, 201, 0.34);
  box-shadow:
    0 0 0 1px rgba(43, 145, 201, 0.16),
    0 16px 28px -24px rgba(43, 145, 201, 0.4);
}

.telephony-outbound-form {
  align-items: center;
}

.call-banner--compact {
  margin-bottom: 0;
  padding: 9px 12px;
  border-radius: var(--workspace-radius);
}

.call-banner--success {
  border-color: rgba(111, 193, 69, 0.34);
  background: rgba(255, 255, 255, 0.66);
}

.call-banner--warn {
  border-color: rgba(237, 156, 64, 0.36);
  background: rgba(255, 255, 255, 0.66);
}

.call-banner--error {
  border-color: rgba(229, 88, 78, 0.36);
  background: rgba(255, 255, 255, 0.66);
}

.telephony-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.telephony-section__header .eyebrow {
  margin-bottom: 4px;
}

.telephony-section__header h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.06rem, 1.25vw, 1.22rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.inline-form--triage {
  grid-template-columns: repeat(2, minmax(140px, 1fr));
}

.inline-form--intake,
.inline-form--intake-case {
  grid-template-columns: repeat(2, minmax(140px, 1fr));
}

.form-stack {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.form-stack .inline-form {
  margin-bottom: 0;
}

.form-stack .inline-form:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.case-context {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.quality-section {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.case-context .eyebrow {
  margin-bottom: 0;
}

.quality-section .eyebrow {
  margin-bottom: 0;
}

.planning-grid,
.reporting-grid,
.operations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

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

.planning-column,
.reporting-column,
.operations-column {
  display: grid;
  gap: 10px;
}

.planning-column .eyebrow,
.reporting-column .eyebrow,
.operations-column .eyebrow {
  margin-bottom: 0;
}

.operations-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.field--wide,
.inline-form--message .button,
.inline-form--triage .button,
.inline-form--intake .button,
.inline-form--intake-case .button {
  grid-column: 1 / -1;
}

.list {
  display: grid;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.search-results {
  display: grid;
  gap: 10px;
  max-height: none;
  overflow: visible;
}

.sidebar-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.panel--search {
  display: grid;
  gap: 18px;
  width: min(100%, 1360px);
}

.panel__header--search {
  align-items: start;
}

.search-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.72fr);
  gap: 18px;
  align-items: start;
}

.search-workspace__form,
.search-workspace__hint {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid rgba(23, 32, 35, 0.08);
  border-radius: 18px;
  background: #fffdfa;
  box-shadow: none;
}

.search-workspace__hint {
  background: rgba(255, 255, 255, 0.9);
}

.search-workspace__actions {
  display: grid;
  gap: 10px;
}

.search-workspace__submit {
  justify-self: start;
}

.search-workspace__note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.search-workspace__hint {
  align-content: start;
}

.search-workspace__hint-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.42;
}

.search-results .empty {
  padding: 22px 24px;
  border-style: solid;
  border-color: color-mix(in srgb, var(--accent) 18%, rgba(31, 37, 35, 0.12));
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(31, 37, 35, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 28px -30px rgba(23, 32, 35, 0.42);
}

.search-result:hover,
.search-result:focus-within {
  border-color: var(--accent-border);
  background: rgba(255, 255, 255, 0.96);
}

.search-result__copy {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
}

.search-result__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 8px;
}

.search-result strong {
  letter-spacing: -0.02em;
}

.search-result p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.32;
}

@media (max-width: 980px) {
  .search-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
}

.call-banner {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 16px;
  border: 0;
  border-left: 4px solid rgba(156, 167, 178, 0.34);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.72);
  padding: 15px 16px;
}

.call-banner strong {
  letter-spacing: -0.02em;
}

.call-banner span {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.32;
}

.list--soft {
  gap: 8px;
}

.contact-subnav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(156, 167, 178, 0.2);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.72);
}

.contact-subnav__button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: calc(var(--workspace-radius) - 5px);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
}

.contact-subnav__button.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(106, 73, 151, 0.18);
}

.contact-subview[hidden] {
  display: none;
}

.contact-discovery-workspace__form {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(190px, 0.8fr) minmax(180px, 0.85fr) minmax(140px, 0.5fr) minmax(110px, 0.4fr) auto;
  gap: 10px;
  align-items: end;
  overflow: visible;
}

.contact-discovery-dropdown {
  position: relative;
  min-width: 0;
  overflow: visible;
}

.contact-discovery-dropdown__button {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(156, 167, 178, 0.24);
  border-radius: calc(var(--workspace-radius) - 2px);
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-weight: 800;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-discovery-dropdown__menu {
  position: absolute;
  z-index: 45;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  box-sizing: border-box;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  max-height: min(280px, 46vh);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  display: grid;
  grid-auto-rows: minmax(34px, auto);
  gap: 1px;
  padding: 6px;
  border: 1px solid rgba(156, 167, 178, 0.24);
  border-radius: calc(var(--workspace-radius) - 4px);
  background: #fff;
  box-shadow: var(--workspace-shadow);
}

.contact-discovery-dropdown__menu[hidden] {
  display: none;
}

.contact-discovery-dropdown__option {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 7px 8px;
  border-radius: 7px;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.2;
  cursor: pointer;
}

.contact-discovery-dropdown__option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--accent);
  justify-self: center;
}

.contact-discovery-dropdown__option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-discovery-dropdown__option:hover {
  background: rgba(106, 73, 151, 0.08);
}

.contact-discovery-workspace__summary {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.contact-discovery-results,
.contact-discovery-history__list {
  margin-top: 10px;
}

.contact-discovery-result,
.contact-discovery-history__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(156, 167, 178, 0.16);
  border-radius: calc(var(--workspace-radius) - 4px);
  background: rgba(255, 255, 255, 0.82);
}

.contact-discovery-result__main,
.contact-discovery-history__item {
  min-width: 0;
}

.contact-discovery-result__main strong,
.contact-discovery-history__item strong,
.contact-discovery-result__main span,
.contact-discovery-history__item span,
.contact-discovery-result__main small,
.contact-discovery-history__item small {
  display: block;
  overflow-wrap: anywhere;
}

.contact-discovery-result__main span,
.contact-discovery-history__item span,
.contact-discovery-result__main small,
.contact-discovery-history__item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.contact-discovery-result__meta,
.contact-discovery-result__actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}
.contact-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.contact-workbench__main,
.contact-workbench__side {
  min-width: 0;
}

.contact-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(260px, 1.1fr) auto auto;
  gap: 14px;
  align-items: center;
  min-width: 860px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(156, 167, 178, 0.18);
}

.contact-card:hover {
  background: rgba(245, 248, 252, 0.52);
}

.contact-card__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.contact-card__identity > div,
.contact-card__fields {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.contact-card__identity strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.contact-card__identity span,
.contact-card__fields span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.38;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-card__swatch {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  background: var(--contact-color, var(--accent));
  box-shadow: 0 0 0 1px rgba(31, 37, 35, 0.14);
}

.contact-card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 160px;
}

.contact-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

@media (max-width: 1080px) {
  .contact-discovery-workspace__form,
  .contact-discovery-result,
  .contact-discovery-history__item,
  .inline-form--contacts,
  .contact-workbench {
    grid-template-columns: 1fr;
  }

  .contact-editor-modal__grid--identity,
  .contact-editor-modal__columns,
  .contact-editor-modal__tool {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-editor-modal__field--company,
  .contact-editor-modal__columns--single {
    grid-column: 1 / -1;
  }

  .contact-editor-modal__columns--single {
    grid-template-columns: 1fr;
  }

  .contact-dialer-modal__body {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .contact-dialer-modal__form {
    align-content: start;
    padding: 0;
  }

  .inline-form--contacts .button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .panel__actions,
  .contact-editor-modal__actions,
  .contact-dialer-modal__actions {
    justify-content: stretch;
  }

  .contact-dialer-modal__actions {
    grid-template-columns: 1fr;
  }

  .panel__actions > *,
  .contact-editor-modal__actions > .button,
  .contact-dialer-modal__actions > .button {
    width: 100%;
  }

  .contact-dialer-modal {
    padding: 10px;
  }

  .contact-dialer-modal__card {
    width: min(100%, calc(100vw - 20px));
    border-radius: 20px;
  }

  .contact-dialer-modal__header {
    padding-inline: 52px;
  }

  .contact-dialer-modal__body {
    padding-inline: 16px;
  }

  .contact-editor-modal__grid,
  .contact-editor-modal__grid--identity,
  .contact-editor-modal__columns,
  .contact-editor-modal__tool,
  .contact-editor-modal__field--wide,
  .contact-editor-modal__field--company,
  .contact-editor-modal__field--full {
    grid-template-columns: 1fr;
    grid-column: 1 / -1;
  }

  .contact-editor-modal__tool-row,
  .contact-editor-modal__merge-table {
    grid-template-columns: 1fr;
  }

  .contact-editor-modal__match,
  .channel-recipient-modal__search,
  .channel-recipient-modal__item,
  .channel-recipient-modal__value {
    grid-template-columns: 1fr;
  }

  .channel-recipient-modal__values {
    justify-content: stretch;
  }

  .channel-recipient-modal__value {
    width: 100%;
  }
}

.list-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(156, 167, 178, 0.08);
  border-radius: var(--workspace-radius);
  background: rgba(247, 250, 253, 0.9);
  overflow: visible;
}

.list-pager__copy {
  display: grid;
  flex: 1 1 220px;
  gap: 4px;
  min-width: 0;
}

.list-pager__copy strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 820;
  letter-spacing: -0.03em;
}

.list-pager__copy span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.32;
}

.list-pager__controls {
  display: flex;
  flex: 1 1 320px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  max-width: 100%;
  min-width: 0;
}

.list-pager__size {
  flex: 0 1 190px;
  min-width: min(170px, 100%);
  margin-bottom: 0;
}

.list-pager__nav {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
}

.list-pager__nav .button {
  flex: 0 1 auto;
  min-width: 92px;
}

.list-pager__button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 12px 28px -32px rgba(31, 37, 35, 0.28);
}

.item--call {
  align-items: start;
}

.item--document {
  align-items: start;
}

.item--selected {
  border-color: rgba(123, 135, 148, 0.34);
  box-shadow: inset 0 0 0 1px rgba(123, 135, 148, 0.08);
}

.item strong {
  display: block;
  margin-bottom: 0.2rem;
  letter-spacing: -0.02em;
}

.item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.32;
}

.item__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.item--document .item__actions {
  align-content: flex-start;
  padding-top: 2px;
}

.document-request {
  display: grid;
  gap: 0.42rem;
  min-width: 0;
}

.document-request__title {
  margin: 0;
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 760;
  line-height: 1.12;
  letter-spacing: 0;
  text-wrap: balance;
}

.document-request__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.document-request__chips .chip {
  min-height: 28px;
  padding: 0.28rem 0.72rem;
  font-family: "Satoshi", "Geist", "Aptos", sans-serif;
  font-size: 0.8rem;
  font-weight: 820;
  letter-spacing: -0.005em;
  background: rgba(245, 247, 249, 0.9);
  color: #59636e;
}

.document-request__chips .chip--warn {
  background: rgba(155, 91, 24, 0.1);
  color: #7d5a32;
}

.document-request__chips .chip--danger {
  background: rgba(154, 59, 47, 0.1);
  color: #8b493f;
}

.document-request__chips .chip--info {
  background: rgba(43, 145, 201, 0.1);
  color: #1d789f;
}

.document-request__message {
  display: grid;
  gap: 0.2rem;
  max-width: min(62rem, 100%);
  margin-top: 0.12rem;
  padding: 0.58rem 0.78rem 0.62rem 0.9rem;
  border: 0;
  border-left: 4px solid var(--warn);
  border-radius: 0 var(--workspace-radius) var(--workspace-radius) 0;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  box-shadow: none;
}

.document-request__message > span {
  color: var(--warn);
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.document-request__message > strong {
  margin: 0;
  color: var(--ink);
  font-size: clamp(0.98rem, 0.92rem + 0.22vw, 1.12rem);
  line-height: 1.35;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.document-request__meta {
  font-size: 0.86rem;
}

.call-details {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(156, 167, 178, 0.18);
}

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

.call-details__item {
  display: grid;
  gap: 4px;
}

.call-details__item span {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.call-details__item strong {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  word-break: break-word;
}

@media (max-width: 760px) {
  .list-pager {
    flex-direction: column;
    align-items: stretch;
  }

  .list-pager__controls {
    width: 100%;
    justify-content: stretch;
  }

  .list-pager__size {
    min-width: 0;
    width: 100%;
  }

  .list-pager__nav {
    width: 100%;
  }

  .list-pager__nav .button {
    flex: 1 1 0;
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0.2rem 0.58rem;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, rgba(23, 32, 35, 0.1));
  background: color-mix(in srgb, var(--accent) 8%, rgba(255, 255, 255, 0.86));
  color: color-mix(in srgb, var(--accent) 78%, var(--ink));
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.chip--soft {
  border-color: rgba(23, 32, 35, 0.08);
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
}

.workspace-home-tile__button[data-workspace-home-area="telephony"] {
  --tile-tone: var(--tone-blue);
}

.workspace-home-tile__button[data-workspace-home-area="communication"] {
  --tile-tone: color-mix(in srgb, var(--accent) 74%, var(--tone-red));
}

.workspace-home-tile__button[data-workspace-home-area="documents"] {
  --tile-tone: var(--tone-amber);
}

.workspace-home-tile__button[data-workspace-home-area="appointments"] {
  --tile-tone: color-mix(in srgb, var(--tone-blue) 72%, var(--accent) 28%);
}

.workspace-home-tile__button[data-workspace-home-area="waiting"] {
  --tile-tone: var(--tone-green);
}

.workspace-home-tile__button[data-workspace-home-area="reports"] {
  --tile-tone: color-mix(in srgb, var(--tone-blue) 44%, var(--ink) 56%);
}

.workspace-home-tile__button[data-workspace-home-area="settings"] {
  --tile-tone: color-mix(in srgb, var(--accent) 52%, var(--ink) 48%);
}

.workspace-context-shell .eyebrow,
.workspace-context-shell .workspace-area-sidebar__title {
  color: #ffffff;
}

.workspace-context-shell .eyebrow {
  opacity: 0.74;
}

.workspace-context-shell .workspace-area-sidebar__title {
  letter-spacing: -0.03em;
}

.workspace-context-shell .workspace-area-nav__button[data-workspace-area-target="home"] {
  color: rgba(255, 255, 255, 0.92);
}

.chip--warn {
  background: rgba(155, 91, 24, 0.12);
  color: var(--warn);
}

.chip--danger {
  background: rgba(154, 59, 47, 0.12);
  color: var(--danger);
}

.chip--info {
  background: rgba(43, 145, 201, 0.12);
  color: #1688c4;
}

.chip--success {
  background: rgba(80, 145, 84, 0.12);
  color: #3e7d42;
}

.panel--channels {
  min-height: auto;
  gap: 16px;
  width: min(100%, 1520px);
}

.panel--channels .panel__actions {
  align-self: center;
}

.channel-new-message-button {
  min-height: 42px;
  padding-inline: 18px;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 28px -18px rgba(70, 34, 112, 0.56);
  white-space: nowrap;
}

.channel-workbench {
  --channel-pane-gap: 12px;
  --channel-pane-resizer-width: 10px;
  --channel-mailbox-width: 208px;
  --channel-list-width: 336px;
  display: grid;
  width: 100%;
  container-type: inline-size;
  isolation: isolate;
  grid-template-columns:
    minmax(172px, var(--channel-mailbox-width))
    var(--channel-pane-resizer-width)
    minmax(272px, var(--channel-list-width))
    var(--channel-pane-resizer-width)
    minmax(320px, 1fr);
  gap: var(--channel-pane-gap);
  min-height: 0;
  align-items: stretch;
}

.channel-mailboxes,
.channel-list-pane,
.channel-detail-pane,
.channel-pane-resizer {
  min-width: 0;
}

.channel-mailboxes,
.channel-list-pane,
.channel-detail-pane {
  position: relative;
  z-index: 0;
  overflow: hidden;
}

.channel-pane-resizer {
  position: relative;
  display: grid;
  place-items: center;
  align-self: stretch;
  min-height: 0;
  border-radius: 0;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}

.channel-pane-resizer::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(17, 23, 22, 0.12);
  opacity: 1;
  transition: width 180ms ease, background 180ms ease;
}

.channel-pane-resizer::after {
  content: none;
}

.channel-pane-resizer:hover::before,
.channel-pane-resizer:focus-visible::before,
.channel-pane-resizer.is-active::before {
  width: 2px;
  background: color-mix(in srgb, var(--accent) 42%, rgba(17, 23, 22, 0.26));
}

.channel-pane-resizer:focus-visible {
  outline: none;
}

body.is-channel-pane-resizing {
  user-select: none;
}

body.is-channel-pane-resizing,
body.is-channel-pane-resizing * {
  cursor: col-resize;
}

.channel-mailboxes {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(156, 167, 178, 0.16);
  border-radius: var(--workspace-radius);
  background: #fffdfa;
  box-shadow: none;
}

.channel-mailbox {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  row-gap: 3px;
  width: 100%;
  min-height: 46px;
  padding: 10px 36px 10px 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.channel-mailbox__icon {
  grid-row: 1 / span 2;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.channel-mailbox__fa-icon {
  display: block;
  width: 15px;
  height: 15px;
  fill: none;
  overflow: visible;
}

.channel-mailbox__fa-icon path {
  fill: currentColor;
  stroke: none;
}

.channel-mailbox__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.channel-mailbox:hover,
.channel-mailbox:focus-visible,
.channel-mailbox.is-active {
  border-color: var(--accent-border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 28px -28px rgba(23, 32, 35, 0.5);
  outline: none;
}

.channel-mailbox::after {
  content: attr(data-count);
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 22px;
  min-height: 22px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(123, 135, 148, 0.12);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.channel-mailbox.is-active::after {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.channel-mailbox strong {
  font-size: 0.9rem;
  line-height: 1.18;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-mailbox > span:not(.channel-mailbox__icon):not(.channel-mailbox__copy),
.channel-mailbox__copy > span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
  display: none;
}

.channel-mailbox.is-active > span:not(.channel-mailbox__icon):not(.channel-mailbox__copy),
.channel-mailbox.is-active .channel-mailbox__copy > span {
  display: block;
}

.channel-list-pane,
.channel-detail-pane {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(156, 167, 178, 0.14);
  border-radius: 22px;
  background: #fffdfa;
  box-shadow: none;
}

.channel-toolbar {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(150px, 0.42fr) auto;
  align-items: center;
  gap: 10px;
}

.channel-toolbar .button {
  min-height: 42px;
}

.channel-overview {
  margin-bottom: 0;
  padding: 10px 12px;
  border-style: solid;
  border-radius: 14px;
  border-color: rgba(156, 167, 178, 0.14);
  background: color-mix(in srgb, var(--accent) 8%, rgba(247, 250, 253, 0.96));
}

.channel-overview strong {
  font-size: 0.92rem;
}

.channel-overview span {
  font-size: 0.78rem;
}

.channel-message-list {
  display: grid;
  gap: 8px;
  max-height: min(56dvh, 660px);
  min-width: 0;
  overflow: auto;
  padding: 4px;
  border: 1px solid rgba(156, 167, 178, 0.14);
  border-radius: 18px;
  background: rgba(247, 249, 252, 0.7);
}

.channel-message {
  display: grid;
  gap: 6px;
  padding: 12px 13px;
  border: 1px solid rgba(156, 167, 178, 0.12);
  border-left: 4px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 28px -32px rgba(23, 32, 35, 0.4);
  cursor: pointer;
}

.channel-message:hover,
.channel-message:focus-visible,
.channel-message.is-selected {
  border-color: var(--accent-border);
  border-left-color: var(--accent);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
}

.channel-message__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.channel-message__head strong {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.channel-message__head time {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.channel-message p {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
}

.channel-message > span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.channel-detail {
  display: grid;
  gap: 12px;
  min-height: 260px;
  padding: 18px;
  border: 1px solid rgba(156, 167, 178, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.channel-detail__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.channel-detail__header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.channel-detail__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 280px;
}

@container (max-width: 899px) {
  .channel-workbench {
    grid-template-columns: 1fr;
  }

  .channel-pane-resizer {
    display: none;
  }

  .channel-mailboxes {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .channel-toolbar,
  .channel-detail__header,
  .channel-composer__bar {
    grid-template-columns: 1fr;
  }

  .channel-detail__actions,
  .channel-composer__actions {
    justify-content: flex-start;
    max-width: none;
  }
}

.channel-detail__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.channel-detail__body {
  min-height: 96px;
  max-height: min(28dvh, 320px);
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(156, 167, 178, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  line-height: 1.48;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.channel-detail__meta {
  margin-top: 0;
}

.channel-detail__technical {
  border-top: 1px solid rgba(156, 167, 178, 0.16);
  padding-top: 8px;
}

.channel-detail__technical summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 780;
}

.channel-detail__technical .channel-detail__meta {
  margin-top: 8px;
}

.channel-composer {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(156, 167, 178, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.channel-composer.is-draft-active {
  border-color: var(--accent-border);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 34px -28px rgba(70, 34, 112, 0.42);
}

.channel-composer__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.channel-composer__bar strong {
  font-size: 0.96rem;
}

.channel-composer__bar span {
  color: var(--muted);
  font-size: 0.78rem;
}

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

.channel-composer textarea {
  min-height: 86px;
}

.channel-composer-extra,
.channel-template-context-shell {
  grid-column: 1 / -1;
  border: 1px solid rgba(156, 167, 178, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px 12px;
}

.channel-composer-extra summary,
.channel-template-context-shell summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 780;
}

.channel-composer-extra__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.channel-template-context-shell .field {
  margin-top: 8px;
}

.channel-composer__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.channel-recipient-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 7px;
  align-items: stretch;
}

.channel-recipient-control input {
  min-width: 0;
}

.channel-recipient-picker-button {
  display: inline-grid;
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  place-items: center;
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--accent-dark);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.channel-recipient-picker-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.channel-recipient-picker-button:hover,
.channel-recipient-picker-button:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: none;
  transform: translateY(-1px);
}

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

.channel-recipient-modal {
  position: fixed;
  inset: 0;
  z-index: 1004;
  display: grid;
  place-items: center;
  padding: 18px;
}

.channel-recipient-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 20, 26, 0.46);
  backdrop-filter: blur(4px);
}

.channel-recipient-modal__card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 12px;
  width: min(760px, calc(100vw - 32px));
  max-height: min(86dvh, 720px);
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(156, 167, 178, 0.28);
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
}

.channel-recipient-modal__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(156, 167, 178, 0.2);
}

.channel-recipient-modal__header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.2;
}

.channel-recipient-modal__header span {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.channel-recipient-modal__close {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.channel-recipient-modal__search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.channel-recipient-modal__search .mini-button {
  min-height: 40px;
}

.channel-recipient-modal__status {
  padding: 8px 10px;
  border: 1px solid rgba(156, 167, 178, 0.24);
  border-radius: var(--workspace-radius);
  background: rgba(246, 248, 250, 0.76);
  color: var(--ink);
  font-size: 0.83rem;
  line-height: 1.35;
}

.channel-recipient-modal__status--error {
  border-color: rgba(162, 79, 84, 0.28);
  background: rgba(162, 79, 84, 0.1);
  color: var(--danger);
}

.channel-recipient-modal__status--success {
  border-color: rgba(111, 193, 69, 0.32);
  background: rgba(111, 193, 69, 0.12);
  color: #426f2d;
}

.channel-recipient-modal__status--warn {
  border-color: rgba(205, 142, 67, 0.34);
  background: rgba(205, 142, 67, 0.12);
  color: #855a22;
}

.channel-recipient-modal__list {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 90px;
  max-height: 100%;
  min-block-size: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 4px 2px 0;
}

.channel-recipient-modal__item {
  display: grid;
  grid-template-columns: minmax(180px, 0.82fr) minmax(0, 1.18fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(156, 167, 178, 0.2);
  border-radius: 8px;
  background: rgba(247, 250, 253, 0.68);
}

.channel-recipient-modal__identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.channel-recipient-modal__identity strong,
.channel-recipient-modal__identity span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-recipient-modal__identity strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.channel-recipient-modal__identity span {
  color: var(--muted);
  font-size: 0.76rem;
}

.channel-recipient-modal__swatch {
  width: 12px;
  height: 28px;
  border-radius: 999px;
  background: var(--contact-color, var(--accent));
  box-shadow: 0 0 0 1px rgba(31, 37, 35, 0.14);
}

.channel-recipient-modal__values {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.channel-recipient-modal__value {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  max-width: 100%;
  text-align: left;
}

.channel-recipient-modal__value span {
  color: inherit;
  font-weight: 850;
}

.channel-recipient-modal__value strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.call-details__events {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.call-gdt-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.06);
}

.call-gdt-panel--success {
  border-color: rgba(22, 163, 74, 0.24);
  background: rgba(22, 163, 74, 0.07);
}

.call-gdt-panel--warn {
  border-color: rgba(217, 119, 6, 0.26);
  background: rgba(217, 119, 6, 0.08);
}

.call-gdt-panel--danger {
  border-color: rgba(220, 38, 38, 0.24);
  background: rgba(220, 38, 38, 0.07);
}

.call-gdt-panel__head,
.call-gdt-panel__actions,
.call-gdt-panel__candidate,
.call-gdt-panel__conflicts label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.call-gdt-panel__head {
  justify-content: space-between;
  margin-bottom: 10px;
}

.call-gdt-panel__head span,
.call-gdt-panel__candidate span {
  color: var(--muted);
  font-size: 0.82rem;
}

.call-gdt-panel__actions {
  flex-wrap: wrap;
  margin-top: 10px;
}

.call-gdt-panel__candidates,
.call-gdt-panel__conflicts {
  display: grid;
  gap: 8px;
}

.call-gdt-panel__candidate {
  justify-content: space-between;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.call-gdt-panel__candidate div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.call-gdt-panel__candidate.is-selected {
  border-color: rgba(22, 163, 74, 0.32);
}

.call-gdt-panel__conflicts label {
  justify-content: space-between;
  padding: 6px 0;
}

.call-gdt-panel__conflicts select {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.36rem;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  cursor: pointer;
  padding: 0.36rem 0.64rem;
  font-size: 0.82rem;
  font-weight: 760;
}

a.mini-button {
  text-decoration: none;
}

.mini-button--primary {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.mini-button--success {
  border-color: rgba(34, 125, 85, 0.28);
  background: rgba(34, 125, 85, 0.1);
  color: #1b6848;
}

.mini-button--success:hover,
.mini-button--success:focus-visible {
  background: rgba(34, 125, 85, 0.16);
  outline: none;
}

.document-contact-add-button {
  width: 34px;
  min-width: 34px;
  min-height: 30px;
  padding: 0;
  gap: 0;
}

.document-contact-add-button__icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}
.document-contact-add-button.is-existing,
.document-contact-add-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}


.mini-button.is-busy {
  cursor: wait;
  opacity: 0.76;
}

.mini-button.is-busy::before {
  content: "";
  width: 0.78em;
  height: 0.78em;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: mini-button-spinner 0.72s linear infinite;
}

@keyframes mini-button-spinner {
  to {
    transform: rotate(360deg);
  }
}

.mini-button:active {
  transform: translateY(1px);
}

.telephony-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  border-radius: 8px;
  white-space: nowrap;
}

.telephony-action-button:hover,
.telephony-action-button:focus-visible {
  border-color: color-mix(in srgb, currentColor 42%, var(--line));
  outline: none;
}

.telephony-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.telephony-action-button--rueckruf {
  color: var(--accent-contrast);
}

.mini-button.telephony-action-button--rueckruf {
  border-color: rgba(43, 145, 201, 0.28);
  background: rgba(43, 145, 201, 0.1);
  color: #185c78;
}

.mini-button.telephony-action-button--rueckruf:hover,
.mini-button.telephony-action-button--rueckruf:focus-visible {
  background: rgba(43, 145, 201, 0.16);
  color: #104a62;
}

.telephony-action-button--redial {
  color: #354451;
}

.telephony-action-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 1.18em;
  height: 1.18em;
  background: currentColor;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.telephony-action-icon--wahlwiederholung {
  -webkit-mask-image: var(--telephony-icon-wahlwiederholung);
  mask-image: var(--telephony-icon-wahlwiederholung);
}

.telephony-action-icon--rueckruf {
  -webkit-mask-image: var(--telephony-icon-rueckruf);
  mask-image: var(--telephony-icon-rueckruf);
}

.telephony-reverse-search-button {
  width: 30px;
  min-width: 30px;
  padding: 0;
}

.telephony-reverse-search-button img {
  display: block;
  width: 17px;
  height: 17px;
  object-fit: contain;
}

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

.status-grid div {
  display: grid;
  gap: 0.32rem;
  padding: 14px 0;
  border-top: 1px solid rgba(156, 167, 178, 0.2);
}

.status-grid strong {
  overflow-wrap: anywhere;
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}

.event-log {
  min-height: 132px;
  margin-top: 18px;
  border-radius: var(--workspace-radius);
  background: rgba(245, 247, 249, 0.9);
  color: var(--ink);
  border: 1px solid rgba(156, 167, 178, 0.22);
  padding: 16px;
  font-family: "JetBrains Mono", "Cascadia Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.55;
}

.event-log p {
  margin: 0 0 0.45rem;
}

.empty,
.error {
  border: 1px dashed rgba(31, 37, 35, 0.2);
  border-radius: var(--workspace-radius);
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.34);
}

.error {
  border-color: rgba(154, 59, 47, 0.35);
  color: var(--danger);
}

.skeleton {
  height: 72px;
  border-radius: var(--workspace-radius);
  background: rgba(255, 255, 255, 0.52);
  animation: none;
}

.skeleton--short {
  width: 72%;
}

@keyframes shimmer {
  from {
    background-position: 160% 0;
  }
  to {
    background-position: -60% 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.64;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.14);
  }
}

@media (max-width: 1080px) {
  body {
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  .workspace-side-toggle,
  .workspace-focus-controls {
    display: none;
  }

  .poks-shell-chrome {
    margin-top: 12px;
    border-radius: 0 0 var(--workspace-radius) var(--workspace-radius);
  }

  .poks-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "left right"
      "center center";
    gap: 10px 12px;
    min-height: auto;
    padding: 8px 10px;
  }

  .topbar-left {
    grid-area: left;
    min-width: 0;
  }

  .topbar-center {
    grid-area: center;
    justify-content: flex-start;
    justify-self: flex-start;
    max-width: 100%;
  }

  .topbar-right {
    grid-area: right;
    min-width: 0;
  }

  .shell {
    height: 100%;
    min-height: 100dvh;
  }

  .workspace-layout,
  .hero,
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .channel-workbench {
    grid-template-columns: 1fr;
  }

  .channel-pane-resizer {
    display: none;
  }

  .channel-mailboxes {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .channel-toolbar,
  .channel-detail__header,
  .channel-composer__bar {
    grid-template-columns: 1fr;
  }

  .channel-detail__actions,
  .channel-composer__actions {
    justify-content: flex-start;
    max-width: none;
  }

  .metrics-strip {
    position: static;
    overflow-x: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 12px;
    padding: 0;
  }

  .workspace-sidebar,
  .workspace-rail {
    position: static;
  }

  .workspace-main {
    display: flex;
    flex-direction: column;
    align-content: stretch;
    flex: 1 1 auto;
    overflow-y: scroll;
    overflow-x: hidden;
    scrollbar-gutter: stable;
    min-height: 0;
    padding-top: 0;
    padding-right: 0;
  }

  .workspace-layout {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
    height: 100%;
  }

  .shell > .poks-service-footer {
    margin-top: 20px;
  }

  .poks-service-footer {
    flex-basis: 88px;
    height: 88px;
    min-height: 88px;
    max-height: 88px;
  }

  .poks-service-footer,
  .poks-service-footer__text {
    align-items: flex-start;
    flex-direction: column;
  }

  .poks-service-footer__actions {
    width: 100%;
  }

  .poks-service-footer__link--manual {
    width: 100%;
  }
  .workspace-nav {
    position: static;
    top: auto;
    z-index: auto;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .workspace-grid {
    order: 1;
    gap: 12px;
  }

  .workspace-sidebar,
  .workspace-rail {
    flex: 0 0 auto;
    max-height: clamp(180px, 22dvh, 260px);
    overflow-y: auto;
    padding-top: 0;
    min-height: 0;
  }

  .dashboard-signal,
  .metrics-strip article {
    animation: none;
  }

  .metrics-strip article {
    min-height: 60px;
    padding: 8px 10px 7px;
  }

  .panel--timeline {
    transform: none;
  }

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

  .inline-form .button {
    grid-column: 1 / -1;
  }

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

  .planning-grid,
  .reporting-grid,
  .operations-grid {
    grid-template-columns: 1fr;
  }

  .telephony-hero {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .telephony-filterbar__search,
  .telephony-filterbar__submit {
    grid-column: 1 / -1;
  }

  .telephony-selection-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .telephony-selection-bar__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .telephony-table__head {
    display: none;
  }

  .telephony-row {
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: start;
    row-gap: 12px;
    min-width: 0;
  }

  .telephony-row__type,
  .telephony-row__datetime,
  .telephony-row__caller,
  .telephony-row__callee,
  .telephony-row__notes,
  .telephony-row__actions,
  .telephony-row__details {
    grid-column: 2 / -1;
  }

  .telephony-row__actions {
    justify-content: flex-start;
  }

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

@media (max-width: 680px) {
  body {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: auto;
  }

  .app-shell {
    position: relative;
    inset: auto;
    height: auto;
    overflow: visible;
  }

  .shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .poks-shell-chrome {
    margin-top: 10px;
    border-radius: 0 0 var(--workspace-radius) var(--workspace-radius);
  }

  .poks-topbar {
    gap: 8px 10px;
    padding: 8px 10px;
  }

  .topbar-left {
    font-size: 0.8rem;
  }

  .topbar-clock {
    min-width: 72px;
  }

  .shell {
    padding-inline: 10px;
    padding-bottom: 18px;
  }

  .metrics-strip {
    position: static;
    overflow-x: visible;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 12px;
    padding: 0;
  }

  .channel-mailboxes,
  .channel-composer__grid {
    grid-template-columns: 1fr;
  }

  .channel-toolbar {
    gap: 10px;
  }

  .channel-message-list,
  .channel-detail__body {
    max-height: none;
  }

  .workspace-nav {
    display: grid;
    position: static;
    top: auto;
    z-index: auto;
    grid-template-columns: 1fr;
    gap: 8px;
    overflow: visible;
  }

  .workspace-nav a {
    width: 100%;
    min-width: 0;
    height: auto;
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
    min-height: 44px;
    padding: 0.72rem 0.95rem;
  }

  .workspace-nav a[draggable="true"] {
    padding-left: 0.95rem;
  }

  .workspace-nav a[draggable="true"]::before {
    display: none;
  }

  .workspace-layout {
    height: auto;
    overflow: visible;
  }

  .workspace-main {
    height: auto;
    overflow: visible;
    padding-right: 0;
  }

  .workspace-sidebar,
  .workspace-rail {
    max-height: none;
    overflow: visible;
  }

  .telephony-kpis {
    grid-template-columns: 1fr;
  }

  .telephony-filterbar {
    grid-template-columns: 1fr;
  }

  .telephony-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .telephony-row__details-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-section,
  .workspace-rail .panel--chat {
    padding: 16px;
    border-radius: var(--workspace-radius);
  }

  .workspace-layout {
    gap: 14px;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.7rem, 16vw, 4.3rem);
  }

  .command-panel,
  .panel,
  .metrics-strip article {
    border-radius: var(--workspace-radius);
  }

  .metrics-strip article {
    min-height: 58px;
    padding: 8px 10px 7px;
  }

  .panel {
    padding: 18px;
  }

  .panel__header,
  .item {
    grid-template-columns: 1fr;
  }

  .panel__header {
    display: grid;
  }

  .inline-form,
  .inline-form--compact {
    grid-template-columns: 1fr;
  }

  .item__actions {
    justify-content: start;
  }

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

body[data-ui-surface="mobile"] {
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: auto;
}

body[data-ui-surface="mobile"] .app-shell {
  position: relative;
  inset: auto;
  height: auto;
  overflow: visible;
}

body[data-ui-surface="mobile"] .shell {
  height: auto;
  min-height: 100dvh;
  overflow: visible;
}

body[data-ui-surface="mobile"] .poks-topbar {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "left right"
    "center center";
  gap: 8px 10px;
  min-height: auto;
  padding: 8px 10px;
}

body[data-ui-surface="mobile"] .topbar-left,
body[data-ui-surface="mobile"] .topbar-center,
body[data-ui-surface="mobile"] .topbar-right {
  min-width: 0;
}

body[data-ui-surface="mobile"] .topbar-left {
  grid-area: left;
}

body[data-ui-surface="mobile"] .topbar-center {
  grid-area: center;
  justify-content: flex-start;
  justify-self: flex-start;
  max-width: 100%;
}

body[data-ui-surface="mobile"] .topbar-right {
  grid-area: right;
}

body[data-ui-surface="mobile"] .shell {
  padding-inline: 10px;
  padding-bottom: 18px;
}

body[data-ui-surface="mobile"] .metrics-strip {
  position: static;
  overflow-x: visible;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 12px;
  padding: 0;
}

body[data-ui-surface="mobile"] .workspace-nav {
  display: grid;
  position: static;
  top: auto;
  z-index: auto;
  grid-template-columns: 1fr;
  gap: 8px;
  overflow: visible;
}

body[data-ui-surface="mobile"] .workspace-nav a {
  width: 100%;
  min-width: 0;
  height: auto;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  min-height: 44px;
  padding: 0.72rem 0.95rem;
}

body[data-ui-surface="mobile"] .workspace-nav a[draggable="true"] {
  padding-left: 0.95rem;
}

body[data-ui-surface="mobile"] .workspace-nav a[draggable="true"]::before {
  display: none;
}

body[data-ui-surface="mobile"] .workspace-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: auto;
  overflow: visible;
}

body[data-ui-surface="mobile"] .workspace-layout--core {
  gap: 12px;
}

body[data-ui-surface="mobile"] .workspace-main {
  height: auto;
  overflow: visible;
  padding-right: 0;
}

body[data-ui-surface="mobile"] .workspace-category-rail {
  padding-top: 0;
}

body[data-ui-surface="mobile"] .workspace-category-shell {
  position: static;
}

body[data-ui-surface="mobile"] .workspace-category-nav {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

body[data-ui-surface="mobile"] .workspace-sidebar,
body[data-ui-surface="mobile"] .workspace-rail {
  display: none;
}

body[data-ui-surface="mobile"] .workspace-layout {
  gap: 10px;
}

body[data-ui-surface="mobile"] .telephony-kpis {
  grid-template-columns: 1fr;
}

body[data-ui-surface="mobile"] .telephony-filterbar {
  grid-template-columns: 1fr;
}

body[data-ui-surface="mobile"] .telephony-selection-bar {
  align-items: flex-start;
  flex-direction: column;
}

body[data-ui-surface="mobile"] .telephony-selection-bar__actions {
  width: 100%;
  justify-content: flex-start;
}

body[data-ui-surface="mobile"] .telephony-table__head {
  display: none;
}

body[data-ui-surface="mobile"] .telephony-row {
  grid-template-columns: 28px minmax(0, 1fr);
}

body[data-ui-surface="mobile"] .telephony-row__type,
body[data-ui-surface="mobile"] .telephony-row__datetime,
body[data-ui-surface="mobile"] .telephony-row__caller,
body[data-ui-surface="mobile"] .telephony-row__callee,
body[data-ui-surface="mobile"] .telephony-row__notes,
body[data-ui-surface="mobile"] .telephony-row__actions,
body[data-ui-surface="mobile"] .telephony-row__details {
  grid-column: 2 / -1;
}

body[data-ui-surface="mobile"] .telephony-row__actions {
  justify-content: flex-start;
}

body[data-ui-surface="mobile"] .telephony-row__details-grid {
  grid-template-columns: 1fr;
}

body[data-ui-surface="desktop"] {
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

body[data-ui-surface="desktop"] .app-shell {
  position: fixed;
  inset: 0 0 10px;
  height: auto;
  overflow: hidden;
}

body[data-ui-surface="desktop"] .shell {
  height: 100%;
  overflow-x: clip;
}

body[data-ui-surface="desktop"] .shell > .poks-service-footer {
  position: static;
}

body[data-ui-surface="desktop"] .poks-topbar {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  min-height: 44px;
  padding: 10px 16px;
}

body[data-ui-surface="desktop"] .topbar-left {
  min-width: 0;
}

body[data-ui-surface="desktop"] .topbar-center {
  min-width: 0;
  justify-content: center;
  justify-self: center;
}

body[data-ui-surface="desktop"] .topbar-right {
  min-width: 0;
}

body[data-ui-surface="desktop"] .workspace-layout {
  display: grid;
  grid-template-columns:
    var(--workspace-sidebar-left-width)
    minmax(0, 1fr)
    var(--workspace-sidebar-right-width);
  gap: 22px;
  align-self: stretch;
  min-height: 0;
  height: auto;
  overflow: hidden;
}

body[data-ui-surface="desktop"] .workspace-layout--core {
  grid-template-columns: clamp(224px, 15.8vw, 272px) minmax(0, 1fr);
}

body[data-ui-surface="desktop"] .workspace-main {
  display: grid;
  align-content: start;
  gap: 22px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding-top: 18px;
  padding-right: 8px;
  padding-bottom: 120px;
}

body[data-ui-surface="desktop"] .workspace-category-rail {
  align-self: stretch;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
}

body[data-ui-surface="desktop"] .workspace-sidebar,
body[data-ui-surface="desktop"] .workspace-rail {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
}

body[data-ui-surface="desktop"] .workspace-sidebar {
  display: grid;
  grid-template-rows: auto auto;
  align-self: start;
  align-content: start;
  height: auto;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

body[data-ui-surface="desktop"] .workspace-sidebar .sidebar-section {
  min-height: auto;
  overflow: visible;
}

body[data-ui-surface="desktop"] .workspace-rail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-self: stretch;
  height: 100%;
  overflow: hidden;
}

body[data-ui-surface="desktop"] .workspace-rail .panel--chat {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

body[data-ui-surface="desktop"] .workspace-rail .chat-stage.internal-chat {
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
}

body[data-ui-surface="desktop"] .workspace-rail .internal-chat__feed {
  min-height: 0;
  max-height: none;
}

body[data-ui-surface="desktop"] .workspace-nav {
  display: flex;
  position: sticky;
  top: 0;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: hidden;
}

body[data-ui-surface="desktop"] .workspace-nav a {
  flex: 0 1 clamp(9.75rem, 7.8vw, 11.75rem);
  width: auto;
  min-width: clamp(9.75rem, 7.8vw, 11.75rem);
  justify-content: center;
  text-align: center;
  white-space: normal;
}

body[data-ui-surface="desktop"] .workspace-nav a[data-workspace-feature="documents"] {
  flex: 0 1 clamp(14.5rem, 12vw, 18rem);
  min-width: clamp(14.5rem, 12vw, 18rem);
}

@media (min-width: 1400px) and (max-height: 1080px) {
  body[data-ui-surface="desktop"] .shell {
    --workspace-sidebar-left-width: clamp(246px, 16vw, 278px);
    --workspace-sidebar-right-width: clamp(540px, 31vw, 608px);
    padding: 0 clamp(12px, 1.2vw, 24px) 14px;
    font-size: 0.92rem;
  }

  body[data-ui-surface="desktop"] .poks-shell-chrome {
    margin-top: 10px;
    border-radius: 0 0 24px 24px;
  }

  body[data-ui-surface="desktop"] .poks-topbar {
    min-height: 40px;
    padding: 8px 14px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
  }

  body[data-ui-surface="desktop"] .topbar-icon-button {
    width: 26px;
    height: 26px;
  }

  body[data-ui-surface="desktop"] .metrics-strip {
    gap: 6px;
    margin: 4px 0 4px;
    padding: 4px 5px 5px;
  }

  body[data-ui-surface="desktop"] .metrics-strip article {
    min-height: 38px;
    padding: 5px 10px;
    border-radius: var(--workspace-radius);
  }

  body[data-ui-surface="desktop"] .metrics-strip article > span:not(.metrics-strip__icon) {
    font-size: 0.54rem;
    letter-spacing: 0.07em;
  }

  body[data-ui-surface="desktop"] .metrics-strip__icon {
    width: 1.35rem;
    height: 1.35rem;
  }

  body[data-ui-surface="desktop"] .metrics-strip strong {
    font-size: clamp(0.95rem, 1.15vw, 1.22rem);
  }

  body[data-ui-surface="desktop"] .workspace-nav {
    --workspace-nav-item-height: 40px;
    gap: 3px;
    margin: 4px 0 0;
    padding: 2px;
    border-radius: var(--workspace-radius);
  }

  body[data-ui-surface="desktop"] .workspace-nav a {
    flex-basis: clamp(9.6rem, 7.35vw, 10.95rem);
    min-width: clamp(9.6rem, 7.35vw, 10.95rem);
    min-height: var(--workspace-nav-item-height);
    height: var(--workspace-nav-item-height);
    padding: 0.32rem 0.5rem;
    border-radius: var(--workspace-radius);
    font-size: 0.78rem;
    line-height: 1.02;
  }

  body[data-ui-surface="desktop"] .workspace-nav a[data-workspace-feature="documents"] {
    flex-basis: clamp(13.5rem, 10.9vw, 16.4rem);
    min-width: clamp(13.5rem, 10.9vw, 16.4rem);
  }

  body[data-ui-surface="desktop"] .workspace-nav__badge,
  body[data-ui-surface="desktop"] .workspace-side-toggle[data-unread-count]::after {
    transform: scale(0.82);
    transform-origin: center;
  }

  body[data-ui-surface="desktop"] .workspace-layout {
    gap: 14px;
  }

  body[data-ui-surface="desktop"] .telephony-table__head,
  body[data-ui-surface="desktop"] .telephony-row {
    grid-template-columns:
      32px
      minmax(140px, 1fr)
      minmax(132px, 0.78fr)
      minmax(144px, 0.88fr)
      minmax(144px, 0.88fr)
      minmax(172px, 0.98fr)
      minmax(208px, 1.08fr);
    gap: 9px;
  }

  body[data-ui-surface="desktop"] .workspace-main {
    padding-top: 10px;
    padding-right: 6px;
    padding-bottom: 136px;
  }

  body[data-ui-surface="desktop"] .workspace-grid > [data-workspace-page].is-active {
    gap: 14px;
  }

  body[data-ui-surface="desktop"] .workspace-side-toggle {
    min-height: 26px;
    padding: 4px 8px;
    font-size: 0.66rem;
  }

  body[data-ui-surface="desktop"] .workspace-focus-toggle {
    min-height: 26px;
    padding: 0.3rem 0.6rem;
    font-size: 0.66rem;
  }

  body[data-ui-surface="desktop"] .workspace-focus-controls {
    padding-bottom: 6px;
  }

  body[data-ui-surface="desktop"] .workspace-sidebar,
  body[data-ui-surface="desktop"] .workspace-rail {
    gap: 10px;
    padding-top: 8px;
  }

  body[data-ui-surface="desktop"] .sidebar-section,
  body[data-ui-surface="desktop"] .workspace-rail .panel--chat {
    padding: 14px;
    border-radius: var(--workspace-radius);
  }

  body[data-ui-surface="desktop"] .panel {
    padding: 16px;
    border-radius: var(--workspace-radius);
  }

  body[data-ui-surface="desktop"] .panel__header {
    margin-bottom: 8px;
    gap: 8px;
  }

  body[data-ui-surface="desktop"] .inline-form {
    gap: 7px;
    margin-bottom: 8px;
    padding-bottom: 8px;
  }

  body[data-ui-surface="desktop"] h1 {
    font-size: clamp(1.95rem, 3vw, 2.55rem);
  }

  body[data-ui-surface="desktop"] .field {
    gap: 6px;
  }

  body[data-ui-surface="desktop"] .field input,
  body[data-ui-surface="desktop"] .field select,
  body[data-ui-surface="desktop"] .button {
    min-height: 38px;
  }

  body[data-ui-surface="desktop"] .chat-stage {
    gap: 6px;
    min-height: 0;
    padding: 10px;
    border-radius: var(--workspace-radius);
  }

  body[data-ui-surface="desktop"] .internal-chat__filters {
    gap: 5px;
  }

  body[data-ui-surface="desktop"] .internal-chat__filters .mini-button,
  body[data-ui-surface="desktop"] .internal-chat__message-actions .mini-button {
    min-height: 24px;
    padding: 0.24rem 0.5rem;
    font-size: 0.68rem;
  }

  body[data-ui-surface="desktop"] .internal-chat__feed {
    gap: 6px;
  }

  body[data-ui-surface="desktop"] .internal-chat__message {
    padding: 8px;
    border-radius: var(--workspace-radius);
  }

  body[data-ui-surface="desktop"] .internal-chat__message-form textarea {
    min-height: 64px;
  }

  body[data-ui-surface="desktop"] .shell > .poks-service-footer {
    margin-top: 16px;
    margin-bottom: 0;
  }

  body[data-ui-surface="desktop"] .poks-service-footer {
    flex-basis: 40px;
    height: 40px;
    min-height: 40px;
    max-height: 40px;
    padding: 6px 12px;
    border-radius: var(--workspace-radius);
  }

  body[data-ui-surface="desktop"] .poks-service-footer__link--manual {
    min-height: 28px;
    padding: 0.25rem 0.58rem;
  }
}

body[data-ui-surface="desktop"] .telephony-hero {
  align-items: flex-end;
  flex-direction: row;
}

body[data-ui-surface="desktop"] .telephony-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

body[data-ui-surface="desktop"] .telephony-filterbar {
  grid-template-columns: minmax(220px, 1.6fr) repeat(4, minmax(120px, 0.85fr)) auto;
}

body[data-ui-surface="desktop"] .telephony-selection-bar {
  align-items: center;
  flex-direction: row;
}

body[data-ui-surface="desktop"] .telephony-selection-bar__actions {
  width: auto;
  justify-content: flex-end;
}

body[data-ui-surface="desktop"] .telephony-table__head {
  display: grid;
}

body[data-ui-surface="desktop"] .telephony-row {
  grid-template-columns:
    32px
    minmax(148px, 1.02fr)
    minmax(136px, 0.8fr)
    minmax(150px, 0.92fr)
    minmax(150px, 0.94fr)
    minmax(180px, 1.04fr)
    minmax(220px, 1.16fr);
}

body[data-ui-surface="desktop"] .telephony-row__type,
body[data-ui-surface="desktop"] .telephony-row__datetime,
body[data-ui-surface="desktop"] .telephony-row__caller,
body[data-ui-surface="desktop"] .telephony-row__callee,
body[data-ui-surface="desktop"] .telephony-row__notes,
body[data-ui-surface="desktop"] .telephony-row__actions {
  grid-column: auto;
}

body[data-ui-surface="desktop"] .telephony-row__details {
  grid-column: 2 / -1;
}

body[data-ui-surface="desktop"] .telephony-row__details-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.contact-discovery-research-links {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(133, 88, 179, 0.22);
  border-radius: var(--workspace-radius-sm, 8px);
  background: rgba(133, 88, 179, 0.06);
}

.contact-discovery-research-links span {
  color: var(--workspace-muted, #667085);
  font-size: 0.82rem;
  line-height: 1.35;
}

.workspace-category-rail.app-sidebar {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  padding: 20px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, rgba(255, 255, 255, 0.14));
  border-radius: 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: none;
  color: #ffffff;
  overflow: hidden;
}

.workspace-category-rail.app-sidebar .app-sidebar__top {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  flex: 1 1 auto;
  height: 100%;
  gap: 18px;
}

.workspace-category-rail.app-sidebar .app-sidebar__brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-width: 0;
  width: auto;
  max-width: 100%;
  align-self: flex-start;
  justify-self: flex-start;
  flex: 0 0 auto;
}

.workspace-category-rail.app-sidebar .app-sidebar__brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 30px rgba(0, 22, 34, 0.2);
  color: color-mix(in srgb, var(--accent) 74%, #143242);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.workspace-category-rail.app-sidebar .app-sidebar__brand-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.workspace-category-rail.app-sidebar .app-sidebar__brand-copy strong {
  font-size: 0.96rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.workspace-category-rail.app-sidebar .app-sidebar__brand-copy small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.workspace-category-rail.app-sidebar .workspace-nav {
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 14px;
  flex: 1 1 auto;
  margin: 0;
  position: static;
  padding: 0 2px 0 0;
  border: none;
  border-radius: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  scrollbar-width: thin;
}

.workspace-category-rail.app-sidebar .workspace-nav__group {
  display: grid;
  gap: 0;
  width: 100%;
}

.workspace-category-rail.app-sidebar .workspace-nav__group--utility {
  margin-top: 0;
}

.workspace-category-rail.app-sidebar .workspace-nav__group--footer {
  gap: 0;
}

.workspace-category-rail.app-sidebar .workspace-nav__group-body {
  display: grid;
  gap: 8px;
  width: 100%;
}

.workspace-category-rail.app-sidebar .workspace-nav__separator {
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
}

.workspace-category-rail.app-sidebar .workspace-nav__separator--footer {
  margin-top: auto;
}

.workspace-category-rail.app-sidebar .workspace-nav__group-label {
  margin: 0 12px 4px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.7rem;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.workspace-category-rail.app-sidebar .workspace-nav a {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  height: auto;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  box-shadow: none;
  text-align: left;
  white-space: normal;
  transform: none;
}

.workspace-category-rail.app-sidebar .workspace-nav a.has-nav-badge {
  padding-right: 2.7rem;
}

.workspace-category-rail.app-sidebar .workspace-nav__copy {
  min-width: 0;
  display: grid;
  gap: 2px;
  align-content: center;
}

.workspace-category-rail.app-sidebar .workspace-nav__label {
  display: -webkit-box;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.93rem;
  font-weight: 820;
  letter-spacing: -0.02em;
  line-height: 1.14;
  white-space: normal;
  overflow-wrap: anywhere;
}

.workspace-category-rail.app-sidebar .workspace-nav__meta {
  display: block;
  color: currentColor;
  opacity: 0.58;
  font-size: 0.72rem;
  font-weight: 620;
  letter-spacing: 0.01em;
}

.workspace-category-rail.app-sidebar .workspace-nav__item--utility {
  min-height: 54px;
}

.workspace-category-rail.app-sidebar .workspace-nav__item--external::after {
  content: none;
}

.workspace-category-rail.app-sidebar .workspace-nav a[data-workspace-feature="documents"] {
  flex: auto;
  min-width: 0;
}

.workspace-category-rail.app-sidebar .workspace-nav a:hover,
.workspace-category-rail.app-sidebar .workspace-nav a:focus-visible {
  transform: none;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}

.workspace-category-rail.app-sidebar .workspace-nav a.is-active,
.workspace-category-rail.app-sidebar .workspace-nav a[aria-current="page"] {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.96);
  color: color-mix(in srgb, var(--accent) 74%, #143242);
  box-shadow: 0 14px 28px rgba(0, 22, 34, 0.18);
}

.workspace-category-rail.app-sidebar .workspace-nav__icon {
  width: 18px;
  height: 18px;
  justify-self: center;
  opacity: 0.9;
}

.workspace-category-rail.app-sidebar .workspace-nav__badge {
  top: 50%;
  right: 8px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-color: rgba(255, 255, 255, 0.78);
  transform: translateY(-50%);
  border-color: rgba(255, 255, 255, 0.72);
}

.workspace-category-rail.app-sidebar .app-sidebar__footer {
  display: grid;
  gap: 6px;
  padding: 14px 12px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
}

.workspace-category-rail.app-sidebar .app-sidebar__footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
  font-weight: 560;
  line-height: 1.45;
}

body[data-ui-surface="mobile"] .workspace-category-rail.app-sidebar {
  position: static;
  height: auto;
  max-height: none;
  margin-top: 0;
  padding: 12px;
}

body[data-ui-surface="mobile"] .workspace-category-rail.app-sidebar .app-sidebar__top {
  height: auto;
  gap: 10px;
}

body[data-ui-surface="mobile"] .workspace-category-rail.app-sidebar .workspace-nav {
  overflow: visible;
  height: auto;
  flex: 0 0 auto;
  gap: 10px;
}

body[data-ui-surface="mobile"] .workspace-category-rail.app-sidebar .workspace-nav__group-body {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 6px;
}

body[data-ui-surface="mobile"] .workspace-category-rail.app-sidebar .workspace-nav a {
  min-height: 42px;
  padding: 8px 9px;
}

body[data-ui-surface="mobile"] .workspace-category-rail.app-sidebar .workspace-nav__separator--footer {
  margin-top: 4px;
}

@media (max-width: 1080px) {
  .workspace-category-rail.app-sidebar {
    height: auto;
    max-height: none;
    padding: 12px;
  }

  .workspace-category-rail.app-sidebar .app-sidebar__top {
    height: auto;
    gap: 10px;
  }

  .workspace-category-rail.app-sidebar .workspace-nav {
    height: auto;
    flex: 0 0 auto;
    gap: 10px;
    overflow: visible;
  }

  .workspace-category-rail.app-sidebar .workspace-nav__group-body {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 6px;
  }

  .workspace-category-rail.app-sidebar .workspace-nav__label {
    overflow-wrap: normal;
    word-break: normal;
  }

  .workspace-category-rail.app-sidebar .workspace-nav a {
    min-height: 42px;
    padding: 8px 9px;
  }

  .workspace-category-rail.app-sidebar .workspace-nav__separator--footer {
    margin-top: 4px;
  }
}

@media (max-width: 680px) {
  .workspace-category-rail.app-sidebar .workspace-nav__group-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-category-rail.app-sidebar .workspace-nav a {
    min-height: 40px;
    padding: 7px 8px;
  }

  .workspace-category-rail.app-sidebar .workspace-nav__label {
    font-size: 0.84rem;
  }

  .topbar-left {
    gap: 4px;
    font-size: 0.74rem;
  }

  .topbar-clock {
    min-width: 0;
    padding: 0.25rem 0.45rem;
  }

  .topbar-right {
    gap: 6px;
  }

  .status-line {
    width: 30px;
    min-width: 30px;
    justify-content: center;
    gap: 0;
    padding: 0;
    border-color: transparent;
    background: transparent;
  }

  .status-line > #api-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

body[data-ui-surface="desktop"] .workspace-category-rail.app-sidebar {
  align-self: stretch;
  overflow: hidden;
}

body[data-ui-surface="desktop"] .workspace-category-rail.app-sidebar .workspace-nav {
  position: static;
}

/* User requested a single colored navigation rail. All other workspace surfaces stay neutral/transparent. */
body {
  background: #ffffff;
}

.poks-shell-chrome,
.poks-topbar,
.topbar-clock,
.topbar-icon-button,
.profile-avatar,
.workspace-main,
.workspace-category-shell,
.workspace-context-shell,
.workspace-sidebar,
.workspace-rail,
.sidebar-section,
.panel,
.chat-stage,
.workspace-home-search,
.workspace-home-launcher,
.workspace-home-tile__button,
.telephony-kpi,
.telephony-selection-bar,
.search-workspace__form,
.search-workspace__hint,
.channel-mailboxes,
.channel-list-pane,
.channel-detail-pane,
.poks-service-footer {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.panel::before,
.workspace-home-search::before,
.workspace-home-launcher::before,
.workspace-home-tile__button::before {
  content: none !important;
}

.workspace-home-tile__button:hover,
.workspace-home-tile__button:focus-visible,
.topbar-icon-button:hover,
.topbar-icon-button:focus-visible,
.topbar-icon-button[aria-expanded="true"] {
  background: transparent !important;
  box-shadow: none !important;
}

.workspace-category-rail.app-sidebar .workspace-nav a,
.workspace-category-rail.app-sidebar .workspace-nav a:hover,
.workspace-category-rail.app-sidebar .workspace-nav a:focus-visible,
.workspace-category-rail.app-sidebar .workspace-nav a.is-active,
.workspace-category-rail.app-sidebar .workspace-nav a[aria-current="page"] {
  background: transparent !important;
  box-shadow: none !important;
}

.workspace-category-rail.app-sidebar .workspace-nav a.is-active,
.workspace-category-rail.app-sidebar .workspace-nav a[aria-current="page"] {
  border-color: rgba(255, 255, 255, 0.24) !important;
  background: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 24px rgba(6, 18, 28, 0.16) !important;
}

.workspace-category-rail.app-sidebar .workspace-nav a.is-active .workspace-nav__icon,
.workspace-category-rail.app-sidebar .workspace-nav a[aria-current="page"] .workspace-nav__icon {
  opacity: 1;
}

.workspace-category-rail.app-sidebar .workspace-nav a.is-active .workspace-nav__label,
.workspace-category-rail.app-sidebar .workspace-nav a[aria-current="page"] .workspace-nav__label {
  text-shadow: 0 1px 0 rgba(7, 18, 29, 0.12);
}

/* Reduce box-in-box layering in the workspace content. Keep real data rows, flatten redundant wrappers. */
.panel,
.search-workspace__form,
.search-workspace__hint,
.telephony-selection-bar,
.telephony-outbound-shell,
.channel-mailboxes,
.channel-list-pane,
.channel-detail-pane,
.channel-overview,
.channel-message-list,
.channel-detail,
.channel-detail__body,
.channel-composer,
.channel-composer-extra,
.channel-template-context-shell,
.list-pager {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.panel {
  overflow: visible;
}

.search-workspace__form,
.search-workspace__hint,
.telephony-selection-bar,
.telephony-outbound-shell,
.channel-mailboxes,
.channel-list-pane,
.channel-detail-pane,
.channel-detail,
.channel-composer,
.channel-composer-extra,
.channel-template-context-shell,
.list-pager {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.search-workspace__form,
.search-workspace__hint,
.channel-mailboxes,
.channel-list-pane,
.channel-detail-pane {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.search-workspace,
.telephony-records,
.channel-workbench {
  gap: 20px;
}

.telephony-selection-bar {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
  border-top: 1px solid rgba(23, 32, 35, 0.08) !important;
  border-bottom: 1px solid rgba(23, 32, 35, 0.08) !important;
}

.telephony-outbound-shell {
  padding-top: 14px !important;
  padding-bottom: 0 !important;
  border-top: 1px solid rgba(23, 32, 35, 0.08) !important;
}

.channel-overview {
  padding: 10px 0 12px !important;
  border-bottom: 1px solid rgba(23, 32, 35, 0.08) !important;
}

.channel-message-list {
  padding: 8px 0 0 !important;
}

.channel-detail {
  min-height: auto;
  padding: 0 0 14px !important;
  border-bottom: 1px solid rgba(23, 32, 35, 0.08) !important;
}

.channel-detail__body {
  max-height: none;
  padding: 10px 0 0 !important;
  border-top: 1px solid rgba(23, 32, 35, 0.08) !important;
}

.channel-composer {
  padding: 14px 0 0 !important;
  border-top: 1px solid rgba(23, 32, 35, 0.08) !important;
}

.channel-composer-extra,
.channel-template-context-shell,
.list-pager {
  padding-top: 10px !important;
  padding-bottom: 0 !important;
  border-top: 1px solid rgba(23, 32, 35, 0.08) !important;
}

body[data-chat-window="false"] .shell {
  --workspace-sidebar-right-width: clamp(240px, 22vw, 320px);
}

.panel--chat-launcher {
  display: grid;
  gap: 18px;
}

.chat-launcher {
  display: grid;
  gap: 14px;
}

.chat-launcher__button {
  width: 100%;
  justify-content: center;
}

.chat-launcher__hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

body[data-chat-window="true"] .shell {
  padding-bottom: 16px;
  grid-template-rows: minmax(0, 1fr);
}

body[data-chat-window="true"] .poks-topbar,
body[data-chat-window="true"] .workspace-category-rail,
body[data-chat-window="true"] .workspace-sidebar,
body[data-chat-window="true"] .workspace-main,
body[data-chat-window="true"] .poks-service-footer {
  display: none !important;
}

body[data-ui-surface="mobile"] .telephony-selection-bar {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "title"
    "note"
    "callback"
    "clear";
  align-items: start;
}

body[data-ui-surface="mobile"] .telephony-selection-bar > .button {
  width: 100%;
  justify-self: stretch;
}

body[data-chat-window="true"] .workspace-layout {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}

body[data-chat-window="true"] .workspace-rail {
  padding-top: 16px;
  height: 100%;
  max-height: none;
}

body[data-chat-window="true"] .workspace-rail .panel--chat {
  min-height: auto;
  max-height: none;
  padding: 30px;
  display: grid;
  gap: 18px;
  align-content: start;
}

body[data-chat-window="true"] .workspace-rail .chat-stage.internal-chat {
  min-height: 0;
  height: auto;
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(420px, 1.1fr);
  grid-template-areas:
    "intro intro"
    "onboarding onboarding"
    "compact compact"
    "feed composer";
  gap: 18px;
  align-content: start;
}

body[data-chat-window="true"] .workspace-rail .chat-stage.internal-chat[data-chat-ready="true"] {
  min-height: calc(100dvh - 182px);
}

body[data-chat-window="true"] .workspace-rail .internal-chat__feed {
  max-height: min(58dvh, 700px);
  padding-right: 6px;
}

body[data-chat-window="true"] .workspace-rail .internal-chat__intro,
body[data-chat-window="true"] .workspace-rail .internal-chat__onboarding,
body[data-chat-window="true"] .workspace-rail .internal-chat__token-compact {
  grid-column: 1 / -1;
}

body[data-chat-window="true"] .workspace-rail .internal-chat__intro {
  grid-area: intro;
}

body[data-chat-window="true"] .workspace-rail .internal-chat__token-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

body[data-chat-window="true"] .workspace-rail .internal-chat__onboarding {
  grid-area: onboarding;
}

body[data-chat-window="true"] .workspace-rail .internal-chat__token-compact {
  grid-area: compact;
}

body[data-chat-window="true"] .workspace-rail .internal-chat__lane--feed {
  grid-area: feed;
  min-height: 0;
}

body[data-chat-window="true"] .workspace-rail .internal-chat__lane--composer {
  grid-area: composer;
  position: sticky;
  top: 0;
}

body[data-chat-window="true"] .workspace-rail .internal-chat__lane--composer .internal-chat__message-form textarea {
  min-height: 320px;
}

body[data-chat-window="true"] .workspace-rail .internal-chat[data-chat-ready="false"] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "intro"
    "onboarding"
    "compact";
}

body[data-chat-window="true"] .workspace-rail .internal-chat[data-chat-ready="false"] .internal-chat__lane {
  display: none;
}

@media (max-width: 1120px) {
  .internal-chat__intro,
  .internal-chat__onboarding {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-chat-window="true"] .workspace-rail .panel--chat {
    max-height: none;
    min-height: auto;
    padding: 22px;
  }

  body[data-chat-window="true"] .workspace-rail .chat-stage.internal-chat {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "onboarding"
      "compact"
      "feed"
      "composer";
  }

  body[data-chat-window="true"] .workspace-rail .chat-stage.internal-chat[data-chat-ready="true"] {
    min-height: 0;
  }

  body[data-chat-window="true"] .workspace-rail .internal-chat__lane--composer {
    position: static;
  }

  body[data-chat-window="true"] .workspace-rail .internal-chat__lane--composer .internal-chat__message-form textarea {
    min-height: 220px;
  }
}
