.mobile-menu,
.mobile-back {
  display: none;
}
.inbox-view .content {
  padding: 0;
  max-width: none;
}
.inbox-view .topbar {
  height: 52px;
}
.clientpanel {
  display: none !important;
}
.tg-person {
  min-width: 0;
  flex: 1;
}
.tg-person strong,
.tg-person small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 760px) {
  body.inbox-view {
    overflow: hidden;
  }
  .inbox-view .app {
    position: fixed;
    top: var(--mobile-top, 0px);
    left: 0;
    width: 100%;
    height: var(--mobile-height, 100vh);
    min-height: 0;
    overflow: hidden;
  }
  .inbox-view .main {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }
  .inbox-view .topbar {
    flex: 0 0 52px;
  }
  .inbox-view .content {
    flex: 1;
    width: 100%;
    margin: 0;
    min-height: 0;
    overflow: hidden;
  }
  .inbox-view .content .tg-workspace {
    height: 100%;
  }
  .inbox-view.keyboard-compact .tg-shortcuts {
    display: none;
  }
  .inbox-view.keyboard-compact .tg-messages {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }
  html,
  body {
    margin: 0;
    min-width: 0;
    overflow-x: hidden;
  }
  .app {
    display: block;
  }
  .main,
  .chat-navigation-hidden .main {
    margin-left: 0;
    width: 100%;
    min-width: 0;
  }
  .sidebar,
  .chat-navigation-hidden .sidebar {
    display: none;
  }
  .mobile-menu-open .sidebar {
    display: flex;
    position: fixed;
    left: 0;
    top: calc(var(--mobile-top, 0px) + 52px);
    bottom: auto;
    height: calc(var(--mobile-height, 100vh) - 52px);
    overscroll-behavior: contain;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    width: 250px;
    max-width: 85vw;
    z-index: 40;
    box-shadow: 20px 0 40px #0008;
  }
  .mobile-menu-open .sidebar .brand,
  .mobile-menu-open .sidebar .navlabel,
  .mobile-menu-open .sidebar .sidebar-bottom,
  .mobile-menu-open .navitem span {
    display: block;
  }
  .mobile-menu-open .navitem {
    justify-content: flex-start;
  }
  .mobile-menu,
  .mobile-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    line-height: 1;
    align-self: center;
  }
  .topbar,
  .inbox-view .topbar {
    height: 52px;
    padding: 4px 8px;
    gap: 4px;
    box-sizing: border-box;
  }
  .crumb {
    display: none;
  }
  .topright {
    gap: 4px;
    min-width: 0;
    overflow-x: auto;
    flex: 1;
    justify-content: flex-start;
    flex-wrap: nowrap;
    height: 44px;
    scrollbar-width: none;
  }
  .topright::-webkit-scrollbar {
    display: none;
  }
  .topright select {
    max-width: 145px;
  }
  .topright label {
    font-size: 12px;
  }
  .content {
    padding: 12px;
  }
  .inbox-view .content {
    padding: 0;
  }
  .tg-workspace,
  .tg-workspace.with-card {
    display: flex;
    height: calc(100vh - 52px);
    height: calc(var(--mobile-height, 100vh) - 52px);
    min-height: 0;
    width: 100%;
    font-size: 14px;
  }
  .tg-dialogs {
    width: 100%;
    border: 0;
  }
  .tg-conversation {
    display: none;
    min-width: 0;
    width: 100%;
  }
  .tg-workspace.mobile-conversation .tg-dialogs {
    display: none;
  }
  .tg-workspace.mobile-conversation .tg-conversation {
    display: flex;
  }
  .tg-menu {
    display: none;
  }
  .tg-searchbar {
    padding: 6px 12px;
  }
  .tg-searchbar input {
    min-width: 0;
    width: 100%;
  }
  .tg-folders {
    overflow-x: auto;
    flex-shrink: 0;
  }
  .tg-folders button {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .tg-chatheader {
    padding: 4px;
    gap: 2px;
    min-height: 52px;
  }
  .tg-chatheader .avatar {
    display: none;
  }
  .tg-chatheader .tg-person {
    padding: 0 5px;
    text-align: left;
  }
  .tg-chatheader .tg-person strong {
    font-size: 14px;
  }
  .tg-chatheader .tg-person small {
    font-size: 11px;
  }
  button,
  .btn,
  .btn.small,
  .tg-icon,
  .tg-send-button,
  .tg-message-menu summary {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }
  .tg-messages {
    padding: 10px !important;
    overscroll-behavior: contain;
    overflow-x: hidden;
  }
  .tg-messages .message {
    max-width: 90%;
    box-shadow: none;
    padding-right: 38px;
    font-size: 15px;
  }
  .tg-message-menu summary {
    opacity: 1;
    font-size: 22px;
  }
  .tg-message-menu {
    position: absolute;
    top: 0;
    right: 0;
  }
  .tg-message-actions {
    position: fixed;
    top: auto;
    left: 8px;
    right: 8px;
    bottom: calc(100% - var(--mobile-top, 0px) - var(--mobile-height, 100vh) + max(8px, env(safe-area-inset-bottom)));
    max-width: none;
    min-width: 0;
    max-height: calc(var(--mobile-height, 100vh) - max(8px, env(safe-area-inset-bottom)) - 8px);
    overflow-y: auto;
    z-index: 20;
  }
  .tg-message-actions button {
    white-space: normal;
  }
  .tg-conversation {
    background: #141414;
  }
  .tg-compose-area {
    width: 100%;
    box-sizing: border-box;
    padding: 4px 6px;
    padding-bottom: max(4px, env(safe-area-inset-bottom));
    flex-shrink: 0;
  }
  .tg-shortcuts {
    overflow-x: auto;
    gap: 4px;
    margin-bottom: 3px;
  }
  .tg-shortcuts button {
    white-space: nowrap;
    padding: 4px 10px;
  }
  .tg-shortcuts span,
  .tg-compose-note {
    display: none;
  }
  .tg-composer {
    padding: 3px;
    gap: 2px;
    box-shadow: none;
  }
  .tg-composer textarea {
    font-size: 16px;
    resize: none;
    min-height: 44px;
    max-height: 180px;
    line-height: 22px;
    box-sizing: border-box;
  }
  .tg-find input {
    min-width: 0;
    width: 100%;
  }
  .tg-sla:empty {
    display: none;
  }
  input,
  select,
  textarea {
    font-size: 16px;
    max-width: 100%;
    box-sizing: border-box;
  }
  .formrow,
  .grid2,
  .grid3,
  .grid4 {
    display: block;
  }
  .formrow > .field {
    margin-bottom: 12px;
  }
  .overlay {
    padding: 8px;
    top: var(--mobile-top, 0px);
    right: 0;
    bottom: auto;
    left: 0;
    height: var(--mobile-height, 100vh);
    box-sizing: border-box;
    backdrop-filter: none;
    z-index: 60;
    background: #0009;
  }
  .modal {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    max-height: calc(var(--mobile-height, 100vh) - 16px);
    overflow-y: auto;
    padding: 16px;
  }
  .modal footer,
  .modal .actions {
    display: flex;
    flex-wrap: wrap;
  }
  .modal footer button {
    width: 100%;
  }
  .tablewrap {
    overflow-x: auto;
  }
  .card {
    padding: 14px;
  }
  .sectionhead,
  .review-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .solo-login {
    min-height: 100vh;
    min-height: var(--mobile-height, 100vh);
    padding: 16px;
    box-sizing: border-box;
  }
  .solo-login .login-box {
    width: 100%;
    box-sizing: border-box;
  }
  .tg-messages img,
  .tg-messages video {
    max-width: 100%;
    height: auto;
  }
  .tg-messages .tg-album-photo img {
    height: 125px;
    object-fit: cover;
  }
  .tg-day {
    backdrop-filter: none;
  }
  .tg-messages audio {
    max-width: 100%;
  }
  * {
    scroll-behavior: auto !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

#reply-composer:not([hidden]){display:flex;align-items:center;gap:8px;padding:6px 10px;border-left:3px solid #aaa;background:#242424;color:#eee}#reply-composer>div{min-width:0;flex:1}.reply-quote{border-left:3px solid #aaa;padding:4px 8px;margin-bottom:6px;white-space:normal}#reply-composer strong,.reply-quote strong{display:block;font-size:12px}#reply-composer span,.reply-quote span{display:block;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#reply-composer button{min-width:44px;min-height:44px}
